Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

Reference documentation for GADGET-2

Volker Springel
Max-Planck-Institute for Astrophysics
Karl-Schwarzschild-Str. 1
85740 Garching

Getting started

GADGET-2 is a massively parallel code for hydrodynamical cosmological simulations. It is a flexible code that can be applied to a variety of different types of simulations, offering a number of sophisticated simulation algorithms.

A full account of the numerical algorithms employed by the code is given in the accompanying code paper, and detailed instructions for usage of the code are given in the included code documentation.

This html-document serves as a cross-referenced documentation of the source code itself - in fact, using the doxygen tool, the html-pages have been produced from comments inlined in the source code. Apart from the source-code documentation, a brief guide to code compilation is given below, and under Related Pages (see link on top) you can find an explanation of GADGET's parameterfile and a short guide to compile-time options of the code.


GADGET-2 needs the following non-standard libraries for compilation:

Note that if any of the above libraries is not installed in standard locations on your system, the Makefile provided with the code may need slight adjustments. Similarly, compiler options, particularly with respect to optimisations, may need adjustment to the C-compiler that is used. Finally, the Makefile contains a number of compile-time options that need to be set appropriately for the type of simulation that is simulated.

The provided makefile is compatible with GNU-make, i.e. typing make or gmake should then build the executable Gadget2. If your site does not have GNU-make, get it, or write your own makefile.

Running the code

In order to start the simulation code, a parameterfile needs to be specified. An additional optional numerical parameter can be used to signal whether a continuation from a set of restart files, or from a snapshot file, is desired. A typical command to start the code looks like the following:

mpirun -np 8 ./Gadget2 <parameterfile> [restartflag]

This would start the code using 8 processors, assuming that the parallel environment uses the mpirun command to start MPI applications. Depending on the operating system, other commands may be required for this task, e.g. poe on IBM/AIX machines. Note that the code can in principle be started using an arbitrary number of processors, but the communication algorithms will be most efficient for powers of 2. It is also possible to use a single processor only, in which case the code behaves like a serial code, except that GADGET-2 will still go through some of the overhead induced by the parallelization algorithms, so the code will not quite reach the same performance as an optimum serial solution in this case.

The optional restartflag can have the values 0, 1, or 2, only. "1" signals a continuation from restart files, while "2" can be used to restart from a snapshot file produced by the code. If omitted (equivalent to the default of "0"), the code starts from initial conditions.

Generated on Sun May 22 17:33:28 2005 for GADGET-2 by  doxygen