SEARCH
TOOLBOX
LANGUAGES
Forum Menu
modified on 21 September 2011 at 18:56 ••• 6,166 views

Running

From NWChem

Jump to: navigation, search

Contents

Running NWChem

The command required to invoke NWChem is machine dependent, whereas most of the NWChem input is machine independent.

Sequential execution

To run NWChem sequentially on nearly all UNIX-based platforms simply use the command nwchem and provide the name of the input file as an argument. This does assume that either nwchem is in your path or you have set an alias of nwchem to point to the appropriate executable.

Output is to standard output, standard error and Fortran unit 6 (usually the same as standard output). Files are created by default in the current directory, though this may be overridden in the input.

Generally, one will run a job with the following command:

  nwchem input.nw >& input.out &

Parallel execution on UNIX-based parallel machines including workstation clusters using TCGMSG

These platforms require the use of the TCGMSGD.2 parallel command and thus also require the definition of a process-group (or procgroup) file. The process-group file describes how many processes to start, what program to run, which machines to use, which directories to work in, and under which userid to run the processes. By convention the process-group file has a .p suffix.

The process-group file is read to end-of-file. The character # (hash or pound sign) is used to indicate a comment which continues to the next new-line character. Each line describes a cluster of processes and consists of the following whitespace separated fields:

 userid hostname nslave executable workdir
  • userid - The user-name on the machine that will be executing the process.
  • hostname - The hostname of the machine to execute this process. If it is the same machine on which parallel was invoked the name must match the value returned by the command hostname. If a remote machine it must allow remote execution from this machine (see man pages for rlogin, rsh).
  • nslave - The total number of copies of this process to be executing on the specified machine. Only "clusters" of identical processes specified in this fashion can use shared memory to communicate. If no shared memory is supported on machine <hostname> then only the value one (1) is valid.
  • executable - Full path name on the host <hostname> of the image to execute. If <hostname> is the local machine then a local path will suffice.
  • workdir - Full path name on the host <hostname> of the directory to work in. Processes execute a chdir() to this directory before returning from pbegin(). If specified as a ""."" then remote processes will use the login directory on that machine and local processes (relative to where parallel was invoked) will use the current directory of parallel.

For example, if your file "nwchem.p" contained the following

d3g681 pc 4 /msrc/apps/bin/nwchem /scr22/rjh

then 4 processes running NWChem would be started on the machine pc running as user d3g681 in directory "/scr22/rjh". To actually run this simply type:

 parallel nwchem big_molecule.nw

N.B. : The first process specified (process zero) is the only process that

  • opens and reads the input file, and
  • opens and reads/updates the database.

Thus, if your file systems are physically distributed (e.g., most workstation clusters) you must ensure that process zero can correctly resolve the paths for the input and database files.

Parallel execution on UNIX-based parallel machines including workstation clusters using MPI

To run with MPI, parallel should not be used. The way we usually run nwchem under MPI are the following

  • using mpirun:

    mpirun -np 8 $NWCHEM_TOP/bin/$NWCHEM_TARGET/nwchem input.nw

  • If you have all nodes connected via shared memory and you have installed the ch_shmem version of MPICH, you can do

    $NWCHEM_TOP/bin/$NWCHEM_TARGET/nwchem -np 8 h2o.nw

Parallel execution on MPPs

All of these machines require use of different commands in order to gain exclusive access to computational resources.