Reputation: 107
A silly question, perhaps, about qsub on SGE.
I submit a job via a script
#PBS -V
#PBS -l select=1:ncpus=20:mpiprocs=20,walltime=01:00:00
#PBS -o /path/to/out.file
#PBS -e /path/to/errors.txt
#PBS -q smp
#PBS -m ae
#PBS -M myemail@address
#PBS -P Projectname
#PBS -I
#PBS -N Job
mpirun -np 20 mpiexecutable args input.file
The job of "mpiexecutable" is to act on input.file to minimise its parameters, and then write them to input.file again.
My job runs. But input.file remains unchanged. I think there is either
1) Something missing in my PATH, or
2) Some other reason why the cluster won't write to input.file.
In order to troubleshoot it, I need to know:
1) How do I find out where the job is running (i.e. what the path is wherever the job is running - should be the same as whatever the path is in the working directory, surely?) 2) How do I find out where the job is writing to?
Thanks so much for your help!
Upvotes: 1
Views: 498
Reputation: 107
I just made some progress! I think the best way to proceed with a question like this is to be explicit about where the job is being run and written and where to find executables and input etc.
With this in mind, my new submission script is:
#PBS -V
#PBS -l select=1:ncpus=20:mpiprocs=20,walltime=01:00:00
#PBS -o /path/lfor/out.txt
#PBS -e /path/for/errors.txt
#PBS -q smp
#PBS -m ae
#PBS -M email@address
#PBS -P Project-name
#PBS -I
#PBS -N Job
module load importantmodules
SRCDIR=$SCRATCH/my_project/code
cp my_input_params.inp $RUNDIR
RUNDIR=$SCRATCH/my_project/run-${PBS_JOBID/.*}
mkdir -p $RUNDIR
mpirun -np 20 $SRCDIR/mpiexecutable args < my_input_file.inp
I haven't tried this yet, but I am crossing my fingers that it works. I got some great directives for improving the submission script like this from this website: https://wikis.nyu.edu/display/NYUHPC/Writing+and+submitting+a+job+-+content
Let's keep going! I feel marginally less lost now
Upvotes: 1