next up previous contents index
Next: 4.4.2 Input/output with UIO Up: 4.4 Compiler macros Previous: 4.4 Compiler macros   Contents   Index

Subsections

4.4.1 General


4.4.1.1 timing_c_factor

(``timing count factor'') in timing_module.F90.
Category: account for property of machine.
To produce the timing statistics printed at the end of a simulation run the standard Fortran routine SYSTEM_CLOCK is used. The macro timing_c_factor specifies by how much the count rate of this routine is reduced when storing its count value. This does not prevent all overflows but can make the output much more useful. Values: By a proper choice of this factor the timing measurements of individual routines can be made meaningful: the reduction of the count rate prevents overflows due to the addition of several measurements. An overflow during an individual measurement can not be prevented. Therefore, the count rate for the entire program still tends to produce overflows.


4.4.1.2 timing_c_range

(``timing counter range'') in timing_module.F90.
Category: account for property of machine.
To produce the timing statistics printed at the end of a simulation run the standard Fortran routine SYSTEM_CLOCK is used. The macro timing_c_range specifies the number of digits (the ``range'') used for the integers storing the counters. The value appears in the code e.g. in
integer(kind=selected_int_kind(timing_c_range)) :: count_total.
Fortran standard is the use of 4-byte integers. However, that is often not sufficient and can lead to overflows. Many compilers can use longer integers, though. That can be tried by setting the timing_c_range not to 9 (the default) but e.g. to 15. If it works, overflows are essentially ruled out. If it does not work, the compilation stops with an error message. Values: By a proper choice of this number all the timing measurements can be made meaningful, even for long runs on machines with fast counters.


4.4.1.3 timing_r_type

(``timing rate type'') in timing_module.F90.
Category: account for property of machine.
During a CO5BOLD run, the total execution time is measured and printed after each time step. The type of clock used can be chosen with:


4.4.1.4 rhd_box_arrays01

(``rhd box arrays 01'') in rhd_box_module.F90.
Category: performance enhancement.
Switch to choose between the (``classical'') use of pointer arrays within the box structure to store arrays, or the (``new'') version with allocatable arrays, that is potentially faster. Values:


4.4.1.5 rhd_box_grav01

(``rhd box gravitation 01'') in rhd_box_module.F90.
Category: feature activation.
Switch to activate the array for the gravitational potential in the box structure. If the switch is set to 1, a 3D array for the potential is created, copied, removed, ... There is no module to compute the gravitational potential, yet. Therefore the entire thing has no practical value, yet. Values:


4.4.1.6 rhd_box_quc01

(``rhd box quantity centered 01'') in rhd_box_module.F90 and rhd.F90.
Category: feature activation.
CO5BOLD is able to handle a number of further quantities (quc: ``quantity centered'') in addition to the basic hydrodynamics quantities ($\rho$, $\ei $, ...) if this compiler switch is activated. These additional quantities can be e.g. densities of dust distribution moments or densities of molecules. They are required for the treatment of chemical reaction networks and time-dependent hydrogen ionization. For the latter the quc arrays contain the number densities of the atomic level populations. For the chemical reaction network, the arrays contain the species number densities in cm$^{-3}$ and with headers following this example: "Number density of H2". Values: To actually include dust formation in a simulation, it is necessary to
  1. set the switch -Drhd_box_quc01=1 during compilation (this is done by the configure script if the environment variable F90_DUST is set to 1, see the description of the variable in Sect.4.3.1.13),
  2. put arrays specifying the initial conditions of the additional density into the start model (as real quc001, real quc002, ...),
  3. select a proper model describing dust (or molecule) formation in the parameter file (with character dustscheme).


4.4.1.7 rhd_box_bmag01

(``rhd box b magnetic 01'') in rhd_box_module.F90 and rhd.F90.
Category: feature activation.
CO5BOLD can handle magnetic field arrays if this compiler switch is set. Values: To actually account for magnetic fields in a simulation, it is necessary to
  1. set the switch -Drhd_box_bmag01=1 during compilation (this is done by the configure script if the environment variable F90_MHD is set to 1, see Sect.4.3),
  2. put arrays specifying the initial conditions of the boundary-centered magnetic-field arrays into the start model (as real bb1, real bb2, real bb3),
  3. select an hydrodynamics scheme that is able to handle magnetic fields in the parameter file (with character hdscheme).

next up previous contents index
Next: 4.4.2 Input/output with UIO Up: 4.4 Compiler macros Previous: 4.4 Compiler macros   Contents   Index