Skip to content
This repository was archived by the owner on May 11, 2021. It is now read-only.

Configuring

Chris White edited this page Nov 12, 2016 · 32 revisions

Configuration Script

The configuration script (configure.py in the code root directory) is written in Python. Python 2.7 or above is required to run it (older versions may work with argparse.py but are not officially supported). The configuration script selects a the source code and generates a Makefile according to specified options. In order to see the list of available options, within the code root directory use:

> python configure.py -h

Options

The following options are available (as of March, 2016). [...] means a parameter (required), and the available options are shown in the help message.

  • -h, --help : show the help message
  • --prob [problem_generator] : select a problem generator (from src/pgen)
  • --coord [coordinates] : select a coordinate system (from src/coordinates)
  • --eos [eos] : select an equation-of-state (adiabatic or isothermal)
  • --flux [riemann_solver] : select a Riemann solver
  • --order [reconstruction] : select a spatial reconstruction algorhithm (currently plm only)
  • --fint [integrator] : select a hydro time-integration algorithm (currently vl2 only)
  • -b : enable magnetic field
  • -s : enable special relativity
  • -g : enable general relativity
  • -t : enable interface frame transformations for GR
  • --cxx [compiler] : select a C++ compiler
  • -debug : enable debug flags; override other compiler options
  • -mpi : enable MPI parallelization
  • -omp : enable OpenMP parallelization
  • -hdf5 : enable HDF5 Output
  • --hdf5_path [path] : path to HDF5 libraries

Some combinations are prohibited. For example, the HLLD approximate Riemann solver cannot be used without enabling magnetic fields (-b). In most (but not necessarily all!) such cases, the script will issue a warning and quit. The order of options does not matter. Note that certain sets of options are required for some problem generators (e.g. an MHD problem requires that magnetic fields be enabled), but the script does not check this automatically.

Because mesh refinement (both static and adaptive) is fully integrated into the underlying algorithms, options are not needed to use it.

Example 1:

The linear-wave propagation test on a single core without magnetic fields using the HLLC approximate Riemann solver:

> python configure.py --prob linear_wave --flux hllc 
Example 2:

The Orszag-Tang test (a typical 2D MHD test problem) in parallel using MPI on IBM BlueGene/Q, for debugging:

> python configure.py --prob orszag-tang -b --flux hlld --cxx bgxl -mpi -d
Example 3:

An MHD torus problem (similar to Stone & Pringle 2001) in spherical-polar coordinates, with hybrid parallelization and HDF5 output, using the Intel C++ Compiler.

> python configure.py --prob sphtorus --coord spherical_polar -b --flux hlld --cxx icc -mpi -omp -hdf5

Recommended options

While Athena++ supports many different algorithms, some are better than others. For hydrodynamics without magnetic fields, we recommend the HLLC (hllc) or Roe's (roe) approximate Riemann solvers, because they are more accurate. For MHD, either the HLLD or Roe's solver are recommended. The HLLD solver is almost as accurate as Roe's, but it is somewhat faster and more robust in most situations.

Major changes from Athena4.2

  • + OpenMP parallelization
  • + Flexible coordinate systems
  • + HDF5 and Parallel IO
    • Corner-Transport-Upwind(CTU) integrator (incompatible with relativity)
    • Higher-order spatial reconstruction; will be implemented soon

Clone this wiki locally