Running NAMD Jobs on Darwin

 

 

NAMD jobs must be run as batch jobs under PBS, submitted via the qsub command.  For general information about how to submit PBS batch jobs on darwin, see Submitting Jobs via PBS on Darwin.

 

The PBS job script file for a NAMD job should have the following format:

 

#PBS –l cput=hh:mm:ss,ncpus=n

charmrun /usr/local/bin/namd2 ++local +pn configfile

 

where +pn specifies the number of processors to use, and configfile is the NAMD configuration file.  For example, to run NAMD on 2 processors using the configuration file test1.namd, the PBS job script might look like the following:

 

#PBS –l cput=8:00:00,ncpus=2

charmrun /usr/local/bin/namd2 ++local +p2 test1.namd

 

Specify values for cput (CPU time required) and ncpus (number of CPUs required) that are appropriate for your job.  The parameters on the #PBS statement can also be specified on the qsub command, but it is convenient to put them in the job file so that they aren’t forgotten.  See the man pages for pbs and qsub for more details about submitting PBS jobs.  The charmrun command runs the namd2 module on the specified number of processors.  Be sure to use the full pathname for the namd2 module, /usr/local/bin/namd2.

 

Once the job script file has been created, the job can be submitted for execution with the qsub command:

 

     qsub scriptfile

 

If the job script file does not contain a #PBS statement, you can specify the job parameters on the qsub command:

 

     qsub –l cput=8:00:00,ncpus=2 scriptfile

 

The ncpus resource specification is very important for job scheduling on darwin.  Job scheduling is based upon the load level of each node and the number of CPUs that are in use.  The PBS scheduler cannot “look inside” of a job to determine how many CPUs it will use, so the scheduler must be told how many CPUs a job will use via the ncpus resource.  Please be sure that the value of ncpus is the same as the value of the +p parameter on the charmrun command.  If the value of ncpus is too high, then your job may wait in the queue, even though CPU resources are available.  If the value of ncpus is too low, then your job may be cancelled if it actually uses more CPUs than you specified.  If ncpus is not specified, PBS will assume that 1 CPU is needed.   (Note:  Running a single NAMD job across multiple nodes is not currently supported on darwin, so a single NAMD job can use at most 4 CPUS.  However, it is recommended that no more than 2 CPUs be used.  Jobs that request more than 2 CPUs may wait much longer in the job queue, depending upon system load.)

 

Use the qstat command to see which jobs are queued/executing on darwin.  A maximum of 1 job belonging to a given user is allowed to execute at a time.

 

The NAMD User’s Guide is available online here.