Tuesday, August 24, 2010

Installing GAMESS on a linux PC

Probably best viewed in full screen mode

2014.02.18 Update: See this post by +Jimmy Charnley Kromann for more up-to-date instructions

Alchemist requested a post on installing GAMESS on a linux system: after all "I[f] someone can not install a program, how he/she can use it?" Fair enough.

If you have a mac or windows machine, pre-compiled versions of GAMESS is available (see this post on for installing such a version on Macs).  But if you have bought a linux computer, you do have to compile GAMESS yourself.

Three disclaimers:
(1) The post is aimed at people who want to install GAMESS on their personal computer that happens to run linux.
(2) The post is based on installing the March 25, 2010 version of GAMESS and corresponding scripts as they were distributed in mid August, 2010.  If you view this post a few years from now things may have changed.
(3) I don't have a linux PC, so the screencast is made on a shared research computer.  This affects one of the steps as I describe below, and may affect others steps that I don't know about.

The screencast assumes you have already downloaded gamess (gamess-current.tar.Z).  To download GAMESS start here and follow the instructions.  If you have problems watch the first few minutes of the screencast this post.

Here's a summary of the steps in the  screencast:

1. Unpack GAMESS: type "zcat gamess-current.tar.Z | tar -xvf -"
Now you should have a GAMESS directory.  The file gamess/misc/readme.unix has most of the instructions you need.  What follows it basically a condensed version with a few modifications.

2. In the GAMES directory: type "./config".
Follow the instructions and answer the questions.  You need to know whether you have a 32- or 64-bit chip.

3. Type "/sbin/sysctl -w kernel.shmmax=1610612736"
If you are curious about what this does, read section 5 of the file gamess/ddi/readme.ddi.
You need to be logged in as root for this to work.  I don't have root access on the machine I used, so I get an error message in the screencast.  But our system administrator had executed the command previously.

5. Change to the ddi subdirectory (gamess/ddi)Type "./compddi >& compddi.log" and then "mv ddikick.x .."

6. Go back to the gamess directory and type "./compall >& compall.log"
It will take 30-60 minutes to compile GAMESS.

7. Type  "./lked gamess 00 >& lked.log"

8. Edit the file rungms.  Here are the lines I modify or add:
set SCR=./
set USERSCR=./
set GMSPATH=./

setenv ERICFMT ./ericfmt.dat
setenv MCPPATH ./mcpdata

setenv  MAKEFP $USERSCR/$JOB.efp
setenv   GAMMA $USERSCR/$JOB.gamma
setenv   INPUT $SCR/$JOB.F05
setenv   PUNCH $USERSCR/$JOB.dat

   if ($os == Linux)   set GMSPATH=./

#  if ($NCPUS == 1) then
#     set NNODES=1
#     set HOSTLIST=(`hostname`)
#  endif
   set HOSTLIST=(`hostname`:cpus=$NCPUS)
   set NNODES=1 

#           echo I do not know how to run this node in parallel.
#           exit 20

9. Edit one line in the file runall: #chdir /u1/mike/gamess.
Type "./runall >& runall.log"

10. Go to the tools/checktst subdirectory and type "./checktst"
(Update: if the gamess directory is not in your home directory, you need to change this in the checktst file.  See this comment)

Running GAMESS in parallel
If you computer has more than one core, you may want to run GAMESS in parallel. To run exam01 on 2 cores type "./rungms exam01 00 2 >& exam01.log &"

Other useful programs and getting started with GAMESS
Now that you have GAMESS running you may want to install other useful programs such as Avogadro, GAMESSQ, and MacMolplt.
Here are some related blogposts to wet you appetite:
Building a complicated molecule with Avogadro

And here are a few blogposts on getting started with GAMESS:
Some GAMESS input basics
A typical set of GAMESS calculations

Acknowledgment: Mike Schmidt and Casper Steinmann helped with this post.

August 30, 2010 update: Alchemist has made the following page on installing GAMESS on Ubuntu 64 bit.  Be sure to check out the comments for additional useful links.

October 20, 2010:  Are you using Ubuntu 9.10 and 10.04, Linux Mint 8 and 9, Knoppix 6.2.1 or Suse 11.2? Be sure to check out this comment by Mott.


Anonymous said...

Thanks for your attention to my request.
Please see this page:
If you think it is useful, please put a link for this page too.
Best regards

Jan Jensen said...

