BookmarkSubscribeRSS Feed
fuatengin
Calcite | Level 5

I wanted to enable paralell processing in my SAS EG project to run two independent programs in the same process flow. I am assigning custom libnames and writing their location with macro variables in "Autoexec" process flow initially but when I give a parallel run,  the first one gets "libref is not assigned error."

I don't understand the reason and how I can tackle it.

 

Help is very much appreciated.

 

Regards,

 

Fuat

2 REPLIES 2
AhmedAl_Attar
Rhodochrosite | Level 12

Check the following SAS Global Forum paper, see if it gives any ideas/guides how to get around your issue

Improving Efficiency in SAS® Enterprise Guide®: Parallel Processing and Other Hidden Gems 

 

Hope this helps,

Ahmed

CaseySmith
SAS Employee

Hi @fuatengin,

 

The parallel processing feature in EG causes multiple workspace sessions to be launched to perform the independent work in parallel.  This can be tricky when your downstream code relies on upstream code that makes state changes (ex. assigns libraries, defines macro variables, sets system options, etc.) to a workspace session

 

For example, the code you put in your process flow named "autoexec" causes the libraries to be assigned and the macro variable defined on only one of the workspace sessions.  Any additional workspace sessions that are spun up to perform work in parallel will not have those libraries or macro variables defined.  If you don't explicitly define a dependency, there is no guarantee the upstream code you need will be run on the same workspace session as your downstream node.  So, to ensure your "setup code" is run on the respective workspace sessions before each of your independent programs, I recommend adding a separate code node before each or your programs (rather than using the autoexec process flow) and explicitly linking your "setup" program nodes to your actual programs.  (You'll want two "setup" code nodes to ensure the two branches remain independent/unconnected, so they'll run in parallel.  However, they could both %include the same .sas file (so you only have one to maintain) to assign your libraries and define your macro variables.)

 

Casey


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 663 views
  • 0 likes
  • 3 in conversation