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.
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.
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.