Sequential programs on WRDS cloud
Posted: 14 June 2016 11:13 AM   [ Ignore ]
Newbie
Rank
Total Posts:  4
Joined  2015-03-07

Before the move to the WRDS cloud, I was able to submit sequential programs like this:
nohup sas program1.sas; sas program2.sas; sas program3.sas &

Where each program would start as soon as the earlier one finished.

Is there a way to do the same thing now using the WRDS cloud and qsas?  I don’t want to run these programs in parallel - they need to run sequentially.

Thanks

Profile
 
 
Posted: 16 June 2016 02:12 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi,

Great question! I’ve forwarded it to the Google group and will post any replies here.

Best Regards,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 17 June 2016 06:42 AM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

According to the WRDS Cloud Manual (https://wrds-web.wharton.upenn.edu/wrds/support/Accessing and Manipulating the Data/_009WRDS Cloud Manual.cfm) it seems like you should put your commands into a script, then run the script using the ‘qsub’ command.

nohup is no longer necessary with the qsub command, according to this web page (https://wrds-web.wharton.upenn.edu/wrds/support/Accessing and Manipulating the Data/_011Transitioning to the WRDS Cloud.cfm)

Chris Green

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile
 
 
Posted: 17 June 2016 09:30 AM   [ Ignore ]   [ # 3 ]
Newbie
Rank
Total Posts:  4
Joined  2015-03-07

I understand that the nohup option isn’t necessary any longer, nor is the & at the end.

I’ve read the manual, but still don’t understand what it means to put the commands into a script and run qsub.  Suppose I have 2 programs:
p1.sas
p2.sas

and I want p2.sas to run after p1.sas has finished. 

What do I do? 

I tried the following:
Create a text file called batch.sh

Edit that file to include only the following lines:
#!/bin/bash
#$ -cwd
sas p1.sas
sas p2.sas

I then submitted this with “qsub batch.sh”

p1.sas and p2.sas are programs that I’ve run before individually, and I know they work.  But this batch file doesn’t seem to be working - the expected datasets haven’t been created.  When I type in qstat to check the progress, the program seems to be still running, even though the underlying p1 and p2 sas programs would have been finished in a fraction of the time that it’s taken so far.

 

Profile
 
 
Posted: 18 June 2016 03:17 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  901
Joined  2011-09-19

hi,

Can you reply straight on the Google group so I don’t have to be the middle man? smile https://groups.google.com/forum/#!topic/wrdssas/zuqMrmg40vg

Thanks,

Joost

 Signature 

To reply/post new questions: Please use the group WRDS/SAS on Google Groups! http://groups.google.com/d/forum/wrdssas

Profile