31 авг. 2012 г.

Установка GAMESS на CentOS 6.2

Тут вкратце будет описан процесс установки программы GAMESS на кластер под системой CentOS 6.2 и подобных.
Для установке необходимы установленные Intel MPI Library, Intel Fortran, Intel C++.
После распаковки архива

tar -zxvf gamess.tar.gz

заходим в папка gamess, после чего выполняем скрипт ./config, где отвечаем на вопросы о своей системе:
======================================================================
   GAMESS can compile on the following 32 bit or 64 bit machines:
axp64    - Alpha chip, native compiler, running Tru64 or Linux
cray-xt  - Cray's massively parallel system, running CNL
hpux32   - HP PA-RISC chips (old models only), running HP-UX
hpux64   - HP Intel or PA-RISC chips, running HP-UX
ibm32    - IBM (old models only), running AIX
ibm64    - IBM, Power3 chip or newer, running AIX or Linux
ibm64-sp - IBM SP parallel system, running AIX
ibm-bg   - IBM Blue Gene (P or L model), these are 32 bit systems
linux32  - Linux (any 32 bit distribution), for x86 (old systems only)
linux64  - Linux (any 64 bit distribution), for x86_64 or ia64 chips
           AMD/Intel chip Linux machines are sold by many companies
mac32    - Apple Mac, any chip, running OS X 10.4 or older
mac64    - Apple Mac, any chip, running OS X 10.5 or newer
sgi32    - Silicon Graphics Inc., MIPS chip only, running Irix
sgi64    - Silicon Graphics Inc., MIPS chip only, running Irix
sun32    - Sun ultraSPARC chips (old models only), running Solaris
sun64    - Sun ultraSPARC or Opteron chips, running Solaris
win32    - Windows 32-bit (Windows XP, Vista, 7, Compute Cluster, HPC Edition)
win64    - Windows 64-bit (Windows XP, Vista, 7, Compute Cluster, HPC Edition)
    type 'uname -a' to partially clarify your computer's flavor.
please enter your target machine name: linux64

======================================================================
Where is the GAMESS software on your system?
A typical response might be /u1/mike/gamess,
most probably the correct answer is /share/soft/gamess

GAMESS directory? [/share/soft/gamess]

Жмем enter, если не хотим менять месторасположение
======================================================================
Setting up GAMESS compile and link for GMS_TARGET=linux64
GAMESS software is located at GMS_PATH=/share/soft/gamess

Linux offers many choices for FORTRAN compilers, including the GNU
compiler set ('g77' in old versions of Linux, or 'gfortran' in
current versions), which are included for free in Unix distributions.

There are also commercial compilers, namely Intel's 'ifort',
Portland Group's 'pgf77', and Pathscale's 'pathf90'.  The last
two are not common, and aren't as well tested as the others.

type 'rpm -aq | grep gcc' to check on all GNU compilers, including gcc
type 'which gfortran' to look for GNU's gfortran (a very good choice),
type 'which g77'      to look for GNU's g77,
type 'which ifort'    to look for Intel's compiler,
type 'which pgf77'    to look for Portland Group's compiler,
type 'which pathf90'  to look for Pathscale's compiler.
Please enter your choice of FORTRAN: ifort

Use of 'ifort' requires additional information since library
names, and compiler flags, are very version number specific.
note: ifort's directory tree is typically
         /opt/intel/fc
         /opt/intel/fce
         /opt/intel/Compiler
         /opt/intel/composerxe-2011   (et cetera).

Type 'which ifort' and note the version number in the reply.
Enter only the main version number, such as 8, 9, 10, 11, 12.
In case of the newer 'composerxe' bundles, the version is not
the year, but can be obtained by 'ifort -V'.
Version? 12

Писать сюда полную версию типа 12.1.3 или 12.0.1 не стоит, работать не будет
======================================================================
Linux distributions do not include a standard math library.

There are several reasonable add-on library choices,
       MKL from Intel           for 32 or 64 bit Linux (very fast)
      ACML from AMD             for 32 or 64 bit Linux (free)
     ATLAS from www.rpmfind.net for 32 or 64 bit Linux (free)
and one very unreasonable option, namely 'none', which will use
some slow FORTRAN routines supplied with GAMESS.  Choosing 'none'
will run MP2 jobs 2x slower, or CCSD(T) jobs 5x slower.

Some typical places (but not the only ones) to find math libraries are
Type 'ls /opt/intel/mkl'                 to look for MKL
Type 'ls /opt/intel/Compiler/mkl'        to look for MKL
Type 'ls /opt/intel/composerxe-2011/mkl' to look for MKL
Type 'ls -d /opt/acml*'                  to look for ACML
Type 'ls /usr/lib64/atlas'               to look for Atlas

Enter your choice of 'mkl' or 'atlas' or 'acml' or 'none': mkl

======================================================================
The exact MKL libraries needed depend on its version number.
First, where is your MKL software installed?  For example
            /opt/intel/mkl                    -or-
            /opt/intel/Compiler/mkl           -or-
            /opt/intel/composerxe-2011/mkl    -or-
            /your/sites/nonstandard/path/mkl
