BookmarkSubscribeRSS Feed
woo
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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
Lapis Lazuli | Level 10 woo
Lapis Lazuli | Level 10

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

 

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1321 views
  • 0 likes
  • 3 in conversation