0

I do not have administrative privileges on the cluster that i am using. I'd like to prioritize some of the jobs that I have submitted. How do i incorporate that into my batch file:

 #!/bin/bash
#$ -V
#$ -cwd
#$ -N name
#$ -y
#$ -pe orte 1 
#$ -o output

~/ct.exe
1
  • That would depend entirely on your cluster, how it's configured, what privileges the cluster admin has granted to users, what job scheduler it uses (pbs? torque? slurm?). You haven't provided any details...and even if you had, the only good answer would still be "ask your cluster admins". – cas Jun 3 '16 at 0:43
2

Well if you want to have the control of priority using a standard user you will need to reduce the priority of the less important scripts, so the most important will run faster.

For example:

mylowpriorityscript:

#!/bin/bash
renice 20 $$
#lot of nice things

mymediumpriorityscript

#!/bin/bash
renice 10 $$
#lot of nice things

myhighpriorityscript

#!/bin/bash
renice 00 $$
#lot of nice things

And configure the priority of your shell in .bashrc to 10, so you can manage the subprocesses to other priorities using "nice" like:

.bashrc

renice 10 $$
1
  • 1
    A note: some subprocesses will not run at the same priority of the main script so you can call the subprocesses with nice -n10 command. – Luciano Andress Martini Jun 3 '16 at 16:45
0

Use nice if you want to run the process and renice if you want to change priority for a running process

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.