* Committed: Original user-invocable "g09slurm" from Wahab

and the "g09.slurm" backend script.

  Signatures:
    # -rwxr-xr-x 1 wpurwant users  394 2020-09-10 01:06:20 g09.slurm
    # -rwxr-xr-x 1 wpurwant users 1120 2019-09-16 15:24:20 g09slurm
    # 387f828b04454678b23b05af61e4f334  g09.slurm
    # 9ee4bfcfad766165a81239cb13d7ef30  g09slurm
    # e0dbc8b24aeecbbecf7255a3e3f84dc3fc3a422f  g09.slurm
    # d5a33e554766c41f17f6839242c5c7f4d60e7fe4  g09slurm

  g09.slurm is originally located at
  /cm/shared/apps/gaussian/g09revD.01/script/g09/script/g09.slurm
master
Min Dong 5 years ago committed by Wirawan Purwanto
parent 19c833c3ff
commit 19eacfbf54
  1. 18
      turing/calculations/g09/g09.slurm
  2. 53
      turing/calculations/g09/g09slurm

@ -0,0 +1,18 @@
#!/bin/tcsh
setenv g09root /cm/shared/apps/gaussian/g09revD.01
if ($?USETMPFS ) then
setenv tmpG09 /tmp/${SLURM_JOB_NAME}.o${SLURM_JOB_ID}.tmp
else
setenv tmpG09 /${SLURM_SUBMIT_DIR}/${SLURM_JOB_NAME}.o${SLURM_JOB_ID}.tmp
endif
mkdir $tmpG09
setenv GAUSS_SCRDIR $tmpG09
source $g09root/g09/bsd/g09.login
g09 < $1
rmdir --ignore-fail-on-non-empty $tmpG09

@ -0,0 +1,53 @@
#!/bin/bash
if [ $# -lt 1 ]; then
echo "Error: Missing Gaussian G09 input file"
exit -1
fi
if [ $# -lt 2 ]; then
echo "Error: require a filename for Gaussian G09 output"
exit -1
fi
if [ ! -r $1 ]; then
echo "Error: Unable to open Gaussian G09 input file"
exit -1
fi
input_file=$1
output_file=$2
begin_date=$3
ncpus=$(grep -w nprocshared ./$1|awk '{print gensub("%nprocshared=","","G")}'|grep -v !)
if [ -z "$ncpus" ]; then
ncpus=$(grep -w nproc ./$1|awk '{print gensub("%nproc=","","G")}'|grep -v !)
fi
if [ -z "$ncpus" ]; then
ncpus=1
fi
if [ -z "$begin_date" ]; then
begin_date=now
fi
if [ -f "$output_file" ]; then
read -p "Output file $output_file already exists, do you want overwrite? [N/y]" confirm
if [ "$confirm" = "y" ]; then
> "$output_file"
fi
fi
#--partition=phi \
/shared/apps/common/slurm/current/bin/sbatch \
--job-name=G09-$input_file \
--ntasks=1 \
--cpus-per-task=$ncpus \
--output=$output_file \
--begin=$begin_date \
/cm/shared/apps/gaussian/g09revD.01/script/g09/script/g09.slurm $input_file
Loading…
Cancel
Save