[torqueusers] which cpu instance from TM?
garrick at usc.edu
Thu Oct 25 17:09:54 MDT 2007
On Fri, Oct 26, 2007 at 12:10:16AM +0100, Craig Macdonald alleged:
> 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 --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20071025/025abc37/attachment.bin
More information about the torqueusers