Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ Qsub ownership

Posted by: I1nk Jun 17 2013, 08:48 AM

Hello everyone,

I was wondering if there is a way to share ownership with a job that was submitted to a cluster using the qsub command? I would like to do this so I can ask my program to wait till the process is done since I can ask my program to wait till a process that I own is completed. The language that the program is in is Java. I'm planning on submitting the job though the qsub command though Java too. I also have the input and output streams open too. I didn't open the error stream though.

This is the method I am using. to submit the qsub command.

Runtime run = Runtime.getRuntime();
Process pros = run.exec(String);

Currently the only way I know on how to check to see if the process is done is by asking it to echo "done" when completed and ask my code to read that output looking for the word done, and then sleep for 10 min if not there, then check again.

The main reason I would like to wait till this process is done, is because I would like to take the output from the process and make a few changes to it and resubmit it. If I use the method I talk about above, then I could end up waiting longer then I need to.

My bash scripting is not very good at all as a side note.

Thanks for the help and your time in advance. happy.gif

Oh I'm am also open for suggestions on another method. These were the two I could come up with. I also forgot to add, I don't have root access to the cluster.

Powered by Invision Power Board (
© Invision Power Services (