You're welcome. Thanks for the link, which is now included on the post.

The_Shuis said...

In this website there are some scripth to install GAMESS on linux distro by only running them http://www.chemsoft.ch/qc/gamkpx.htm, I installed GAMESS in ubuntu, fedora and Centos without a problem. Thank you for this website Dr Jensen.

Rubén Fritz.

Jan Jensen said...

I had not seen this site before. Thanks very much for pointing it out to me.

Glad to hear you like the blog.

propellane said...

Thank you, Jan for good job! it's really useful for such noob as me, but when i tried to run checktst i've got the next notice:

Checking the results of your sample GAMESS calculations,
the output files (exam??.log) will be taken from /home/propellane/gamess/
All jobs terminated normally, now checking detailed numerical results
exam01: /root/gamess/tools/checktst/exam01: Команда не найдена.
exam02: /root/gamess/tools/checktst/exam02: Команда не найдена.
exam03: /root/gamess/tools/checktst/exam03: Команда не найдена.
44 job(s) got incorrect numerical results. Please examine why

Then i changed path in checktst (default GSMPATH=~/gamess) i tried ./ and . Even i took exact directory /home/propellane/gamess/tools/checktst/tools/checktst/ but i've get an get same result

exam03: /home/propellane/gamess/tools/checktst/tools/checktst/exam03: Команда не найдена.

So where is wrong? Thank you very much before for replying

P.S. Команда не найдена - Command is no found (in translation in russian)

Jan Jensen said...

The script is looking for the log files in /root/gamess/tools/checktst/.

If you are logged in as root, try loggin in as propellane instead.

I assume you have verified that your files actually are in /home/propellane/gamess/

propellane said...

Jan you are Genius thank you very much)) i did so i writed '/home/propellane/games' in GMSPATH in checktsts file then run chektsts and it work all passed)). Thank you for quick reply! Early i used PC gamess (firefly) in Windows, but now have some problems on my OpenSuSe 11.3 (problems i suppose in kernel).
About Priroda this DFT free programm maybe its not strong ab initio programm, but it gives great results with organic compounds especially carbocation also it give correct nmr shift. I used it as black box, count some parent ethalon structures and then my structures. i can give some info maybe youllbe interested http://www.qchem.ru/f/kvantovo-khimicheskie-programmy/kvantovo-khimicheskaya-programma-priroda/ -There are some english publications

P.S. Waiting your new greate posts

Unknown said...

Great post, and superb blog to start fiddling with GAMESS. Just note that linux kernels above 2.6.28 to 2.6.32 will give an error in exam32, as pointed out here: http://www.chemsoft.ch/qc/ubuntumake.htm

I think it is worth to make a short mention of this in the text, since many popular distributions (Ubuntu 9.10 and 10.04, Linux Mint 8 and 9, Knoppix 6.2.1 or Suse 11.2) have included this faulty kernels until recently and probably there are still users running them. They should be aware of this problem (to avoid them scratching their heads for hours wondering what went wrong)and should be encouraged to upgrade their distribution to the latest version -or at least upgrade the kernel to a higher version (>=2.6.33).

Well, thanks for your work!

Jan Jensen said...

Thank you very much for this info. I have added a link to your comment on the post.

I am happy to hear you like the blog.

A.may said...

I type the following command to run exem45.inp on 4 core type(I have a quad core processor):
gamess@linux-84wt:~/gamess> ./rungms exam45 00 4 >& exam45.log &
I got
[2] 5335
[1] Done ./rungms exam45 00 2 >&exam45.log
The log files and like this:
unset echo
.//ddikick.x .//gamess.00.x exam45 -ddi 1 4 linux-84wt:cpus=4 -scr ./

Distributed Data Interface kickoff program.
Initiating 4 compute processes on 1 nodes to run the following command:
.//gamess.00.x exam45

