This guide is intended to help PGI customers build and run the General Atomic and Molecular Electronic Structure System (GAMESS) using PGI 5.2-4 compilers on a 32-bit x86 Linux system.

Version Information
  This guide was created for the GAMESS May 14, 2004 version and PGI Release 5.2-4 pgf90 and pgcc 32-bit compilers on an x86 system running Linux.
Application Notes
  Information about GAMESS can be found at the GAMESS home page. GAMESS is maintained by the members of the Gordon research group at Iowa State University. From the GAMESS Home page:

GAMESS is a program for ab initio quantum chemistry. Briefly, GAMESS can compute SCF wave functions ranging from RHF, ROHF, UHF, GVB, and MCSCF. Correlation corrections to these SCF wave functions include Configuration Interaction, second order perturbation theory, and Coupled-Cluster approaches, as well as the Density Functional Theory approximation. Analytic gradients are available, for automatic geometry optimization, transition state searches, or reaction path following. Computation of the energy hessian permits prediction of vibrational frequencies. The chart below summarizes the program's present capabilities for obtaining wave functions, applying correlation treatments, and computing derivatives. A variety of molecular properties, ranging from simple dipole moments to frequency dependent hyperpolarizabilities may be computed. Many basis sets are stored internally, and together with effective core potentials, all elements up to Radon may be included in molecules. Several graphics programs are available for viewing of the final results. Many of the computational functions can be performed using direct techniques, or in parallel on appropriate hardware."

Obtaining the Source Code
  Information on obtaining the GAMESS source code can be found at the US Government's Ames Laboratory. The Ames lab requires you to register before downloading the source code.
  No known dependencies.
Configuration and Set-up Information
  Once unpacked, please read the enclosed documentation (*.DOC) files and the "readme.unix" file in the "misc" directory.  To build and run GAMESS, you will first need to edit several scripts (ddi/compddi, compall, comp, lked, rungms, runall). Due to license restrictions on the source code, we cannot make available pre configured versions of these files. Note that the line numbers may change with each release of GAMESS.

  1. Line 17: set the "TARGET" to "liniux-pc".
  2. Line 408,409: set "CC" to pgcc and the "CFLAGS" to "-DLINUX -fast -Mscalarsse -I./include". Remove "-Mscalarsse" for non-SSE enabled systems.
  3. Line 412: Change to 1 underscore, "-D_UNDERSCORES=1".
  1. Line 15: set the "TARGET" to "linux-pc".
  2. Line 16: replace the "/u1/mike/gamess" with the root directory of your GAMESS package.
  3. Line 34: set "CCOMP" to "pgcc".
    Note: You may need to explicitly set your PATH environment variable as well
    setenv PATH $PATH\:/usr/pgi/linux86/5.2/bin #Set to your path
  4. Add your compilation flags (ex "-fast -Mscalarsse") to the compilation of zunix (line 68). The actual  option used should match the options you use in compiling the Fortran source (See below).
  1. Line 17: set the "TARGET" to "linux-pc".
  2. Line 18: replace the "/u1/mike/gamess" with the root directory of your GAMESS package.
  3. Line 47: If you wish to use a BLAS library, i.e. "-lblas", set "BLAS3=true".
  4. Comment out lines 816 to 838 (g77 configuration)
  5. Add the following under the Portland Group compiler section (line 842):
    if ($TARGET == linux-pc) then
    setenv PATH $PATH\:/usr/pgi/linux86/5.2/bin #Set to your path
    set OPT = '-fast -Mscalarsse'
    if ($MODULE == qeigen) then
    mv qeigen.f qeigen.junk
    sed -e "s/Q-/D-/g" \
    -e "s/Q+00/D+00/g" \
    -e "s/REAL\*16/DOUBLE PRECISION/" qeigen.junk > qeigen.f
    rm -f qeigen.junk
    set echo
    # Compile in the object directory
    mv $MODULE.f object/$MODULE.f
    chdir object
    pgf90 $OPT -Mfixed -c $MODULE.f
    chdir ../
    unset echo
    Be sure to change your path to the location of the PGI compilers.

    Note that we have modified the script to build objects in the object directory to facilitate the use of IPA.  At line 1245, the scripts attempts to copy the object file from the base directory to the object directory.  Since the object file does not exist in the base directory, an error will be emitted.  You can either comment out line 1246 or ignore the error.

    Set your options as needed.  We recommend using "-fast -Mscalarsse" for SSE2 enbled systems and "-fast" for non-SSE systems.  See Known Issues for more information about known optimization issues. You can use either pgf77 or pgf90.  Remove "-Mfixed" if you prefer pgf77.

  1. Line 17: set the "TARGET" to "linux-pc".
  2. Line 18: replace the "/u1/mike/gamess" with the root directory of your GAMESS package.
  3. Line 280: set the "LDR" to either pgf77 or pgf90.
  4. Line 281: set the "LDOPTS" to the same options you used in the "comp" script and add "-lblas". We recommend using "-fast -Mscalarsse -lblas".
  5. Line 300: Add the following two lines when using the "-lblas" library:

    set BLAS=' '                      # or set BLAS='blas.o' if BLAS3=false in comp

    set LIBRARIES=' '

  6. You may also need to explicitly set your path to the compiler binaries:
    setenv PATH $PATH\:/usr/pgi/linux86/5.2/bin #Set to your path
  1. Determine where your scratch directory is located. For our testing purposes, we created a "scr" directory in the local gamess directory. Set the "SCR" variable (line 38) to this directory. Note that this should be an absolute path.
  2. In the file assignment section, you should change files starting with "~/scr" to the actual directory location. For our tests, we used the local scr directory. You'll also need to set the "ERICFMT" path.
  3. Line 260: Set the "GMSPATH" to the location of the gamess executable.
