-
Notifications
You must be signed in to change notification settings - Fork 0
Installation: Simulation Options
All compile-time simulation options in the Makefile
are in
the following two formats:
SIMU_OPTION += -DOPTION1
SIMU_OPTION += -DOPTION2=OPTION2_ADOPTED
which will enable OPTION1
and assign OPTION2_ADOPTED
to
OPTION2
. For example, to (i) enable gravity and (ii) adopt the
CTU fluid scheme, set
SIMU_OPTION += -DGRAVITY
SIMU_OPTION += -DFLU_SCHEME=CTU
To disable an option, just comment it out with #
. For example,
to disable gravity, use
#SIMU_OPTION += -DGRAVITY
Caution:
option values (if any) must be set explicitly since there
are no default values. For example, SIMU_OPTION += -DFLU_SCHEME
without assigning any value to the option FLU_SCHEME
is invalid.
In addition, do not insert any space before and after the equal
sign =
. For example, use -DFLU_SCHEME=CTU
instead of
-DFLU_SCHEME = CTU
.
All compile-time simulation options are listed below. They are classified into the following categories:
Caution:
some combinations are mandatory (e.g., RSOLVER
must be set when
FLU_SCHEME=CTU
), while some combinations are prohibited
(e.g., PARTICLE
is not supported when both GRAVITY
and TRACER
are
disabled). See the "Restriction" of each option carefully.
Option | Value | Description | Restriction |
---|---|---|---|
MODEL | HYDRO ELBDM |
Physical models, where ELBDM is for ψDM | Must be set in any cases; ELBDM is not released yet |
GRAVITY | Enable gravity | Must enable SUPPORT_FFTW ; may need to set FFTW2/3_PATH
|
|
PARTICLE | Enable particles | Must enable GRAVITY or TRACER
|
|
SUPPORT_GRACKLE | Enable GRACKLE | May need to set GRACKLE_PATH |
-- see Hydro for the related runtime parameters and other settings
Option | Value | Description | Restriction |
---|---|---|---|
FLU_SCHEME | RTVD MHM MHM_RP CTU |
Hydro schemes. RTVD: relaxing TVD; MHM: MUSCL-Hancock; MHM_RP: VL scheme; CTU: corner transport upwind | MHD only supports MHM_RP and CTU |
LR_SCHEME | PLM PPM |
Spatial reconstruction. PLM: piecewise linear; PPM: piecewise parabolic | Useless for FLU_SCHEME=RTVD |
RSOLVER | EXACT ROE HLLE HLLC HLLD |
Riemann solvers | Useless for FLU_SCHEME=RTVD; EXACT is experimental; pure hydrodynamics supports EXACT/ROE/HLLE/HLLC while MHD supports ROE/HLLE/HLLD |
DUAL_ENERGY | DE_ENPY | Enable dual energy formalism | Not supported for FLU_SCHEME=RTVD |
NCOMP_PASSIVE_USER | ≥ 0 | Number of user-defined passive scalars | See here for details; not supported for FLU_SCHEME=RTVD |
MHD | Magnetohydrodynamics | ||
EOS | EOS_GAMMA EOS_ISOTHERMAL EOS_USER |
Equation of state | The following options only support EOS_GAMMA: FLU_SCHEME=RTVD/CTU, RSOLVER=EXACT/ROE, COMOVING, DUAL_ENERGY; see also BAROTROPIC_EOS |
BAROTROPIC_EOS | Is EOS barotropic? | Must be disabled for EOS_GAMMA and enabled for EOS_ISOTHERMAL
|
-- see Gravity for the related runtime parameters and other settings
-- see Particles for the related runtime parameters and other settings
Option | Value | Description | Restriction |
---|---|---|---|
TRACER | Enable tracer particles | ||
STORE_PAR_ACC | Store particle acceleration (recommended) | ||
STAR_FORMATION | Enable star formation | Must enable STORE_POT_GHOST when using STORE_PAR_ACC | |
FEEDBACK | Enable feedback from particles to grids (and vice versa) | see here for details | |
PAR_NATT_USER | ≥ 0 | Number of user-defined particle attributes | See here for details |
-- AMR, GPU, parallelization, optimizations, ...
Option | Value | Description | Restriction |
---|---|---|---|
NLEVEL | ≥ 1 | Maximum number of AMR levels including the root level. Do not confuse with the MAX_LEVEL runtime parameter. | |
MAX_PATCH | ≥ 8 | Maximum number of patches that can be allocated on each AMR level (recommended value: 1000000 or even larger since it is not memory-consuming) | |
PATCH_SIZE | ≥ 8 | Number of cells along each direction in a single patch | Must be an even number |
GPU | Enable GPU acceleration | Must specify GPU_ARCH as well; may need to set CUDA_PATH | |
GPU_ARCH | FERMI KEPLER MAXWELL PASCAL VOLTA TURING AMPERE |
GPU architecture (see CUDA GPU list and CUDA compute capability) | Must enable GPU |
GAMER_DEBUG | Run GAMER in a debug mode | ||
BITWISE_REPRODUCIBILITY | Enable bitwise reproducibility. It may deteriorate performance, especially for | ||
runs with a large number of particles. | |||
TIMING | Record the wall time of various GAMER routines in the file Record__Timing (recommended) | ||
TIMING_SOLVER | Record the wall time of individual GPU solvers in the file Record__Timing. It will disable the CPU/GPU overlapping and thus deteriorate performance notably. | Must enable TIMING | |
FLOAT8 | Enable double precision floating-point accuracy. Note that it will have a serious impact on performance. | ||
SERIAL | Run GAMER in a serial mode (i.e., no MPI; but OpenMP is still supported) | Must disable LOAD_BALANCE | |
LOAD_BALANCE | HILBERT | Enable load balancing using a space-filling curve (see MPI and OpenMP) | Must disable SERIAL; may need to set MPI_PATH |
OPENMP | Enable OpenMP (see MPI and OpenMP) | Must set the compilation flag OPENMPFLAG | |
SUPPORT_HDF5 | Enable HDF5 output (see Outputs) | May need to set HDF5_PATH | |
SUPPORT_GSL | Enable GNU scientific library | May need to set GSL_PATH | |
SUPPORT_FFTW | FFTW2 FFTW3 |
Enable FFTW | May need to set FFTW2/3_PATH |
SUPPORT_LIBYT | Enable inline analysis with libyt | Experimental | |
RANDOM_NUMBER | RNG_GNU_EXT RNG_CPP11 |
Random number generators. RNG_GNU_EXT: GNU extension drand48_r ; RNG_CPP11: c++11 <random>
|
Use RNG_GNU_EXT for compilers supporting GNU extensions (they may not be supported on macOS); use RNG_CPP11 for compilers supporting c++11 (one may need to add -std=c++11 to CXXFLAG → see Compiler and Flags) |
Getting Started
User Guide
- Installation
- Running the Code
- Adding New Simulations
- Runtime Parameters
- MPI and OpenMP
- GPU
- Physics Modules
- Outputs
- Simulation Logs
- Data Analysis
- In Situ Python Analysis
- Test Problems
- Troubleshooting
Advanced Topics
Developer Guide