IMD Home

User Guide


IMD is compiled with GNU make, which we call gmake in the following. Note that on some systems, GNU make is called make. Most other implementations of make won't work.

   gmake [FLAGS="some flags"] [IMDSYS="some system"] imd-target

The compiler and compilation flags are determined according to the IMDSYS variable, which must be set either as an environment variable, or be passed on the command line as above. In previous versions of IMD, the HOSTTYPE environment variable was used for this purpose, but this turned out to be too inflexible. Especially for the IA32 architechture, there are too many processor types requiring their own optimization flags, which moreover depend on the choice of compiler (gcc2, gcc3, icc,...). It therefore seemed necessary to introduce a new, IMD-specific variable IMDSYS, which now determines a combination of system type and compiler, together with all associated compile and link flags. Further compile or ling flags, in addition to those determined by the IMDSYS variable, can be passed on the command line with the help of the FLAGS variable.

After compiling, the IMD executable is moved to the directory $HOME/bin/$HOSTTYPE, which must exist, and which should be in the search path. The location where executables are put can be customized in the Makefile.

imd-target consists of several components and has the following structure:


Most features of IMD must be activated with the corresponding compilation option in the make target. In particular, you need to enable the integrator (ensemble) you want to use, and possibly support for different interactions, if you don't want to use tabulated pair potentials. Most options can coexist with each other. In particular, it is possible to compile support for several integrators. The active one is selected with a parameter read from the parameter file.

There are a few compilation options which cannot coexist with each other. In particular, IMD must be compiled for a fixed dimension (default is 3d, option _2d switches to 2d), and there are some restrictions on the types of interaction which can be combined.

Compilation Options

Most compilation options are described together with the simulation features they enable. For details, see the corresponding chapters. Here, we only list some general options.

Parallelization options

IMD can be compiled with the following parallelization options. If none of these is specified, a serial executable is compiled.

mpi parallelization with MPI
omp parallelization with OpenMP
ompi  parallelization with MPI and OpenMP

Vectorization options

IMD can be compiled with the following vectorization options.

vec compiled for vector machines. Options are given in the parameter file
cbe compiled for cell processor support. Options are given in the parameter file

Programming options

2d 2d simulation
single compile with single precision (not recommended)
mono compile for sample with one atom type (faster)
binary compile for binary sample (faster)
hpo enable high precision output
debug compile with debug support
prof compile with profiling support
timing  compile with extra timers
sr use sendrecv in MPI version

Supported values of the IMDSYS variable

Currently, the following values of the IMDSYS variable are supported:

AthlonMP-icc Athlon MP or XP, icc
AthlonMP-gcc3 Athlon MP or XP, gcc3
P4-icc Pentium 4 or Xeon, icc
P4-gcc3 Pentium 4 or Xeon, gcc3
P3-icc Pentium II/III, icc
P3-gcc3 Pentium II/III, gcc3
ia32-gcc2 generic IA32, gcc2 (very slow)
ia64-ecc Intel Itanium 2, ecc
alpha-cc Alpha EV56, cc
alpha-gcc2 Alpha EV56, gcc2 (slow)
irix-cc Irix, mips3, cc
irix-gcc2 Irix, mips3, gcc2 (slow)
USparc3-cc UltraSparc3, cc
sparc-gcc2 generic sparc, gcc2 (slow)
T3E-cc Cray T3E, cc
sr8k-cc HITACHI SR8000, cc
sr8k-xcc xcc cross compiler for HITACHI SR8000
Power4-cc IBM Power4, cc

The GCC 2.x compilers should usually be avoided. Especially on the IA32 architecture, they produce very slow code. GCC 3.2 or the Intel compiler icc are much better choices.

Support for further values of IMDSYS is easily added. The Makefile contains a detailed description of how the compile and link flags are determined from a number of Makefile variables, which must be set for each supported value of IMDSYS. There is a template from which one can start.