Menu

Compilation

Gerald Mathias Magnus

1) Compiling iffi

Choose an architecture file from ARCHITECTURES and compile, e.g.

make ARCH=LINUX_GNU_SEQ

The latest architecture is stored in the file '.LASTARCH' and is used until is
is set to something else. The 'make' process generates a
directory

./build/<arch><hostname></hostname></arch>

in which a custom makefile is constructed for compilation.

targets: |
-------------|---
[iffi] | MD executable
[xpl2lis] | build simulation system from .psf and .pdb files
[lis2xml] | convert ego input (lis) to iffi format
[nma] | support for normal mode analysis
[mgcHessian] | analysis of a Hessian
[samplingspeed] | a tool to measure the sampling in configuration space
all | all of the above executables
clean | clean up

The default target is the MD executable 'iffi'. The executable will be suffixed with a label defined in the ARCH file and with the name of the compile HOST and then be copied to ./bin.

2) Compile requirements

Most probably you will have to adapt the ARCH file to your local needs. Iffi should compile with every C-compiler with full C99 support. We provide ARCH files for the GNU gcc and INTEL icc compilers. Modify the command line options as needed.
In addition, 'iffi' requires the blas/lapack libraries, either from the custom packages of your linux distribution or Intel's MKL or AMD's ACML libraries. Typically, the blas/lapack calls in 'iffi' are not time critical, so the standard libraries will suffice.
The last mandatory library needed is the libxml2 library (libxml2-dev), which is used to handle the input file.

Compiling problems and solutions

problem:

fatal error: schema.h: No such file or directory

solution:

sudo apt-get install g++

problem:

fatal error: bits/predefs.h: No such file or directory

solution:

sudo apt-get install libc6-dev-i386

problem:

fatal error: libxml/parser.h: No such file or directory

solution:

sudo apt-get install libxml2-dev

problem:

/usr/bin/ld: cannot find crt1.o: No such file or directory

solution:

sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64

3) MPI/OpenMP Parallelization

The default and always tested parallelism supported by iffi is MPI. Use an MPI implementation such as OpenMPI or MPICH and the corresponding mpicc compiler. We do have additional support for OpenMP parallelism, however, it is currently in an experimental stage and should not be used without crosschecking. Whether OpenMP yields a speedup beyond the MPI parallization is heavily dependent on the actual hardware/software platform and the system under investigation. Normally, OpenMP is not needed.

4) PLUMED support

Iffi supports the PLUMED 2.0 library (PLUMED stands for PluginMetadynamics). To generate a joint executable, provide the root directory of the plumed library and the plumed configuration file in the ARCH file, e.g.

PLUMED_DIR = $(HOME)/lib/plumed-2.0.2
PLUMED_CONF = linux.gcc

You need read/write permissions on the PLUMED_DIR. Currently iffi uses only the serial (non-MPI) version of the plumed library (configure option --enable-mpi=no).
Libraries needed: zlib1g-dev libmatheval1-dev (for MATHEVAL keyword)

5) Compile IPHIGENIE/CPMD (CPMD version < 4.0)

A joint IPHIGENIE/CPMD executable for DFT/PMM calculations is obtained by compiling CPMD(http://cpmd.org) as a library and linking it to IPHIGENIE.
In addition to the IPHIGENIE source code, you will need the latest version of CPMD (currently 3.17.1).

  1. download CPMD and apply the IPHIGENIE/CPMD patch.
  2. set up a build environment in $BUILDFOLDER using one of the IPHIGENIE* CONFIGURATION files suitable or modified for your system configuration
  3. cd to $BUILDFOLDER and execute "make lib". This creates a file libcpmd.a in $BUILDFOLDER.
  4. Pick one of the CPMD_* files in IPHIGENIE's ARCHITECTURES folder (e.g. CPMD_LINUX_GNU_MPI) and adapt it to your system configuration if necessary. Set INTERFACEDIR to $BUILDFOLDER.
  5. compile IPHIGENIE with the modified ARCH file

    make ARCH=CPMD_LINUX_GNU_MPI

Note: the IPHIGENIE makefile detects changes also in the CPMD source, so step 3 is not absolutely necessary. However, especially for the first time, it is useful to compile the CPMD library "by hand", as you can use the "-j N" command then.

For compilation on SuperMUC use the following modules:

module load mpi.intel/5.0 fortran/intel/14.0 ccomp/intel/14.0
Ussage of version 15.0 of the intel compilers is currently not recommended!

6) Compile IPHIGENIE/CPMD (CPMD version >= 4.0)

  1. download and unpack CPMD 4.1
    1a. unfortunately, the released version of the interface does not compile and a patch
    has to be applied first. this patch is also available in the download section on cpmd.org.
  2. set up a CPMD build environment in $BUILDFOLDER using the -iphigenie option:

    ./configure.sh YOUR_CONFIGURATION -iphigenie -DEST=$BUILDFOLDER

  3. cd to $BUILDFOLDER and execute "make"
  4. Pick one of the CPMD4_* files in IPHIGENIE's ARCHITECTURES folder (e.g. CPMD4_LINUX_GNU_MPI) and adapt it to your system configuration if necessary. Set INTERFACEDIR to $BUILDFOLDER.
  5. compile IPHIGENIE with the modified ARCH file

    make ARCH=CPMD4_LINUX_GNU_MPI

Note: the IPHIGENIE makefile detects changes also in the CPMD source, so step 3 is not absolutely necessary. However, especially for the first time, it is useful to compile the CPMD library "by hand", as you can use the "-j N" command then.
Currently, making IPHIGENIE/CPMD4.1 is only possible without the "-j N" option, usage of this option raises errors like "Fatal Error: Can't delete temporary module file 'iffi_types.mod0': No such file or directory".

For compilation on SuperMUC use the following modules:

module load mpi.intel/5.0 fortran/intel/14.0 ccomp/intel/14.0
Usage of version 15.0 of the intel compilers is currently not recommended!

Notes to developers regarding CPMD 4.x support

Note 1: It has to be periodically checked, whether the interface compiles
in the current CPMD trunk version.
The last checked commit was 4017 (27 January 2016).

Note 2: The changes in the files cpmd.F90, interpt_utils.mod.F90, and egointer_utils.mod.F90
against the last checked version have to be monitored and changes need to be transferred to iffi_inter.F90
(last was 3897)


Related

Wiki: Getting started
Wiki: Plumed interface
Wiki: iffi
Wiki: iphigenie
Wiki: lis2xml
Wiki: samplingspeed
Wiki: xpl2lis

MongoDB Logo MongoDB