TCP connect error: ENETUNREACH.
DDI Process 1: error code 911
TCP: Connect failed. linux-84wt -> localhost:36474.
ddikick.x: application process 1 quit unexpectedly.
ddikick.x: Fatal error detected.
The error is most likely to be in the application, so check for
DDI Process 0: error code 911
DDI Process 0: TCP Error in Recv.
TCP recv error: Unknown.
TCP recv error: return value errno=-97851104
DDI Process 2: terminated upon request.
DDI Process 3: terminated upon request.
ddikick.x: Sending kill signal to DDI processes.
ddikick.x: Execution terminated due to error(s).
unset echo
----- accounting info -----
Files used on the master node linux-84wt were:
-rw-r--r-- 1 gamess users 2197 oct 30 22:41 .//exam45.F05
-rw-r--r-- 1 gamess users 2197 oct 30 22:36 .//exam45.inp
-rw-r--r-- 1 gamess users 4509 oct 30 22:41 .//exam45.log
sam oct 30 22:41:46 CET 2010
0.132u 0.048s 0:01.22 13.9% 0+0k 0+0io 0pf+0w
I think that isn’t work properly, sir any help is appreciate

May abdelghani

Jan Jensen said...

I am not sure what the problem is. I suggest posting your question on the google GAMESS list.

When you post the question there, add more details, like whether exam45 is the only one you have problem with, and if it runs ok on 1 node, etc.

A.may said...

It’s Ok with 2 core… with "./rungms exam45.inp 00 2 >& exam45.log &" I got a normal termination.

hir said...

Dear Freinds

I just installed GAMESS and i got the following errors

exam27: sed: -e expression #1, char 3: invalid usage of line address 0
sed: -e expression #1, char 3: invalid usage of line address 0
Eerr=9.1e+00 Verr=2.9e-02. !!FAILED.
exam28: Eerr=9.0e+00. !!FAILED.
exam29: Eerr=2.3e+02. !!FAILED.
exam30: Eerr=1.7e+02 Gerr=8.2e-03. !!FAILED.
exam31: Eerr=1.2e+02 Gerr=3.3e-06 Ierr=7.9e-03. !!FAILED.
exam32: Eerr=1.3e+02 Terr=1.4e-02. !!FAILED.
exam33: Eerr=9.3e+01 Gerr=4.5e-02. !!FAILED.
exam34: Eerr=1.1e+02 Gerr=2.6e-02. !!FAILED.
exam35: Eerr=2.3e+03. !!FAILED.
exam36: Eerr=7.8e+01 Werr=3.2e+02 Ierr=1.1e+00. !!FAILED.
exam37: Eerr=2.2e+02 Gerr=2.7e-02. !!FAILED.
exam38: Eerr=1.2e+02 Gerr=1.0e-07. !!FAILED.
exam39: RIerr=1.2e+02 HRIerr=9.8e+02. !!FAILED.
exam40: E1err=3.9e+01 E2err=3.9e+01 RMSerr=4.0e-06 !!FAILED.
exam41: EXCerr=8.5e+00 eV, Gerr=1.1e-01, OSCerr=9.3e-02. !!FAILED.
exam42: Eerr=9.2e+01 Gerr=2.7e-02. !!FAILED.
exam43: HEATerr=1.8e+01 kcal/mol. !!FAILED.
exam44: SCFerr=6.0e+02 MP2err=6.0e+02. !!FAILED.
Only 0 out of 44 examples terminated normally.

thank You Hiruy

Jan Jensen said...

No idea what went wrong. I suggest posting to GAMESS mailing list with as many details about the installation, operating system, etc. as possible.

Anonymous said...

Thanks for this compilation.

There is another needed step -- linked to propellane's problem above -- if your gamess installation does not reside in $HOME/gamess: the script checktst in tools/checktst must be edited to set GMSPATH to the correct path.


Jan Jensen said...

Thanks very much for your comment. I have updated the post accordingly.

Unknown said...

A little tip:

On most linux PCs, you can make the "/sbin/sysctl -w kernel.shmmax=1610612736" command permanent, by adding the line

"kernel.shmmax = 1610612736"

to the file: /etc/sysctl.conf

Anonymous said...

Heroy make sure all the "/mike" directories are changed to your home.

also the /cu/mike


Sidney Ramos Santana said...

Dear Jan H. Jensen and Gamess Users,

I am trying to install Gamess on GPU in a computer with:

S.O.: Linux - Ubuntu 11.04
Video Cards: 2 [GTX580 3GB/card]
Kernel version: 2.6.38-12 (x86_64)
Processor: i7 X 990 @ 3.47GHz
Intel Compilers Version: 12.0.5

I am also installed :

Cuda toolkit + SDK Version: 4.1 rc2 (release candidate)
Math Library: Atlas (from Ubuntu Repository)
Boost Version: 1.48.0
Cheetah Version: 2.4.4
HDF5 Version: 1.8.8
MPICH2 Version: 1.4.1p1

