Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Working with Qsub in Java

    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. Also the job that will be submitted can take awhile to run, depending on the number of cores I can use at the time I run the job.

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

    If you want to see the entire code, then I can post it.

    Thanks for the help and your time in advance. ^_^

  2. #2
    Thank you for the interesting articles.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts