Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| hpc:numericserveruser:hpc_numericserver:batch_job_scripts:job_scripts_examples:script_gaussian [2018/08/24 17:44] – kraus | hpc:numericserveruser:hpc_numericserver:batch_job_scripts:job_scripts_examples:script_gaussian [2020/02/14 18:08] (aktuell) – kraus | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== Gaussian ====== | ||
| + | |||
| + | Launch this script shown below by typing: \\ | ||
| + | |||
| + | < | ||
| + | |||
| + | OR substitute < | ||
| + | |||
| + | < | ||
| + | |||
| + | **Remark:** | ||
| + | < | ||
| + | <span style=" | ||
| + | </ | ||
| + | \\ | ||
| + | |||
| + | <code bash jobscript_gaussian16.sh> | ||
| + | #!/bin/bash --login | ||
| + | |||
| + | ##### example for an OpenMP Gaussian run with 4 CPU | ||
| + | #$ -cwd | ||
| + | ##### please define your own job resources | ||
| + | # time in hh:mm:ss | ||
| + | #$ -l h_rt=00: | ||
| + | |||
| + | #$ -l mem_free=4G | ||
| + | # IMPORTANT: ensure that %NProcShared within | ||
| + | # gaussian input is set to same value | ||
| + | #$ -pe mp 4 | ||
| + | |||
| + | #$ -N jobname | ||
| + | #$ -e jobname_err.out | ||
| + | #$ -o jobname_stdout.out | ||
| + | #$ -j n | ||
| + | #$ -m n | ||
| + | ########## | ||
| + | |||
| + | |||
| + | # saves current directory; where output goes | ||
| + | STOREDIR=$PWD | ||
| + | NAME=$1 | ||
| + | # strip off file extension | ||
| + | COMNAME=${1/ | ||
| + | |||
| + | if [ ! -s $STOREDIR/ | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | |||
| + | |||
| + | # create temporary directory for .rwf and .chk files | ||
| + | |||
| + | # create unique tmpdir with random name | ||
| + | # | ||
| + | |||
| + | # tmpdir per job ID | ||
| + | if [ -n " | ||
| + | then | ||
| + | SCRATCHDIR=/ | ||
| + | else | ||
| + | SCRATCHDIR=/ | ||
| + | fi | ||
| + | |||
| + | # don't forget to create recursively | ||
| + | mkdir -p $SCRATCHDIR | ||
| + | |||
| + | # export location for Gaussian scratch directory | ||
| + | export GAUSS_SCRDIR=$SCRATCHDIR | ||
| + | |||
| + | |||
| + | # copy job files to tmpdir | ||
| + | |||
| + | # in case of one .chk file with same name, uncomment this | ||
| + | #if [ -e $STOREDIR/ | ||
| + | #cp $STOREDIR/ | ||
| + | #fi | ||
| + | |||
| + | # if several .chk files need to be copied | ||
| + | cp $STOREDIR/ | ||
| + | # copy the job input file | ||
| + | cp $STOREDIR/ | ||
| + | |||
| + | |||
| + | # job starts | ||
| + | |||
| + | # change to tmpdir | ||
| + | cd $SCRATCHDIR | ||
| + | # and start of job run | ||
| + | module load g16 | ||
| + | g16 < $NAME > $STOREDIR/ | ||
| + | |||
| + | # job ends | ||
| + | |||
| + | |||
| + | # gives some info about the space left on scratch | ||
| + | if [ -n " | ||
| + | then | ||
| + | df -B GB /scratch > scratch_info_${JOB_ID}_$TASK_ID.out | ||
| + | else | ||
| + | df -B GB /scratch > scratch_info_$JOB_ID.out | ||
| + | fi | ||
| + | |||
| + | |||
| + | # copy files and chdir to job directory | ||
| + | mv -f $SCRATCHDIR/ | ||
| + | |||
| + | # creation of formatted chk (if needed), use with caution for big chk files | ||
| + | # formchk $COMNAME.chk | ||
| + | |||
| + | #clean up | ||
| + | rm -fr $SCRATCHDIR | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | <WRAP rightalign> | ||
| + | date of revision: 02-14-2020 © kraus | ||
| + | </ | ||