Don't enter anything past the mkl subdirectory pathname.
MKL pathname? /share/intel/mkl
Second, it is possible to have multiple version of MKL
installed, but often there is only one version installed.
Your system seems to have the following version(s):
benchmarks  bin  examples  include  interfaces  lib  tests  tools
a) If the above output contains one or more version number,
enter the specific version you prefer, giving all decimals.
b) If the above output contains paths like 'bin' and 'lib',
enter the word 'skip' next.
MKL version (or 'skip')? skip

======================================================================
Далее выведется информация подобная этой 

Math library 'mkl' will be taken from /share/intel/mkl/lib/intel64

please hit <return> to compile the GAMESS source code activator
======================================================================
Далее будет скомпилирован файл активации, не знаю зачем он нужен, но без него ничего не работает :)

ifort -o tools/actvte.x actvte.f
ifort: Command not found.
unset echo
Source code activator was successfully compiled.

please hit <return> to set up your network for Linux clusters.

Файл actvte.x скомпилирован, теперь жмем enter и движемся дальше

======================================================================
If you have a slow network, like Gigabit Ethernet (GE), or
if you have so few nodes you won't run extensively in parallel, or
if you have no MPI library installed, or
if you want a fail-safe compile/link and easy execution,
     choose 'sockets'
to use good old reliable standard TCP/IP networking.

If you have an expensive but fast network like Infiniband (IB), and
if you have an MPI library correctly installed,
     choose 'mpi'.

communication library ('sockets' or 'mpi')? mpi

Выбрали mpi, далее он попросит выбрать тип этого самого MPI
======================================================================
The MPI libraries which work well on linux64/Infiniband are
      Intel's MPI (impi)
      MVAPICH2
      SGI's mpt from ProPack, on Altix/ICE systems
Other libraries may work, please see 'readme.ddi' for info.
The choices listed above will compile and link easily,
and are known to run correctly and efficiently.

Enter 'sockets' if you just changed your mind about trying MPI.

Enter MPI library (impi, mvapich2, mpt, sockets): impi

======================================================================
MPI can be installed in many places, so let's find impi
The person who installed your MPI can tell you where it really is.

impi     is probably located at a directory like
              /opt/intel/impi/3.2
              /opt/intel/impi/4.0.1.007
              /opt/intel/impi/4.0.2.003
         include the version numbers in your reply below.
mvapich2 could be almost anywhere, perhaps some directory like
              /usr/mpi/gcc/mvapich2-1.2p1
openmpi  could be almost anywhere, perhaps some directory like
              /usr/mpi/openmpi-1.4.3
mpt      is probably located at a directory like
              /opt/sgi/mpt/mpt-1.26
Please enter your MPI's location: /opt/intel/impi/4.0.3

======================================================================
Вот так, конфигурация закончилась, и у нас появился файл install.info, который приблизительно должен выглядеть вот так:

#!/bin/csh
#   compilation configuration for GAMESS
#   generated on tisnum-head1.cluster
#   generated at Fri Aug 31 15:43:18 MSK 2012
setenv GMS_PATH            /share/soft/GAMESS/gamess
#         machine type
setenv GMS_TARGET          linux64
#         FORTRAN compiler setup
setenv GMS_FORTRAN         ifort
setenv GMS_IFORT_VERNO     12
#         mathematical library setup
setenv GMS_MATHLIB         mkl
setenv GMS_MATHLIB_PATH    /share/intel/mkl/lib/intel64
setenv GMS_MKL_VERNO       12
#         parallel message passing model setup
setenv GMS_DDI_COMM        mpi
setenv GMS_MPI_LIB         impi
setenv GMS_MPI_PATH        /opt/intel/impi/4.0.3

После того, как конфигурация прошла успешно, заходим в ddi/ и слегка изменяем скрипт compddi, а именно, определяем максимальное число процессоров на узле и максимальное число узлов


set MAXCPUS  = 32
set MAXNODES = 256


запускаем скрипт 

./compddi

После успешной работы скрипта получаем на выходе библиотеку libddi.a, которая нам понадобится.
Далее переходим в обратно и запускаем скрипт 

./compall

который нам скомпилирует нашу программу. Это займет примерно 30 минут времени.
После того, как компилирование завершилось, запускаем 

./lked

который прилинкует все необходимые библиотеки и создаст файл gamess.00.x, который, непосредственно и будет запускаемым файлом.

Но этого мало, чтобы корректно запускать GAMESS нужно отредактировать файл rungms непосредственно под свою систему, потому что запуск программы будет запускаться только через скрипт rungms. Как это сделать каждый решается сам. У меня это заняло 2-3 дня , чтобы привести скрипт rungms к надлежащему виду для запуска.
Удачи!

1 комментарий:

  1. Спасибо.Для последних версий GAMESS 2019 и ubunty 18.o4 что изменить?

    ОтветитьУдалить