[gmx-users] Running GROMACS in PBS
Mark Abraham
Mark.Abraham at anu.edu.au
Mon Apr 2 17:26:42 CEST 2007
Triguero, Luciano O wrote:
> Hi Mark,
>
> If I would have had more information about my PBS problem with gromacs, I would have then, probably, solved it myself, but I turn to the list because I konw of the great experincies of the people in the list, though your unpleasent humor.
Likewise, we can't solve your problem without any information. Thank you
for providing some.
This problem seems to have nothing whatever to do with GROMACS, and much
to do with the documentation and implementation of the runmd script and
its interaction with PBS. As such, it's not strictly a problem for a
GROMACS mailing list, but more for whoever is supporting this PBS
installation and/or providing this runmd script.
The stderr and stdout files that PBS should be returning should have
been useful sources of information about why the job was crashing, but
see my suggestion below.
> I submit my gromacs job to the PBS with the script below. The job goes to the queue, remains there for few seconds with a status E and then dies without giving any trace of why is going on?
>
> I appreciate any help from you.
>
> Thank in advance,
>
> Luciano
>
> ============================ Script follows ================================================
> ##############################################################
> #!/bin/bash
> #
> # runmd: Submit a GROMACS MD job to our PBS batch queue.
> #
> # $1 -- queue's name
> # $2 -- name of the .tpr file
> # $3 -- .gro input filename
> # $4 -- directory name to be created in the /chk dist
> #############################################################
> #Assign first argument to variable queue
> queue=$1
> case $queue in
> long) ;;
> medium) ;;
> large) ;;
> small) ;;
> *) echo "This script can only be used with queues long large medium small"
> echo "Submit this job by '$0 [queue_name] [filename([.tpr] initial)] [.gro input filename] [directory name]'"
> exit ;;
> esac
> #Assign second argument to variable md_input
> md_input=$2
> if ! test -e $2.tpr
> then
> echo "$2.tpr DOES NOT exist"
> echo "This job is not submitted"
> exit 1
> fi
> #Assign the third argument to variable gro_input
> gro_input=$3
> if ! test -e $3.gro
> then
> echo "$2.gro DOES NOT exist"
> echo "This job is not submitted"
> exit 1
> fi
> ###################################################################
> md_homedir=`pwd`
> md_workdir=/chk/$USER/$4
> ###################################################################
> #
> #Create the job file that is to be submitted to the queue with qsub
> #
> ####################################################################
> cat <<END >$2.job
> #PBS -S /bin/bash
> #PBS -q $queue
> #PBS -l nodes=1:ppn=4
> #PBS -N $2
These flags may or may not be enough to tell PBS you want a
four-processor job, depending on your local hardware and PBS
configuration. It wouldn't work on mine, but apparently it might on
David van der Spoel's. You'll have to check local information sources
here. If this isn't achieved, then -np 4 below will cause the job to exit.
> cd $md_homedir
> echo "Current directory: $md_homedir" >> $md_homedir/run.log
> if ! test -d $md_workdir
> then
> mkdir $md_workdir
> fi
> cp $md_homedir/$md_input.tpr $md_workdir/$md_input.tpr
> cp $md_homedir/$gro_input.gro $md_workdir/$gro_input.gro
> cd $md_workdir
> ######################################################################################################
> gmx=/usr/local2/gromacs/bin/mpimdrun
> mpix=/usr/local2/mpich/bin/mpirun
> ${mpix} -np 4 ${gmx} -s $md_input.tpr -o md_minim_traj.trr -c md_$gro_input.gro -e md_minim_energy.edr
> ######################################################################################################
> END
> #
> # Now submit $2.job to the queue.
> #
> case $queue in
> long)
> qsub $2.job ;;
> medium)
> qsub $2.job ;;
> large)
> qsub $2.job ;;
> small)
> qsub $2.job ;;
> esac
>
> sleep 1
> exit
>
> =======================================================================================
Mark
More information about the gromacs.org_gmx-users
mailing list