MP connect on SAS EG

Reply
New Contributor
Posts: 2

MP connect on SAS EG

Hi,

I'm working on SAS EG and have multiple codes to for one single task. SAS EG works on the server so I dont need to setup a remote connection. I want to use SAS MP connect but getting an error. I'm using the following test code (found from SAS documents available online):

option sascmd="sas";

rsubmit process=task1 wait=no log=keep output=keep ;

libname mydata '/export/home/agupta3';

data test;

X1=10;

run;

endrsubmit;

rsubmit process=task2 wait=no log=keep output=keep;

libname mydata '/export/home/agupta3';

data test1;

Yi=10;

run;

endrsubmit;

waitfor _all_ task1 task2;

*rget task1; rget task2;

/*Signoff task1; Signoff task2;*/

libname mydata '/export/home/agupta3';

data mydata.sorted;

  merge mydata.test mydata.test2;

run;

Please help me understand this issue and resolve the same.

Thanks,

Anu

Message was edited by: Anuj Gupta

Esteemed Advisor
Posts: 5,202

Re: MP connect on SAS EG

I would help to see the actual error...

Do you have the SAS/CONNECT license on the server?

Data never sleeps
Valued Guide
Posts: 3,206

Re: MP connect on SAS EG

This is a feature started at Eguide 5.1 "Allow parallel execution on the same server". You do not to do anything special in that case.

http://support.sas.com/resources/papers/proceedings12/297-2012.pdf

Coding MP connect by yourself is part of SAS/Connect. SAS/CONNECT(R) 9.4 User's Guide (MP CONNECT)

see the remark on "connectwait=no" That is asynchronous processing mode.

With rsubmits and waitfors you should coordinate the flow. rget is necessary to see the otther logs/output of those sessions.

 

SAS/CONNECT(R) 9.4 User's Guide (SIGNON Statement and Command) is documenting the signon and sascmd option.

see the remark on the sascmd option. using the exclamation point should get the value as started the current session.

This normally will have the best result. setting to your own OS-script is requiring very good understanding of that one.

You just coded the value "sas" what is happening starting with that?

Try in the back-hole command line interface of your OS.

---->-- ja karman --<-----
Super Contributor
Posts: 374

Re: MP connect on SAS EG

[ Edited ]

Hi,

 

I know it's an old thread, but my question is on topic.

 

So I read http://support.sas.com/resources/papers/proceedings12/297-2012.pdf that Ja references above.

 

An excerpt:

 

SAS Enterprise Guide, starting with 5.1, supports executing independent jobs in parallel on the same logical server. It achieves this by requesting additional workspace server sessions as needed, using the same server context. This feature (off by default) must be turned on one of two ways:

 

From the File menu, select Project Properties ►Code Submission. Then check Allow parallel execution on the same server. Setting the option here at the project level causes it to apply to everything in the project by default.

 

Right-click a program, select Properties ►Code Submission, and then click Customize code submission options. Check Allow parallel execution on the same server. Setting the option here at the element level causes it to apply only to the element.

 

I'm trying to use the 2nd approach.  In my EG project:

 

Program 1:

 

%let rc=%sysfunc(sleep(3));

data sasuser.class;
   set sashelp.class;
run;

%let rc=%sysfunc(sleep(10));

Program 2:

 

%let rc=%sysfunc(sleep(3));

data sasuser.shoes;
   set sashelp.shoes;
run;

%let rc=%sysfunc(sleep(20));

Program 3:

 

proc print data=sasuser.class;run;

proc print data=sasuser.shoes;run;

proc datasets lib=sasuser nowarn nolist;
   delete class shoes;
quit;

I've RMB'd Programs 1 & 2, Properties, Code Submission, Allow parallel execution on the same server.  Program 3 does not have this option.

 

I at least expected Programs 1 & 2 to run in parallel, but they still run sequentially.

 

I can get what I want by turning on parallel execution for the entire project, and defining links from Program 1 & 2 to Program 3.  In that scenario, Programs 1 & 2 do run in parallel, Program 3 waits, and I get the desired result.

 

Am I misunderstanding how the 1st scenario should work?

 

EG 6.1 M1HF17 (6.100.0.4406) (32-bit)

Valued Guide
Posts: 3,206

Re: MP connect on SAS EG

You have lines between them as in the first and second scenario.
Then in both cases it should run parallel, at least I didn't see any other behavior.  
 

---->-- ja karman --<-----
Super Contributor
Posts: 374

Re: MP connect on SAS EG


jakarman wrote:

You have lines between them as in the first and second scenario.
Then in both cases it should run parallel, at least I didn't see any other behavior.  
 


Hi Ja,

 

I don't know what you're saying here?  "You have lines between them as in the first and second scenario"???  Huh?

 

On my system:  EG 6.1 M1 (6.100.0.4025) (32-bit):

 

1) This does not work:

Project properties: Code Submission, neither option ticked.  IOW project defaults are single threaded processing.

Several code objects, Properties:  Code Submission, Customize code submission options, both options ticked.

These several code objects are then linked to a single code object which aggregates the results.

 

In this scenario, I expect the "several code objects" to run in parallel.  

Another way of looking at this is, the project default is single threaded processing, with the option to parallel process on a per-code-object basis.

 

Should I expect this scenario to work?

 

2) This does work:

Same as above, but change the project properties to multi-threaded processing.  IOW the project default is now to run everything in parallel.

 

But then I have some minor issues with parallel processing occuring when I don't want it to.  I may be able to fix this by creating additional links.

 

But regardless, unless I'm misunderstanding the SGF paper I referenced in my original message, I would expect scenario #1 to work.

Valued Guide
Posts: 3,206

Re: MP connect on SAS EG

I was aiming at job-flow connections lines between those programs / tasks.
I has the first preference in starting jobs/taks.

I used it heavily with program-nodes, that is working well. 
The generated task like query builders are behaving badly. For these reasons:

- There are no options to switch it dedicated to parallel yes/no.

- the assumption is having macro-s and datasets available in the current front proces. These are gone missing when running parallel as it are new sessions not sharing anything.  


---->-- ja karman --<-----
Super Contributor
Posts: 374

Re: MP connect on SAS EG

Does anyone else (esp. anyone from SAS?) think scenario #1 should work, or should I just open a tech support track?

Ask a Question
Discussion stats
  • 7 replies
  • 591 views
  • 1 like
  • 4 in conversation