Re: NAMD with pbs script

From: Branko (
Date: Sun Aug 25 2013 - 10:20:28 CDT


In clusters with pbs you usually should put number of nodes and number
of processors that you need, input and output file names and the line
that execute script (for example all in pbs file. In script
you should put path to the exe files (charmrun and namd2) as well as to
your file which give all 'instructions' for namd run. In this way you
could execute program with 'qsub <file_name>.pbs' , In your scrip it is
uncertain are charmrun and namd2 are in the same directory. Best
solution is to ask your system administrator, for example see below



#PBS -q <your_q>
#PBS -l nodes=1:ppn=1
#PBS -l walltime=100:00:00
#PBS -e ${PBS_JOBID}.err
#PBS -o ${PBS_JOBID}.out

chmod +x

#!/bin/sh -x


echo "Running on: $HOSTNAME"

if [ "x$PBS_NODEFILE" != "x" ] ; then
   echo "PBS Nodefile: $PBS_NODEFILE"

     if [ "x$HOST_NODEFILE" = "x" ]; then
       echo "No hosts file defined. Exiting..."

         echo "Creating host file..."

         export NODES=`cat $PBS_NODEFILE`
         export NODELIST=nodelist
         echo group main > $NODELIST
                         for node in $NODES ; do
                                         echo host $node ++shell ssh >>

                                     echo "Nodelist file:"
                                     cat $NODELIST

/path_to_charmrun/charmrun ++remote-shell ssh ++nodelist $NODELIST
+p$PROC_NUM /path_to_namd2/namd2

On 8/25/2013 4:36 PM, k.manzoorolajdad wrote:
> Dear NAMD user:
> I use cluster with rock cluster 6 and pbs torque
> and see this address
> but cant handel
> i write the script below:
> #!/bin/csh
> #PBS -k oe
> #PBS -m be
> #PBS -M <>
> #set path=(/home/homes53/nbhard2/C2/wrong/namd2 $path .)
> ./make-namd-nodelist
> ./charmrun ./namd2 +p$np ++nodelist ~/namd.$PBS_JOBID MinEqu.conf >&
> test.log
> and create ./make-namd-nodelist :
> #!/bin/sh
> nodelist=~/namd.$PBS_JOBID
> lists=`cat "$PBS_NODEFILE" | sort`
> echo group main > $nodelist
> for i in $lists
> do
> echo host $i >> $nodelist
> done
> and submit with:
> qsub -v np=40 -l nodes=5 namd.pbs
> what's my wrong?
> thanks
> manzoor

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:23:36 CST