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
54 lines
1.1 KiB
Bash
Executable File
54 lines
1.1 KiB
Bash
Executable File
#!/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
|
|
|