/[pdpsoft]/trunk/nl.nikhef.ndpf.tools/nikhef-torque-prologue-epilogue/mom_priv/prologue
ViewVC logotype

Diff of /trunk/nl.nikhef.ndpf.tools/nikhef-torque-prologue-epilogue/mom_priv/prologue

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2677 by ronalds, Tue Oct 8 11:59:44 2013 UTC revision 2678 by ronalds, Fri Oct 11 10:57:20 2013 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/bash
2    
3  # Torque prologue script to limit the processes in a job to the assigned  # Torque prologue script to limit the processes in a job to the assigned
4  # CPU list  # CPU list
# Line 20  debugfile=/tmp/prologue.log Line 20  debugfile=/tmp/prologue.log
20  # Determine the job slot(s)  # Determine the job slot(s)
21  # The result is a single number or comma-separated list of numbers  # The result is a single number or comma-separated list of numbers
22  # that will be used as the CPU numbers which can be used by the job  # that will be used as the CPU numbers which can be used by the job
23  slot=$(pbsnodes -a $(hostname) | \  slot=$(pbsnodes -a $(hostname -f) | \
24         perl -ne 'if ( m/^\s*jobs/ ) {  s/\[|\]//g ; @a = m!(\d+)/'$jobid'!g ; print join(",",@a)."\n"; }')         perl -ne 'if ( m/^\s*jobs/ ) {  s/\[|\]//g ; @a = m!(\d+)/'$jobid'!g ; print join(",",@a)."\n"; }')
25  [ $debug -gt 0 ] && echo jobid=$jobid, slot=$slot >> $debugfile  [ $debug -gt 0 ] && echo jobid=$jobid, slot=$slot >> $debugfile
26    

Legend:
Removed from v.2677  
changed lines
  Added in v.2678

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28