0

Between unique jobs in the PBS job array, is it possible to manipulate the number of nods used and/or the value of variables used by the program itself?

For example, one script might run my program as different job submissions on 1 node, then 2 nodes, then 3 nodes, etc etc. While another script could change the value of an in program variable incrementally.

t. fochtman
  • 431
  • 3
  • 9

1 Answers1

0

There isn't a native way to submit this, but it could be accomplished using qalter. You'd want something like:

qsub script.sh -t 1-10
# for ease we'll assume this returned 0[]
for ((i=1; i<=10; i++)); do
  qalter 0[$i] -l nodes=$i

As far as a variable for each job, each array subjob would have $PBS_ARRAYID defined that would tell you the index of the job.

NOTE: this answer assumes TORQUE 2.5 or higher.

dbeer
  • 6,963
  • 3
  • 31
  • 47