runall Change the "chdir" to the location of the gamess executable.
Building GAMESS
Steps to build GAMESS
  1. Configure your installation as described in the Configuration Section.
  2. Build the activate utility in the tools directory:
    cd tools
    cp actvte.code actvte.f
    vi actvte.f
    :%s/^\*UNX/    / <--- 4 blanks between the strokes
    pgf77 -o actvte.x actvte.f
    rm actvte.f
    cd ../
  3. Enter the "ddi" directory and type "./compddi". Copy "ddikick.x" to the main directory.
  4. Type "compall" in the main directory to compile the source.
  5. Compile the "zheev.f" file in the object directory with your options plus "-Kieee" if using >= "-O2".
    -- See Known Issues for more information about this work around.
  6. Type "lked" from the command line to link the source.
Your gamess executables are "ddikick.x" and "gamess.00.x".
Running GAMESS
  To run the 37 example data sets, use the "runall" command.  Note that exam19 will hang when GAMESS is compiled at an optimization >= "-O2" and if the "zheev.f" is not compiled using "-Kieee".  See Known Issues for more information.  Also, to run exam36 you may need to increase the maximum shared maemory size of your system. Please refer to ddi/readme.ddi for more information. The output can be found in the "examN.log" files.
Verifying Correctness
  The "TESTS.DOC" file gives a full explanation on verifying the example program's output.  The abbreviated version is as follows.  The "INPUT CARD" portion of each log file contains some expected values.  You need to search the output to see if these values match the actual output. Note that there are difference between the log file's expected answer and the "TESTS.DOC" file's expected answers.  You should use the log file's expected values.  Also, there might be slight precision variances between the actual and expected values. Precision can change depending upon your system and compiler optimization. See the Precision FAQ for more information.
Known Issues and Limitations
  The following are a list of known issues when using the PGI compilers with GAMESS.  We have included work-arounds where available.
  • Example 19 hangs during execution at >= "-O2"
    Adding "-Kieee" to the compilation options of the "zheev.f" file will allow example 19 to run successfully.  The "DLAMC1" procedure in the "zheev.f" file expects double precision values to be represented in 64-bits.   To aid performance, higher optimizations will try and keep these values in an 80-bit floating point stack register.  The problem occurs when the A and C values are compared at line 4889.  C remains in the floating point stack, is not equal to A, and causes the loop to be skipped.  C then gets truncated to 64-bits when stored to memory and is now equal to A.  Since C equals A, LBETA gets set to zero at line 4904, which causes an infinite loop at line 4945.  Adding "-Kieee" will force C to be stored, and thus truncated, before it is compared to A.
  • Incorrect results with "-fastsse" and "-Mvect"
    Prior to release 5.2-4, a bug in the vectorizer caused several of the GAMESS test cases to produce incorrect results. With 5.2-4, almost all of these errors have been fixed. Only exam25 seems to still give slightly incorrect results and is why we don't yet recommend using "-fastsse".   Vectorization is enabled using the "-Mvect=[option]" flag and is part of "-fastsse".
  • Option "-i8" should not be used
    This version of GAMESS is not compatible with the "-i8" flag.  GAMESS presumes that integers are 4 bytes.  Using the "-i8" flag makes the default integer size to 8 bytes which can cause segmentation violations when gamess.00.x executes.
  • Using "-Minline"
    Using "-Minline" with other high level optimizations such as "-fast" will cause several source files to grow too large for compilation and should not be used.
Click me