Modified from the excellent tutorial Building the GAMESS with Intel® Compilers, Intel® MKL and Intel® MPI on Linux for OpenMPI which is
The prerequisites Software
- Intel® C++ Compiler for LINUX,
- Intel® Fortran Compiler for LINUX,
- Intel® MKL,
- OpenMPI for Linux.
Platform:
- IA64/x86_64.
Installing the Prerequisites
- If you are eligible for the Intel Compiler Free Download. Download the Free Non-Commercial Intel Compiler Download
- Compile Intel Compilers with OpenMPI. See Building OpenMPI with Intel Compiler. Make sure your pathing are properly written and sourced.
Intel Environment setup
I created a intel.sh script inside /etc/profile.d/ and put the following information inside
# cd /etc/profile.d # touch intel.sh # vim intel.sh
Edit the following
export INTEL_COMPILER_TOPDIR="/opt/intel/Compiler/11.1/069" . $INTEL_COMPILER_TOPDIR/bin/intel64/ifortvars_intel64.sh . $INTEL_COMPILER_TOPDIR/bin/intel64/iccvars_intel64.sh
Building the Application
1. Copy/move tar file gamess-current.tar.gz to the directory /opt
2 .Uncompress the tar file
# tar -zxvf gamess-current.tar.tar
3. Go to the gamess directory
# cd gamess
4. Creating actvte.x file
# cd tools # cp actvte.code actvte.f # Replace all "*UNX" by " "(4 spaces with out " ") in the file actvte.f # ifort -o actvte.x actvte.f # rm actvte.f # cd ..
5. Building the Distributed Data Interface(DDI) with OpenMPI:
# cd ddi # vim compddi
5a. Editing the compddi file
## Set machine type (approximately line 18): ## set TARGET=linux-ia64 ## Set MPI communication layer (approximately line 48): ## set COMM = mpi ## Set include directory for OpenMPI (approximately line 105): ## ## where is mpi header "mpi.h" is located ## set MPI_INCLUDE_PATH = '-I/usr/mpi/intel/include'
5b. Compile compddi with OpenMPI
## Build DDI with OpenMPI ## # ./compddi # cd ..
If building completed successfully then library libddi.a will appear. Otherwise check compddi.log for errors.
6. Compiling the GAMESS:
6a. Editing file comp
vim comp
## Set machine type (approximately line 15): ## set TARGET=linux-ia64 ## Set the GAMESS root directory (approximately line 16): ## chdir /opt/gamess ## Uncomment (approximately line 1461): ## setenv MKL_SERIAL YES
6b Editing file compall
## Set machine type (approximately line 16): ## set TARGET=linux-ia64 ## Set the GAMESS root directory (approximately line 17): ## chdir /opt/gamess ## Set to use Intel® C++ Compiler (approximately line 70): ## if ($TARGET == linux-ia64) set CCOMP='icc'
6c Compiling the GAMESS:
# ./compall # cd ..
7. Liniking the GAMESS with Intel® Software products:
7a Edit the file lked
## Set machine type (approximately line 18): ## set TARGET=linux-ia64 ## Set the GAMESS root directory (approximately line 19): ## chdir /opt/games ## Check the MKL environment (approximately line 511) is correct: for (x86_64)## setenv setenv MKLPATH `ls -d /opt/intel/mkl/*/lib/em64t` set mklver=`ls /opt/intel/mkl` ## Set the message passing libraries in a single line (approximately line 710): ## set MSG_LIBRARIES='../ddi/libddi.a -L/usr/local/lib -lmpi -lpthread'
7b Link the GAMESS
# ./lked
If linking completed successfully then executable file gamess.00.x will appear
8. Running the Application
8 Running the Application :
This section below describes how to execute GAMESS with Intel and OpenMPI. For further information check file ./ddi/readme.ddi.
For the testing GAMESS will be used script rungms as the base.
8a
## Set the target for execution to mpi (line 59): ## set TARGET=mpi ## Set a directory SCR where large temporary files can reside(line 60): ## set SCR=/scratch ## Correct the setting environment variables ERICFMT and MCPPATH (lines 127and 128): ## setenv ERICFMT /opt/gamess/ericfmt.dat setenv MCPPATH /opt/gamess/mcpdata ## Replace all “~$USER” by “/opt/gamess/tests”. Or by other directory. ## ## NOTE: Directory /scratch should exist. If no then create it. ## ## Replace all “/home/mike/gamess” by “/opt/gamess”. ## ## Correct the environment variables for Intel® MKL and OpenMPI (lines 948 and 953): ## setenv LD_LIBRARY_PATH /opt/intel/mkl/10.2.4.032/lib/em64t $LD_LIBRARY_PATH setenv LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH. ## Correct setting environment variables to execution OpenMPI path (line 954): ## set path=(/usr/local/bin $path)
Now choose the testcase from directory ./tests and run GAMESS.
$./rungms exam08
The output data will be stored in the directory /scratch.
To execute GAMESS on 2 or more processes on 1 node:
$ ./rungms exam08 00 2
Thank you for the great post. I was able to compile and link GAMESS with openMPI, however I am having issues with ‘rungms’ script, mostly because it is bloated with code lines not pertinent to my system and I am not good with C-shell scriptimg. I have a personal workstation with 8 cores (so basically one node) running on Ubuntu 12.04 64-bit. I am getting an error about NNODES being undefined… I am wondering can you please post the entire ‘rungms’ script that would be applicable for my system. Thanks again!
LikeLike