Next: 4.4.1 General
Up: 4. Compilation & installation
Previous: 4.3.1 Control environment variables
Contents
Index
4.4 Compiler macros
Some of the modules of the CO5BOLD code (with suffix ``.F90'') employ compiler macros
to switch between code versions during compile time.
Typically you define at least one of the three switches rhd_r01
, rhd_r02
,
or rhd_r03
to choose a radiation transport module.
The others have reasonable default values.
To find the combination with the optimal performance, you should look into Sect.4.5
The macros are sorted into different categories:
Some activate a certain feature (like a radiation transport module or
the dust module). They have to be selected by the user (typically via
environment variables and the configure
script, see Sect.4.3) each time
the code is compiled for a certain purpose.
Other macros are meant to improve the performance by offering the
choice between e.g. different loop structures or case distinctions. These
macros are set by the configure script to the best knowledge of the author(s).
Ideally, they should be checked and modified if necessary each time CO5BOLD is
compiled on a new machine. It should be save to modify these settings: the
results between runs with different settings should only differ slightly due
to round-off errors.
Some macros select between different numerical approximations. A change here
should be visible in a (more or less drastic) change of the results of a simulation.
Usually, the default values should be accepted. Other settings typically only exist
to allow the comparison with older versions of CO5BOLD or because there are new
developments going on which have not yet managed to become the default.
A couple of macros only activate timing measurements and result in additional output.
Some of them are not thread-save und should only be activated for runs on one thread
(as done by the configure script). It is always save to switch any of them off
(by removing or undefining them).
The macros in the category test mark parts of code under development.
The default values should only be changed with great care (typically by the author of
that code segment). The configure script does not touch these settings.
Subsections
Next: 4.4.1 General
Up: 4. Compilation & installation
Previous: 4.3.1 Control environment variables
Contents
Index