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

Makefile of GADGET-2

A number of features of GADGET-2 are controlled with compile-time options in the makefile rather than by the parameterfile. This has been done in order to allow the generation of highly optimised binaries by the compiler, even when the underlying source code allows for many different ways to run the code.

The makefile contains a dummy list of all available compile-time options, with most of them commented out by default. To activate a certain feature, the corresponding parameter should be commented in, and given the desired value, where appropriate. Below, a brief guide to these options is included.

Important Note: Whenever one of the compile-time options described below is modified, a full recompilation of the code may be necessary. To guarantee that this is done when a simple make is specified, all source files have been specified in the Makefile as being dependent on the Makefile itself. Alternatively, one can also issue the command make clean, which will erase all object files, followed by make.

Note that the above technique has the disadvantage that different simulations may require different binaries of GADGET-2. If several simulations are run concurrently, there is hence the danger that a simulation is started/resumed with the `wrong' binary. Note that while GADGET-2 checks the plausibility of some of the most important code options, this is not done for all of them. To minimise the risk of using the wrong executable for a simulation, it is recommended to produce a separate executable for each simulation that is run. For example, a good strategy is to make a copy of the whole code together with its makefile in the output directory of each simulation run, and then to use this copy to compile the code and to run the simulation.

Basic operation mode of code

Things that are always recommended

TreePM options

Single or double precision

Time integration options

Output options

Things for special behaviour

Testing and Debugging options

Glass making

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