#!/bin/sh
#PBS -S /bin/sh
#PBS -N raytrace
#PBS -l nodes=16,walltime=5:00
#PBS -q eecs587
#PBS -M lsbeeler@umich.edu
#PBS -m abe
#PBS -V
#
echo "I ran on:"
cat $PBS_NODEFILE
# Create a local directory to run and copy your files to local.
# Let PBS handle your output
mkdir /tmp/${PBS_JOBID}
cd /tmp/${PBS_JOBID}
cp ~/raytrace ~/busm.ob ~/cube.ob ~/feline100.ob .

# Use mpirun to run with 7 nodes for 1 hour
mpirun -np 16 ./raytrace

cp netimage_out.tga ~/

#Clean up your files
cd
/bin/rm -rf /tmp/${PBS_JOBID}
