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
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
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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.