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
Ammonite | Level 13

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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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