DATA Step, Macro, Functions and more

Parallel Processing with rsubmit

Respected Advisor
Posts: 3,902

Parallel Processing with rsubmit

Hi all

I'm running the following script in a vmware Windows2003 image with PC
SAS 9.1.3 on a single intel processor laptop.
The script should "spawn" 3 sessions on the same machine where the main program runs.
The 3 sessions should run in parallel (asynchronous).

options sascmd='C:\Program Files\SAS\SAS 9.1\sas.exe -
nosyntaxcheck' ;

%macro testit;
%do i=1 %to 3;
signon t&i;
%syslput ri=&i;
rsubmit wait=no log="C:\temp\testNew2_&i..log" output="C:\temp
\testNew2_&i..lst" ;
filename test "C:\temp\testNew2_&ri..txt";
data _null_;
file test;
put "Test &ri";
call sleep(10,1);
filename test clear;
signoff t&i;


I have the following 2 questions/issues:

1. It looks to me as if the tasks run synchronous instead of
asynchronous - why?

2. If I run the code more than once I get the following error:
ERROR: File is in use, C:\temp\testNew2_1.log.
ERROR: Remote submit cancelled.

Why is the log file still locked after signing off from the "spawned"
session? What am I missing?

Cheers, Patrick
Super Contributor
Posts: 474

Re: Parallel Processing with rsubmit

Hello Patrick.

Set the autosignon option at the beginning:

option autosignon=yes;

Cheers from Portugal.

Daniel Santos @
Respected Advisor
Posts: 3,902

Re: Parallel Processing with rsubmit

Hi Daniel

Thanks for your answer. Someone replied! :-)

I tried autosignon=yes; but still encounter the same issues.

There is an explicit signon in the code I provided so I don't really understand the point of adding the autosignon option.

I could imagine that multithreading doesn't really work as there is only one processor - and even though it's a dual-core processor it could be that the VM ware image runs on only one core. Just theory - but it's at least some kind of explanation.... Running very similar code in a multi-processor Unix environment works fine and the tasks run in parallel.

I still don't understand why the files stay locked even after an explicit signoff.

Cheers, Patrick
Super Contributor
Posts: 474

Re: Parallel Processing with rsubmit

autosignon must be set if you wish to use multithreading feature (MP Connect).

Something may be wrong with your setup.

MP Connect will run on a single CPU (although internally, it should clearly be round robin processing).

I have ran the exact same code (with the autosignon=yes) asynchronously on my workstation (WinXP P4 with single CPU) with no problem at all.

Could you try the following code, to see if it works on your installation:

Cheers from Portugal.

Daniel Santos @
Ask a Question
Discussion stats
  • 3 replies
  • 2 in conversation