BookmarkSubscribeRSS Feed
woo
Barite | Level 11 woo
Barite | Level 11

Hello - we have SAS 9.4 running on Linux as grid environment.

 

If I have multiple sas programs (test1.sas/test2.sas/test3.sas) that I want to run across multiple sas nodes (not just on one node) - what is best way to do that and what are the requirements from sas architecture or configuration stand point that I must have it in place?

 

please suggest - thanks.

7 REPLIES 7
LinusH
Tourmaline | Level 20
It's not clear how and why you want to execute one program on several nodes. Please elaborate.
There are three typical use cases for grid (perhaps even more):
- many user can share an environmnet that easily can scale up (and down)
- jobs that parallel logic can run those in separate grid sessions
- divide an conquer large data set processing

Have you read through the grid documentation and searched the web for examples?
Data never sleeps
woo
Barite | Level 11 woo
Barite | Level 11

I can put my different sas programs into one as a piece of codes, but i still wants to run those pieces of codes across sas worker nodes/servers (not only on one server) so that they can run in parallel as well. 

 

 

woo
Barite | Level 11 woo
Barite | Level 11

So, if I run Unix script (test.sh) which has 3 sas program, all jobs runs on same sas node, I want to distribute across multiple nodes. Thanks.

 

sas "/codedir/test1.sas" -log "/logdir/test1.log" -set run 1
sas "/codedir/test1.sas" -log "/logdir/test2.log" -set run 2
sas "/codedir/test1.sas" -log "/logdir/test3.log" -set run 3

nhvdwalt
Barite | Level 11

Submit your batch jobs using the SASGSUB command. This will distribute your jobs across the Grid according the policies you've set up.

 

http://support.sas.com/documentation/cdl/en/gridref/67371/HTML/default/viewer.htm#p1vejjepgd6q6nn1mw...

 

woo
Barite | Level 11 woo
Barite | Level 11

Thanks . So if I put all my three program into one sas job like below,

 

test.sas has,

%macro test;

%include /user-home-dir/test1.sas

%include /user-home-dir/test2.sas

%include /user-home-dir/test3.sas

%mend;

%test;

 

and if I submit using command -> sasgsub -gridsubmitpgm /user-home-dir/test.sas 

this is still running on same node.

 

any additional parameters or settings required?  

 

 

LinusH
Tourmaline | Level 20
If you already have your programs separate, why do you want to put them together?
Obviously this will make it harder to split them up again to have them executed in parallel.
Data never sleeps
nhvdwalt
Barite | Level 11

@LinusH is correct, it doesn't really make sense.

 

For splitting up SAS code, there are really three main scenarios:

 

1.) You have x number of SAS jobs that you can run in parallel e.g. my_job_1.sas, my_job_2.sas, my_job_3.sas. For this example I suggested the SASGSUB command since you can submit the three jobs to the Grid to run independently.

2.) You have a single SAS job e.g. my_job_1.sas, but WITHIN the job there are pieces of the code that you can run in parallel. This probably speaks more to your last example. In this case you would invoke grdsrv_enable(_all_,resource=SASApp) macro that will allow the pieces of SAS cdoe to be submitted to the Grid using SAS/Connect (rsubmit).

3.) A combination of 1.) and 2.)

 

Bottom line is, you have many tools in the Grid toolbox, but it really comes down to the design of the code and what you trying to achieve in terms of parallel processing/load management. This is your logical design. Once you have this defined , then it's easy to see what Grid tool you need. So it's not about 'Do I use 1, 2, or 3 ?' It's about what you are trying to achieve.

 

Hope it helps.....

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2404 views
  • 0 likes
  • 3 in conversation