Module Gaussian16
Gaussian 16 is a licensed software and your user needs to be explicitly allowed to run Gaussian 16. Please reach out to tsresearch@vcu.edu to request the permissions to run Gaussian 16.
Contents |
|---|
Interactive job
Open an interactive session to a compute node. Adjust the number of CPUs (--cpus-per-task 1) and the amount of memory (--mem 8G) needed for your job. Increase the number of --cpus-per-task only when using code that can run in parallel.
srun --cpus-per-task 1 --mem 8G --pty bashLoad the Gaussian16 module:
module load gaussian16/C.01When loading the Gaussian 16 module, a scratch folder will be automatically created in /tmp/g16_scratch_yourusername
Prepare your .com input file. As an example, here is water.com (Important: there must be two blank lines at the end of the file, otherwise Gaussian 16 won't run):
water.com
# SP, RHF/STO-3G punch=archive trakio scf=conventional
Gaussian Test Job 00
Water with archiving
0 1
O
H 1 0.96
H 1 0.96 2 109.471221
Run Gaussian 16:
g16 < water.com >> Gaussian16_interactive.OUT.log
[user@athena1 ~]$ srun --cpus-per-task 1 --mem 8G --pty bash ## start on the head node
[user@athena201 ~]$ module load gaussian16/C.01 ## now on a compute node
[user@athena201 ~]$ g16 < water.com >> Gaussian16_interactive.OUT.log
[user@athena201 ~]$ tail Gaussian16_interactive.OUT.log
5,0.\PG=C02V [C2(O1),SGV(H2)]\\@
The archive entry for this job was punched.
Cherishing children is the mark of a civilized society.
-- Joan Ganz Cooney
Job cpu time: 0 days 0 hours 0 minutes 0.5 seconds.
Elapsed time: 0 days 0 hours 0 minutes 0.5 seconds.
File lengths (MBytes): RWF= 6 Int= 1 D2E= 0 Chk= 1 Scr= 1
Normal termination of Gaussian 16 at Wed Nov 29 17:04:55 2023.
[user@athena201 ~]$ exit ## leave the compute node
exit
[user@athena1 ~]$ ## now back on the head nodeBatch Job
Prepare your .com input file. As an example, here is water.com (Important: there must be two blank lines at the end of the file, otherwise Gaussian 16 won't run):
water.com
# SP, RHF/STO-3G punch=archive trakio scf=conventional
Gaussian Test Job 00
Water with archiving
0 1
O
H 1 0.96
H 1 0.96 2 109.471221
Create the Slurm job script file. Adjust the number of CPUs (--cpus-per-task 1) and the amount of memory (--mem 8G) needed for your job. Increase the number of --cpus-per-task only when using code that can run in parallel.
Gaussian16_slurm_script.sh
#!/bin/bash
#SBATCH --job-name Gaussian16_job
#SBATCH --output Gaussian16_job_output.log
#SBATCH --error Gaussian16_job_error.log
#SBATCH --cpus-per-task=1
#SBATCH --mem 8G
module load gaussian16/C.01
g16 < water.com >> Gaussian16_job_output.logSubmit the job to Slurm:
sbatch Gaussian16_slurm_script.shMonitor the execution of your job in the Slurm queue:
squeue -u $USERThe job may show up in the queue as running (R) or pending (PD). When the job completes, it will disappear from the queue and you can check the output.
[user@athena1 ~]$ sbatch Gaussian16_slurm_script.sh
Submitted batch job 400
[user@athena1 ~]$ squeue -u $USER
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## JOBID 400 completed and exited the queue
[user@athena1 ~]$ tail Gaussian16_job_output.log
The archive entry for this job was punched.
A true friend is someone who is there for
you when he'd rather be anywhere else.
-- Len Wein
Job cpu time: 0 days 0 hours 0 minutes 0.5 seconds.
Elapsed time: 0 days 0 hours 0 minutes 0.5 seconds.
File lengths (MBytes): RWF= 6 Int= 1 D2E= 0 Chk= 1 Scr= 1
Normal termination of Gaussian 16 at Wed Nov 29 13:34:39 2023.
Multithreaded (SMP) Job
Prepare your .com input file. As an example, here is morphine.com (Important: there must be two blank lines at the end of the file, otherwise Gaussian 16 won't run), which will use up to 8 processors with shared memory:
Create the Slurm job script file. Adjust the number of CPUs (--cpus-per-task 8) and the amount of memory (--mem 32G) needed for your job. Increase the number of --cpus-per-task only when using code that can run in parallel.
Gaussian16_slurm_script.sh
#!/bin/bash
#SBATCH --job-name Gaussian16_job
#SBATCH --output Gaussian16_job_output.log
#SBATCH --error Gaussian16_job_error.log
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=8
#SBATCH --mem 32G
module purge
module load gaussian16/C.01
g16 < morphine.com >> Gaussian16_job_output.logMonitor the execution of your job in the Slurm queue:
squeue -u $USERThe job may show up in the queue as running (R) or pending (PD). When the job completes, it will disappear from the queue and you can check the output.
[user@athena1 ~]$ sbatch Gaussian16_slurm_script.sh
Submitted batch job 405
[user@athena1 ~]$ squeue -u $USER
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## Job is running with JOBID 405
405 cpu Gaussian user R 0:03 1 athena213
[user@athena1 ~]$ squeue -u $USER
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## JOBID 405 completed and exited the queue
[user@athena1 ~]$ tail Gaussian16_job_output.log
The archive entry for this job was punched.
The chemist is a guest at the physicist's table and
frequently dines well.
-- Richard Bersohn
Job cpu time: 0 days 0 hours 4 minutes 39.0 seconds.
Elapsed time: 0 days 0 hours 0 minutes 35.9 seconds.
File lengths (MBytes): RWF= 94 Int= 0 D2E= 0 Chk= 11 Scr= 1
Normal termination of Gaussian 16 at Wed Nov 29 18:36:30 2023.