BookmarkSubscribeRSS Feed
AnujGupta
Calcite | Level 5

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

7 REPLIES 7
LinusH
Tourmaline | Level 20

I would help to see the actual error...

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

Data never sleeps
jakarman
Barite | Level 11

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 --<-----
ScottBass
Rhodochrosite | Level 12

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)


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
jakarman
Barite | Level 11

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 --<-----
ScottBass
Rhodochrosite | Level 12

@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.


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
jakarman
Barite | Level 11

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 --<-----
ScottBass
Rhodochrosite | Level 12

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


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1677 views
  • 1 like
  • 4 in conversation