Hello experts,
I wanted to ask about the parallel sessions in SAS and how to make it work, with wait =no option.
I tried running 3 sessions in parallel using :
%LET rc=%sysfunc(grdsvc_enable(_ALL_,server=SASAPP));
signon sess1 inheritlib=(Work=locwork otp=otp);
signon sess2 inheritlib=(Work=locwork otp=otp);
signon sess3 inheritlib=(Work=locwork otp=otp);
rsubmit sess1 wait=no;
***************************************************;
* Code for session 1 *;
***************************************************;
endrsubmit;
rsubmit sess2 wait=no;
***************************************************;
* Code for session 1 *;
***************************************************;
endrsubmit;
rsubmit sess3 wait=no;
***************************************************;
* Code for session 1 *;
***************************************************;
endrsubmit;
waitfor _all_ sess1 sess2 sess3;
signoff _all_;
***************************************************;
* common code after al sessions have completed *;
***************************************************;
However it kept failing until I removed the wait=no option, and that essentially made the session run sequentially one after the other instead of running them in parallel.
This can be a big efficiency booster for many of my codes, if we can get this figured by experts from SAS.
Thanks a bunch all
Can you paste the part of the log where you are getting the error message please?
I think you'll have to raise this with SAS Support which you can do from this form - http://support.sas.com/ctx/supportform/createForm
I agree removing wait=no sort of negates the whole point of using this technique.
Hi,
Have you tried to establish a connection without the inheritlib= option?
signon sess1 signonwait=no;
signon sess2 signonwait=no;
rsubmit sess1 wait=no;
data _null_; rc=sleep(5,1); run;
endrsubmit;
rsubmit sess2 wait=no;
data _null_; rc=sleep(5,1); run;
endrsubmit;
waitfor _all_ sess1 sess2;
signoff _all_;
Ensure you can get the Parallel connections, then move into inherited libraries.
Hope this helps,
Ahmed
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.