Getting started with SAS parallel processing using MP Connect -


i trying understand mpconnect , how can use parallel processing.

as simple example, started session prints "hello world!" forever , prints "bye world!". said "waitfor any" , "rget" , expect "bye world!" in log because "hello world!" go on forever while "bye world!" has finished. unfortunately, doesn't work.

in general, have great difficulties retrieving output remotely submitted task.

option cpucount=4 sascmd="!sascmd" autosignon;  rsubmit task1 wait=no;      data _null_;         while(1);         put "hello world!";         end;      run;  endrsubmit;   rsubmit task2 wait=no;      data _null_;         put "bye world!";     run;  endrsubmit;   waitfor _any_; rget;  signoff task1; signoff task2; 

the problems seems when have syncronous processes running disconnected each other. though you're waiting fast task2 complete before continuing:

rsubmit task2 wait=no;     data _null_;         put "bye world!";     run; endrsubmit; 

sas needs task1 complete final rget:

rsubmit task1 wait=no;     data _null_;         while(1);         put "hello world!";         end;     run; endrsubmit; 

i think happening sas task2 satisfies waitfor _any_ condition , able carry on processing after task2. rget needs final log files of each (completed) process before can merge them client session log window.

have @ details section of sas documentation here:

edit:

playing around bit more, can test connections across them using unified libname (each process has own unique work libname can not conflict each other):

assign libname , options required on client machine:

libname testlib 'c:/test' ; option cpucount=4 sascmd="!sascmd" autosignon; 

define 2 processes run in parallel:

* process 1 ; rsubmit task1 wait=no; libname testlib 'c:/test' ; data testlib.test1 ;   i=1 1000 ;     j=1 1000;       output ;     end ;   end ; run ; endrsubmit;  * process 2 ; rsubmit task2 wait=no; libname testlib 'c:/test' ; data testlib.test2 ;   i=1 1000 ;     output ;   end ; run ; endrsubmit; 

you can have following code run while process1 still running able access output dataset of process2:

* wait either of above processes , process remaining code; waitfor _any_;  proc sql noprint ;   select sum(i)   :result   testlib.test2  ;quit ;  %put *** sum of test2 is: &result *** ; 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -