Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud

qsub execution

ilanno
Beginner
459 Views

Hi everyone,

I'm using a script to execute jobs.

after the script is done I execute another script (must be after the first one is finished)

my question is if I can do it automatically, are there any commands that can check if the job's queue is empty? can someone share with me an example?

example: 

echo "cd tmp/ilan/; /usr/bin/time ~/tmp/jdk1.8.0_271/bin/java -jar Count64.jar -k 60 -NB 256 -t 1" | qsub

this is the command I execute. 

after the job was done (mean that if I type 'qstat' I will get nothing on the shell)

I want that another job will start 

thanks.

 

 

 

0 Kudos
4 Replies
RashmiP_Intel
Moderator
430 Views

Hi,

 

Thanks for reaching to devcloud forum.

 

Please follow below guidelines for executing one job after the other.

1. Create separate job files for individual jobs.

2. Create the common script to call this jobs as below:

 

#!/bin/sh -f

FIRST=$(qsub job1.sh)
echo $FIRST
SECOND=$(qsub -W depend=afterany:$FIRST job2.sh)
echo $SECOND

 

3. Execute the attached script (run.sh) to start the execution

 

I have also attached example scripts below, please go through the same and reach back to us in case of any further queries.

 

Note: Please change the directory inside run.sh script before running it.

For your information, qstat is the general command which we use to check the job queue.

 

Regards,

Rashmi

 

RashmiP_Intel
Moderator
365 Views

Hi,


We haven't heard back from you. Could you please give us an update?


Thanks.


RashmiP_Intel
Moderator
332 Views

Hi,


We have not heard back from you, so we will close this inquiry now. If you need further assistance, please post a new question.


Regards,

Rashmi


ilanno
Beginner
269 Views
Reply