How to use NWChem

Software
Version
Cluster
NWChem
7.0.2
Dardel

Example run script:

#!/bin/bash

#SBATCH -A XXXX-X-XX
#SBATCH -J my_nw_job
#SBATCH -t 01:00:00
#SBATCH -p main

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=128

module load PDC/22.06
module load nwchem/7.0.2

# set scratch directory
# please note that you need to
# (1) copy your input file as input_template, and
# (2) add line "scratch_dir <<++SCRDIR++>>" to input_template
NWCHEM_SCRATCH_DIR=/cfs/klemming/scratch/${USER:0:1}/${USER}/nwchem_scratch/$SLURM_JOB_ID
mkdir -p $NWCHEM_SCRATCH_DIR
sed "s:<<++SCRDIR++>>:$NWCHEM_SCRATCH_DIR:" input_template > input

srun nwchem input > output

Note that this script edits the input template “input_template” and replaces <<++SCRDIR++>> by the actual scratch directory:

...
scratch_dir <<++SCRDIR++>>
...

Troubleshooting

A workaround for the error:

MemRegister in mem_register; err 3

is to set:

export ONESIDED_USE_UDREG=1

Disclaimer

PDC takes no responsibility for the correctness of results produced with the binaries. Always evaluate the binaries against known results for the systems and properties you are investigating before using the binaries for production jobs.