Re: SAS Parallel processing #3 694182

Dear SAS-L-ers,

Ram posted the following:

> I am relatively new to SAS parallel processing scene and
> trying to work on the following piece of code using SAS 9 on
> a PC. The remote server has 4 processors and this is a UNIX
> based server. On my PC windows based SAS, I execute the
> following code after connecting to the remote server.
> options autosignon=yes ;
> rsubmit;         /* Begin simulation */
> options symbolgen ls=96;
> options sascmd='!sascmd -nosyntaxcheck' autosignon=yes
> cpucount=ACTUAL;
> %macro StatsModel(startLoop=, endLoop=, inputfn=,nsims=);
> filename params "/data/&inputfn";
> data parameters;
>         infile params delimiter = ',' firstobs=2;
>         input runid nsims freq $ type $;
>     call symput('max',_N_);
> run;
> %if &max < &endLoop %then %let endLoop = &max;
> %let seed1 = 0; %let seed2 = -1;
> %do j = &startLoop %to &endLoop;   /* Iteration for the j-th run_id */
>   options sascmd='!sascmd -nosyntaxcheck' autosignon=yes;
>   %syslput j = &j;
>   rsubmit task&j cwait=no;
>   libname dir "/data/ParallelProcess";
>   %include "/sascode/Simulate.sas";
>   %include "/sascode/Outputs.sas";
> data parameters;
>         infile params delimiter = ',' firstobs=%eval(&j +1)
> obs=%eval(&j+1);
>         input runid nsims freq $ type $ ;
>         call symput('DIS',type);
>         call symput('freqq',freq);
>         label   runid = 'Simulation ID'
>                 freq = 'Frequency'
>                 type = 'Model type';
> run;
> proc print data = params;
>  title 'Input parameters';
> run;
> %simulate(n=&j,freq=&freqq,DIS=&DIS);
> %stats_output(n=&j,inputfn=Test.csv,startLoop=1);
> endrsubmit;   /* End of remote submit for task 'j' */
> %end;         /* End of 'do' loop for iteration 'j' */
> rdisplay ;
> waitfor _ALL_ %do i = 1 %to &endnode; jobs&i %end;;
> %do i = 1 %to &endLoop;
>  signoff jobs&i;
> %end;
> %mend StatsModel;
> %StatsModel(startLoop=1,endLoop=99,nsims=1000,inputfn=Test.csv);
> endrsubmit;       /* End Simulation */
> I get several errors while processing the above program. I
> tested the sas programs in the %include statement
> 'simulate.sas' and 'outputs.sas' but these do not give me
> errors while processed individually. However, when I try to
> include the macros in these programs into the code above, I
> get errors. Sometimes it also happens that I run the program
> but I am not able to see the output for any of the tasks. The
> log says "Remote submit to task 1 complete" (which means the
> loop for j has run only for j=1, while typically I have j=1
> to 10), and then the program terminates and I get no output.
> Can someone help me out with this ?
Ram; hey it must be fun to have a nick name that computer people can
relate to!  "Mike" just doesn't have the same comp-sci cache!

All seriousness aside, you have received great advice from SAS-L
brainiacs Robert and Gerhard.  I am going to be more overt:  STOP WHAT
EMAIL, AND POST IT TO THE 'L.  Then, they/we/I can help you solve this
interesting problem.

Have you tried to do something simpler with SAS/Connect and your UNIX
server, first?  That is; I would first make sure that I can successfully
connect to my UNIX server and successfully submit programs on it via
RSUBMIT.  I would do this with a very simple program that didn't contain
macros or attempt to use parallel processing.  Once I had established
that the simple program worked, I would add on the next layer--say the
parallel processing.  Once I knew that worked, I would go with the
macros.  This incremental approach (the first time around) would help me
to know that the basic "transportation mechanism" (programmatically
speaking) that I was using was working A-OK, and which step--if any--was
the problem step.  (<--Hey, my editors would have a field day with this

Also, if you have not already discovered it, there is a good resource
for your grid computing on the SAS web site:


.... and check out these papers:


....or check out the MP CONNECT stuff:


....perhaps some of these resources will be of use to you.

Ram, we/they/I will look forward to further information about your
SAS/Connect errors!

I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not
reflect those of my organization or my associates. All SAS code and/or
methodologies specified in this posting are for illustrative purposes
only and no warranty is stated or implied as to their accuracy or
applicability. People deciding to use information in this posting do so
at their own risk.

Michael A. Raithel
"The man who wrote the book on performance"
E-mail: MichaelRaithel@westat.com

Author: Tuning SAS Applications in the MVS Environment

Author: Tuning SAS Applications in the OS/390 and z/OS Environments,
Second Edition

Author: The Complete Guide to SAS Indexes

My grandmother is over eighty and still doesn't need glasses. Drinks
right out of the bottle. - Henny Youngman
7/31/2007 1:25:08 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

1 Replies

Similar Articles

[PageSpeed] 45

Michael, Robert and Gerhard,

Thanks all for your comments. I will paste the log soon.

The way I connect to the remote server in SAS 9 is by using the remote
connect icon. I fill in the server details and then 'am connected to
it. After that, I run programs like rsubmit; <code>; endrsubmit;  and
these have worked for me so far. Anyways, I will re-run the code,
paste the log and write back.

Thanks again,

prsana (10)
7/31/2007 8:27:21 PM