set NPROC=10
set ROOTDIR=\\tc.cornell.edu\tc\users\%USERNAME%\software\farm_out_work\deterministic
set CODE=same_executable
set INFILE=input_data
set OUTDIR=%ROOTDIR%\output
mkdir %OUTDIR%
cd /D %ROOTDIR%
REM Start timing.
echo Start at: >%OUTDIR%\same_executable.txt
date /t >>%OUTDIR%\same_executable.txt
time /t>>%OUTDIR%\same_executable.txt
REM make sure you are at the root of T:
cd /D T:\
REM find out which nodes you have
vsched -m
REM same_executable_setup.bat copies over same_executable program files
mpirun -np %NPROC% %ROOTDIR%\same_executable_setup.bat 1>%OUTDIR%\same_executable_setup.out 2>%OUTDIR%\same_executable_setup.err
copy T:\machines T:\%USERNAME%
cd /D T:\%USERNAME%
REM run the jobs
mpirun -np %NPROC% %ROOTDIR%\same_executable_execute.bat 1>%OUTDIR%\run.out 2>%OUTDIR%\run.err
REM cleanup.bat copies all output files back to the user folder on the fileserver, (H:)
mpirun -np %NPROC% %ROOTDIR%\same_executable_cleanup.bat 1>%OUTDIR%\same_executable_cleanup.out 2>%OUTDIR%\same_executable_cleanup.err
REM End timing.
echo End at: >>%OUTDIR%\same_executable.txt
date /t >>%OUTDIR%\same_executable.txt
time /t>>%OUTDIR%\same_executable.txt
vsched -c