DATA Step, Macro, Functions and more

SAS Parallel Sessions

Reply
Contributor
Posts: 27

SAS Parallel Sessions

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

 

Regular Contributor
Posts: 187

Re: SAS Parallel Sessions

Can you paste the part of the log where you are getting the error message please?

Contributor
Posts: 27

Re: SAS Parallel Sessions

Hi Chris,

Below is the log.

NOTE: Remote submit to SESS2 complete.

ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:

The SAS task name is [CONNECT ]
Segmentation Violation

Traceback of the Exception:

/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sas() [0x5280fe]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sas() [0x41f0ee]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/tkmk.so(bkt_signal_handler+0x144) [0x2b80c07dd5d4]
/lib64/libpthread.so.0() [0x321000f7e0]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sasods(+0x9a869) [0x2b8150eaa869]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sasods(wobmth+0x57) [0x2b8151060417]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sasods(vector+0x27a) [0x2b8150ec4bda]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sasxkern(ypoutf+0x6d2) [0x2b80d09428d2]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sasxkern(ypprnx+0x144) [0x2b80d094bc74]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sasxkern(yppflsh+0x77) [0x2b80d094ba77]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/saszrlnk(+0x93144) [0x2b8105366144]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/saszrlnk(lsbsfls+0x392) [0x2b8105365a52]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/saszrlnk(ls+0x1c88) [0x2b810535eba8]
/sso/sfw/sas/940/SASFoundation/9.4/sasexe/sas(vvtentr+0x101) [0x41ed01]
/lib64/libpthread.so.0() [0x3210007aa1]
/lib64/libc.so.6(clone+0x6d) [0x320fce8aad]


When I googled this error it was mentioned that removing wait=no option should fix this, but doing that runs the sessions sequentially and not parallely.

Regular Contributor
Posts: 187

Re: SAS Parallel Sessions

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.

Regular Contributor
Posts: 213

Re: SAS Parallel Sessions

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 

Ask a Question
Discussion stats
  • 4 replies
  • 83 views
  • 1 like
  • 3 in conversation