Installation of GAMESS
This post will explain how to install GAMESS program package on CentOS. It should also work for other Linux distributions. The version of GAMESS I am using on the day of this writing is June 30, 2020 R1, which can be obtained for free from its official website. I compile GAMESS on CentOS 7 using gnu/gcc/gfortran on September 29, 2020.
Summary of GAMESS' capabilities: http://www.msg.ameslab.gov/gamess/capabilities.html
GAMESS' manual: http://www.msg.ameslab.gov/gamess/GAMESS_Manual/input.pdf
Also consult this blog to understand memory control for running GAMESS:
http://molecularmodelingbasics.blogspot.com/2009/08/gamess-memory-and-parallel_20.html
Prerequisites
1. Install gFortran and C-shell script
sudo yum install csh gcc-gfortran
2. Check version of gfortran
rpm -aq | grep gcc
E.g.
gcc-4.8.5-28.el7_5.1.x86_64
libgcc-4.8.5-28.el7_5.1.x86_64
gcc-gfortran-4.8.5-28.el7_5.1.x86_64
gcc-c++-4.8.5-28.el7_5.1.x86_64
libgcc-4.8.5-28.el7_5.1.i686
A version of gFortran I am using is 4.8.5 (recommended for Fortran 77)
3. Download GAMESS from official website
Go to http://www.msg.ameslab.gov/GAMESS/download/register/ and follow instruction there. You will receive username and password by e-mail.
I prefer you downloading the newest stable version of GAMESS. This test, I used GAMESS June 30, 2020 R1 for 64 bit (x86_64 compatible) under Linux with gnu compilers.
Download and Save it as gamess-current.tar.gz to, for example, for global installation, /usr/local/.
Uncompress an archive file and change the permission of all file under gamess folder using following commands
su
cd /usr/local/
tar xvzf gamess-current.tar.gz
chown -R root:root gamess
chmod -R g-s gamess
Now, you are ready to compile GAMESS!
=====================================================================
Step 1: Configure environment variable
cd /usr/local/gamess
./config
Then you will be asked to enter the setting for GAMESS compilation. You can follow the on screen instruction.
1. Enter to continute to GAMESS installation
2. Enter type of machine to "linux64" or which corresponds version of GAMESS that you downloaded.
3. Leave the GAMESS installation directory as the default. --> Just enter.
4. Leave the GAMESS build location as the default. --> Just enter.
5. Leave the GAMESS version number as 00. --> Just enter.
6. Enter "gfortran" for your choice of FORTRAN
7. Enter to continue to math libraries setup.
8. Enter version of gfortran, in my case, "4.8".
9. Enter "none" if you have not installed math libraries.
10. Enter to compile GAMESS src activator.
11. Wait just 1-2 seconds, then it will show you, e.g.,
gfortran -o /usr/local/gamess/tools/actvte.x actvte.f
unset echo
Source code activator was successfully compiled.
13. Enter to set up network system.
12. Enter "sockets". (You can try "mpi" if you are installing on cluster)
13. Enter "no" for LIBCHEM. Then it will show you like this
Your configuration for GAMESS compilation is now in
/usr/local/gamess/install.info
Now, please follow the directions in
/usr/local/gamess/machines/readme.unix
So far, the configuration of GAMESS environment variable is done.
=====================================================================
Step 2: Compile DDI
cd /usr/local/gamess
cd ddi
./compddi >& compddi.log
mv ddikick.x ..
cd ..
Now you are ready to compile GAMESS.
=====================================================================
Step 3: Compile GAMESS
cd /usr/local/gamess
./compall >& compall.log
When the compilation is finished, look at tail of compall.log file.
You should see "done with all compilations" there. This message confirms you that GAMESS is installed successfully.
=====================================================================
Step 4: Link GAMESS
./lked gamess 00 >& lked.log
=====================================================================
Step 5: Update the rungms script
vi rungms
Edit the following lines to read as follows
set SCR=/scratch/$USER ## Set where you want GAMESS save scratch files.
set USERSCR=/scratch/$USER/scr ## Set where you want GAMESS save user scratch files.
set GMSPATH=/usr/local/gamess ## Set where GAMESS is installed
* You should check compall.log to make sure that there is no any error occurs.
=====================================================================
Step 6: Run GAMESS and Test job
mkdir test-gamess
cp -p /usr/local/gamess/tests/standard/exam01.inp /test-gamess
cd /test-gamess
/usr/local/gamess/rungms exam01 > exam01.log
or copy the input file from below
! EXAM01.
! 1-A-1 CH2 RHF geometry optimization using GAMESS.
!
! Although internal coordinates are used (COORD=ZMAT),
! the optimization is done in Cartesian space (NZVAR=0).
! This run uses a criterion (OPTTOL) on the gradient
! which is tighter than default, but very safe.
!
! This job tests the sp integral module, the RHF module,
! and the geometry optimization module.
!
! Using the default search METHOD=STANDARD,
! FINAL E= -37.2322678015, 8 iters, RMS grad= .0264308
! FINAL E= -37.2351919062, 7 iters, RMS grad= .0202617
! FINAL E= -37.2380037239, 7 iters, RMS grad= .0013100
! FINAL E= -37.2380352917, 8 iters, RMS grad= .0007519
! FINAL E= -37.2380396312, 5 iters, RMS grad= .0001615
! FINAL E= -37.2380397693, 5 iters, RMS grad= .0000067
! FINAL E= -37.2380397698, 3 iters, RMS grad= .0000004
!
$CONTRL SCFTYP=RHF RUNTYP=OPTIMIZE COORD=ZMT NZVAR=0 $END
$SYSTEM TIMLIM=1 $END
$STATPT OPTTOL=1.0E-5 $END
$BASIS GBASIS=STO NGAUSS=2 $END
$GUESS GUESS=HUCKEL $END
$DATA
Methylene...1-A-1 state...RHF/STO-2G
Cnv 2
C
H 1 rCH
H 1 rCH 2 aHCH
rCH=1.09
aHCH=110.0
$END
! TRAVIS-CI SKIP
Calculation is expected to finish quickly and smoothly.
Moreover, you can use runall script to run all test files suggested by GAMESS developer.
Just use command
./runall 00
where 00 is version of GAMESS that I installed.
Test of GAMESS calculation would take you for a while.
After test finished, you can use checktst script to compare your results with reference output.
/usr/local/gamess/tests/standard/checktst
Here is a part of output of test checking.
...
...
...
exam44: SCFerr=0.0e+00 MP2err=0.0e+00. Passed.
exam45: Eerr=0.0e+00 B1err=0.0e+00 A1err=0.0e+00. Passed.
exam46: B1err=0.0e+00 A1err=0.0e+00. Passed.
exam47: Serr=0.0e+00 Perr=6.0e-10. Passed.
All 47 test results are correct!
Run GAMESS in serial method (1 processor)
Syntax: ./rungms input >& output.log &
For example,
./rungms exam01 >& exam01.log &
This will run gamess in serial method.
Run GAMESS in parallel method (>1 processors)
Syntax: ./rungms input Version NCPU >& output.log &
For example,
./rungms exam01 00 4 >& exam01.log &
Do not forget to add PARALL=.T.
to $SYSTEM block of input file.
This command will run games version 00 in parallel with 4 processor on 1 node.
Error
Your GAMESS calculation might fail with error about DDI. This error is caused by ddikick. If you have faced error about "DDI Process 0: error code 911" like this,
DDI Process 0: shmget returned an error.
Error EINVAL: Attempting to create 160525768 bytes of shared memory.
Check system limits on the size of SysV shared memory segments.
The file ~/gamess/ddi/readme.ddi contains information on how to display
the current SystemV memory settings, and how to increase their sizes.
Increasing the setting requires the root password, and usually a sytem reboot.
DDI Process 0: error code 911
ddikick.x: application process 0 quit unexpectedly.
ddikick.x: Fatal error detected.
The error is most likely to be in the application, so check for
input errors, disk space, memory needs, application bugs, etc.
ddikick.x will now clean up all processes, and exit...
ddikick.x: Sending kill signal to DDI processes.
ddikick.x: Execution terminated due to error(s).
You may have to increase the number of shared-memory. You can do this by replace the number of memory (in byte) using
cat /proc/sys/kernel/shmmax
to display the memory. Then try increasing it to 4GB:
echo 4294967296 > /proc/sys/kernel/shmmax
If error persists, try increasing it to 16GB:
echo 17179869184 > /proc/sys/kernel/shmmax
Then remove all relevant files of previous calculation and resubmit the job again.
=====================================================================
For optimization in GAMESS, if the SCF does not converge within 20 steps, GAMESS will stop the calculation.
You should add the following to input file.
$statpt nstep=50 opttol=0.0005 $end
nstep is to increase number of maximum step (default is 20 steps).
opttol is to loose the convergence criteria (default is 0.0001).
Rangsiman Ketkaew