Difference between revisions of "Gaussian Job Scripts"

From UFRC
Jump to navigation Jump to search
m (Moskalenko moved page Gaussian SLURM to Gaussian Job Scripts)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The following is a sample bash submission script. It detects the CPU type of the machine on which your job runs and chooses the appropriate version of Gaussian for best performance. If OMP_NUM_THREADS is set, Gaussian will use it for the number of processors unless %nproc or %nprocshared is set in your Gaussian input file.  
+
[[Category:Software]]
 +
[[Gaussian|back to the Gaussian page]]
 +
The following is a sample job submission script for Gaussian. It loads "gaussian" module, which detects the CPU type of the machine on which your job runs and chooses the appropriate version of Gaussian for best performance. If OMP_NUM_THREADS is set, Gaussian will use it for the number of processors unless %nproc or %nprocshared is set in your Gaussian input file.  
  
'''The number of threads specified to Gaussian via either method above must be consistent with the number of processors in your resource request i.e (nodes=1:ppn=N).'''
+
'''The number of threads specified to Gaussian via either method above must be consistent with the number of processors in your resource request i.e (--cpus-per-task=N).'''
  
 
==Automatic Processor Detection==
 
==Automatic Processor Detection==
 
<source lang=bash>
 
<source lang=bash>
 
#!/bin/bash
 
#!/bin/bash
#
+
#SBATCH --job-name=gaussianjob
#PBS -r n
+
#SBATCH --output=gaussian.out
#PBS -N g09
+
#SBATCH --error=gaussian.err
#PBS -o stdout
+
#SBATCH --mail-type=ALL
#PBS -e stderr
+
#SBATCH --mail-user=YOUR-EMAIL-ADDRESS
#PBS -j oe
+
#SBATCH --time=01:00:00
#PBS -m abe
+
#SBATCH --nodes=1
#PBS -M yingsun@ufl.edu
+
#SBATCH --ntasks=1
#PBS -l nodes=1:ppn=8
+
#SBATCH --cpus-per-task=4    # number of CPU core to use
#PBS -l walltime=00:30:00
+
#SBATCH --mem-per-cpu=4000
#PBS -l pmem=2000mb
+
#SBATCH --account=YOUR-GRUOP-NAME
 +
#SBATCH --qos=YOUR-GROUP-NAME
  
 
module load gaussian
 
module load gaussian
 
cpuFamily=`grep -m 1 vendor /proc/cpuinfo | awk -F : '{print $2}'`
 
 
case "${cpuFamily}" in
 
    *GenuineIntel*)
 
        arch="em64t"
 
grep -i sse4 /proc/cpuinfo > /dev/null
 
        if [ $? -eq 0 ]
 
then
 
arch="em64t-sse4"
 
else
 
arch="em64t-c01"
 
fi
 
;;
 
    *AuthenticAMD*)
 
        arch="amd"
 
grep -i sse4 /proc/cpuinfo > /dev/null
 
        if [ $? -eq 0 ]
 
        then
 
                arch="amd-sse4"
 
else
 
arch="amd-c01"
 
fi
 
        ;;
 
    *)
 
        echo "Gaussian has no dedicated version for CPU type ${cpuFamily}."
 
        echo "Defaulting to Intel/EM64T version."
 
        arch="em64t"
 
        ;;
 
esac
 
 
source ${g09root}/$arch/bsd/g09.profile
 
 
which g09
 
 
input=YOUR_g09_input.com
 
output=YOUR_OUTPUT.log
 
 
cd $PBS_O_WORKDIR
 
 
g09 < $input > $output 
 
 
</source>
 
 
==Force Gaussian A02==
 
<source lang=bash>
 
#!/bin/bash
 
#
 
#PBS -r n
 
#PBS -N g09
 
#PBS -o stdout
 
#PBS -e stderr
 
#PBS -j oe
 
#PBS -m abe
 
#PBS -M yingsun@ufl.edu
 
#PBS -l nodes=1:ppn=8
 
#PBS -l walltime=00:30:00
 
#PBS -l pmem=2000mb
 
 
module load gaussian
 
 
cpuFamily=`grep -m 1 vendor /proc/cpuinfo | awk -F : '{print $2}'`
 
 
case "${cpuFamily}" in
 
    *GenuineIntel*)
 
        arch="em64t"
 
;;
 
    *AuthenticAMD*)
 
        arch="amd"
 
        ;;
 
    *)
 
        echo "Gaussian has no dedicated version for CPU type ${cpuFamily}."
 
        echo "Defaulting to Intel/EM64T version."
 
        arch="em64t"
 
        ;;
 
esac
 
 
source ${g09root}/$arch/bsd/g09.profile
 
  
 
which g09
 
which g09
Line 102: Line 27:
 
input=YOUR_g09_input.com
 
input=YOUR_g09_input.com
 
output=YOUR_OUTPUT.log
 
output=YOUR_OUTPUT.log
 
cd $PBS_O_WORKDIR
 
  
 
g09 < $input > $output   
 
g09 < $input > $output   
  
 
</source>
 
</source>

Latest revision as of 14:25, 30 June 2017

back to the Gaussian page The following is a sample job submission script for Gaussian. It loads "gaussian" module, which detects the CPU type of the machine on which your job runs and chooses the appropriate version of Gaussian for best performance. If OMP_NUM_THREADS is set, Gaussian will use it for the number of processors unless %nproc or %nprocshared is set in your Gaussian input file.

The number of threads specified to Gaussian via either method above must be consistent with the number of processors in your resource request i.e (--cpus-per-task=N).

Automatic Processor Detection

#!/bin/bash
#SBATCH --job-name=gaussianjob
#SBATCH --output=gaussian.out
#SBATCH --error=gaussian.err
#SBATCH --mail-type=ALL
#SBATCH --mail-user=YOUR-EMAIL-ADDRESS
#SBATCH --time=01:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4    # number of CPU core to use
#SBATCH --mem-per-cpu=4000
#SBATCH --account=YOUR-GRUOP-NAME
#SBATCH --qos=YOUR-GROUP-NAME

module load gaussian

which g09

input=YOUR_g09_input.com
output=YOUR_OUTPUT.log

g09 < $input > $output