[torqueusers] which cpu instance from TM?

Craig Macdonald craigm at dcs.gla.ac.uk
Thu Oct 25 17:10:16 MDT 2007


I can use pbsdsh to start an instance of a process for each allocated cpu.

However, how can I tell whether this is the first, 2nd or nth instance on given node?

I can do something like:

for ((i=0;i<`wc -l $PBS_NODEFILE`;i++)); do pbsdsh -n $i runProg $i; done

But this could be made easier if the TM api set an environment variable denoting which CPU this program is being run for:
 pbsdsh 'runProg $PBS_CPUID'

I believe SGE has an environment variable for job arrays called $TASK_ID. Is there a similar plan for the planned Torque job arrays?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20071026/3fedfb0d/attachment.html

More information about the torqueusers mailing list