ICgen is a generator of initial condition for N-body simulations. It is based on MPI and FFTW 2. It is able to handle a theoretically unlimited number of constraints for generating constrained Gaussian random field.

Package content

After unpacking the source package, you have a number of files and subdirectories unpacked in the directory ICgen-X/ (X being the current version code). There are current two subdirectories: "src" and "samples". In "src", you will find the source code of ICgen. In "samples", there are a few sample configuration files that you can look at to get familiar with the parameters.

Building instructions

ICgen uses an autoconf/automake architecture for building. On standard linux distribution it is usually sufficient to run:


These two commands checks the availability of a working compiler, MPI, GSL and FFTW2. In general you do not have to do anything. However, if those packages are installed in non-default locations you may have to specify extra arguments to configure, in that case please have a look at the INSTALL file.

If everything compiles fine, you have an executable "potin_mpi" in the "src" subdirectory.

Running ICgen

For running and generating initial conditions, please execute:

mpirun -np X ./potin_mpi CONFIGURATION_FILE

with X the number of nodes on which you want to execute the generator. The format of the configuration file is detailed here.


The documentation for the configuration file is on this page.


The current public version of ICgen is 0.1-15122009. The current private version is 0.2. The public version can be downloaded from here.

(C) Guilhem Lavaux, 2014 - 2017,
Last updated: December 10, 2014