main_limiting.xml
<?xml version="1.0" ?>
<!-- Sample XML Job File -->
<job>
<nodes>16</nodes>
<minutes>1440</minutes>
<type>batch</type>
<affiliation>v2</affiliation>
<run>\\tc.cornell.edu\tc\users\your_userid\main_limiting.bat</run>
</job>

main_limiting.bat
set NODES=16
set PROCS=32
 
set JOBDIR=\\tc.cornell.edu\tc\users\%USERNAME%\jobs
set OUTDIR=\\tc.cornell.edu\tc\users\%USERNAME%\output\out_%NODES%_%PROCS%_31may2006_%COMPUTERNAME%
 
mkdir %OUTDIR%
 
REM sleep for a time less than job limit.  Then pskill mpirun.
start /b %JOBDIR%\limiting.bat
 
set MPI_COMM=TCP
 
REM Work on the local drive T:.
REM Create the machines file in T:\ and run the setup script.
REM The setup script creates T:\%USERNAME% if it does not exist.
REM If T:\%USERNAME% already exists, the setup deletes the files.
REM Move the machines file from T:\ to T:\%USERNAME% after the setup.
 
t:
cd \
vsched -m
mpirun -np  %NODES% %JOBDIR%\setup.bat 1>%OUTDIR%\setup.out 2>%OUTDIR%\setup.err
 
cd t:\%USERNAME%
REM background script to copy files from T: to H:
start /b %JOBDIR%\copyback.bat
move t:\machines t:\%USERNAME%
 
REM Run the executable, writing standard out and standard error to local disk.
mpirun -verbose -mpi_verbose -mpi_debug -np %PROCS% t:\%USERNAME%\my.exe >my.out 2>my.err
 
REM kill off processes on each node
mpirun -np %NODES% %JOBDIR%\kill.bat
 
REM Copy all output from local disk to H:.
REM Avoid having duplicate file names.
 
mpirun -np %NODES%  %JOBDIR%\cleanup.bat 1>%OUTDIR%\cleanup.out 2>%OUTDIR%\cleanup.err
 
vsched -c