PS: All the addons above were installed using intel compiler.

The compilation procedure is running very well without any kind of

But, the linking procedure is yielding the following error just in the
rhfuhf subroutine:

Choices for some optional plug-in codes are
Using qmmm.o, Tinker/SIMOMM code is not linked.
Using vbdum.o, neither VB program is linked.
Using neostb.o, Nuclear Electron Orbital code is not linked.

message passing libraries are
../ddi/libddi.a -L/opt/mpich2_hydra/lib -lmpich -lmpl -lrt -lpthread

other libraries to be searched are
-L/usr/lib64/atlas -lblas -latlas

Linker messages (if any) follow...
rhfuhf.o: In function `rhfcl_':
rhfuhf.f:(.text+0x45ed): undefined reference to `molecule_new_gamess_'
rhfuhf.f:(.text+0x4604): undefined reference to `basis_new_gamess_'
rhfuhf.f:(.text+0x461b): undefined reference to `basis_sort_'
rhfuhf.f:(.text+0x4697): undefined reference to `hf_fock_'
rhfuhf.o: In function `cchem_hf_fock_':
rhfuhf.f:(.text+0x11c04): undefined reference to
rhfuhf.f:(.text+0x11c2d): undefined reference to `basis_new_gamess_'
rhfuhf.f:(.text+0x11c56): undefined reference to `basis_sort_'
rhfuhf.f:(.text+0x11cab): undefined reference to `hf_fock_'

Unfortunately, there was an error while linking GAMESS.
Please take a look in my install.info file bellow:

# compilation configuration for GAMESS.GPU
# generated on langmuir
# generated at Sex Set 9 21:46:38 BRT 2011
setenv GMS_PATH /opt/gamess.gpu
# machine type
setenv GMS_TARGET linux64
# FORTRAN compiler setup
setenv GMS_FORTRAN ifort
# mathematical library setup
setenv GMS_MATHLIB atlas
setenv GMS_MATHLIB_PATH /usr/lib64/atlas
# parallel message passing model setup
setenv GMS_DDI_COMM mpi
setenv GMS_MPI_PATH /opt/mpich2_hydra
setenv GMS_MPI_LIB mpich2


Please could anyone help me ?

Happy new year.

Best regards,

Sidney R. Santana

propellane said...

Dear Jan please post how to compale (especially edit rungms) last US GAMESS 1 may 2012 on Linux. I tryed all but it stil dont work. Thank you before. I think many Gamess Users support me:)

Best regards

rituparna said...

I want to know is it possible to calculate only electronic contribution to the electrostatic potential ( i.e., not the total ) on a particular atomic coordinate in GAMESS?

rituparna said...

how to do it?

Anonymous said...

if you install GAMESS on personal computer. To avoid timeout error from DDI, a quick fix is to edit the line in the rungms file as

if ($NCPUS == 1) then
set NNODES=1
## set HOSTLIST=(`hostname`)
set HOSTLIST= ## is just this PC

Unknown said...

Command - sudo /usr/local/gamess/rungms exam01.inp

----- GAMESS execution script 'rungms' -----
This job is running on host work
under operating system Linux at Thu Sep 19 10:09:57 UTC 2019
Available scratch disk space (Kbyte units) at beginning of the job is
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda2 15419956 2761756 11989780 19% /
GAMESS temporary binary files will be written to /tmp
GAMESS supplementary output files will be written to /tmp
Copying input file exam01.inp to your run's scratch directory...
cp exam01.inp /tmp/exam01.F05
unset echo
/usr/local/gamess/ddikick.x /usr/local/gamess/gamess.00.x exam01 -ddi 1 1 work -scr /tmp

Distributed Data Interface kickoff program.
Initiating 1 compute processes on 1 nodes to run the following command:
/usr/local/gamess/gamess.00.x exam01

ddikick.x: Timed out while waiting for DDI processes to check in.
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).
unset echo
----- accounting info -----
Files used on the master node work were:
-rw-r--r-- 1 root root 1163 Sep 19 10:09 /tmp/exam01.F05
ls: No match.
ls: No match.
ls: No match.
Thu Sep 19 10:10:58 UTC 2019
0.0u 0.0s 1:01.11 0.0% 0+0k 0+8io 0pf+0w

Error -
ddikick.x: Timed out while waiting for DDI processes to check in.
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).
unset echo