in reply to Re: submitting job to a queue
in thread submitting job to a queue

No, qsub submits the job correctly and the job starts as well and runs in the background. But, the moment job gets submitted and before the job is finished, it comes back to the next statement in perl (e.g. "if" statement) and executes it and then exits the perl program. I need the perl program to just wait after submitting the qsub job and till it is finished, and then go to the next statement (i.e. "if" statement) thanks..

Replies are listed 'Best First'.
Re^3: submitting job to a queue
by Anonymous Monk on Jul 08, 2018 at 06:36 UTC
    I know this was posted a long time ago but I came across the same problem and in case it might help someone else, I solved it by using the "-W block=true" qsub option for PBS systems(i think the problem arises because "the qsub command exits after returning the ID of the new job" and not after completing the task)