Configuring Dedalus
Various aspects of the underlying numerics, logging behavior, and output behavior of Dedalus can be modified through a configuration interface using Python’s standard-library ConfigParser
structure.
A dedalus.cfg
file with the default configuration and descriptions of each option is included in the package.
This file can be copied to any working directory with the command python3 -m dedalus get_config
.
The configuration settings can be modified by, in order of increasing precedence:
Modifying the package’s
dedalus.cfg
file (not recommended).Creating a user-based config file at
~/.dedalus/dedalus.cfg
.Creating a local config file called
dedalus.cfg
in the directory where you execute a Dedalus script.Modifying configuration values at the top of a Dedalus script like:
from dedalus.tools.config import config
config['logging']['stdout_level'] = 'debug'
The default configuration file in this version of Dedalus is copied below for reference:
#
# This file contains the default configuration options for Dedalus.
# Copy and modify this file to your own liking.
#
# Dedalus will examine the following locations for configuration files,
# from lowest to highest precedence:
#
# 1) The default in-package location: dedalus/dedalus.cfg
# 2) Your home directory: ~/.dedalus/dedalus.cfg
# 3) The current working directory: ./dedalus.cfg
#
[logging]
# Available levels (in increasing priority):
# {debug, info, warning, error, critical}
# Log level for (rank > 0) processes
nonroot_level = warning
# Log level for stdout handler
# Use 'none' to specify no streamhandler
stdout_level = info
# Log level for file handler
# Use 'none' to specify no filehandler
file_level = none
# Log filename base (will be expanded to <filename>_p0.log, etc)
filename = logs/dedalus
[transforms]
# Default transform library (scipy, fftw)
DEFAULT_LIBRARY = fftw
# Transform multiple fields together when possible
GROUP_TRANSFORMS = False
# Apply dealiasing truncation before basis conversion
DEALIAS_BEFORE_CONVERTING = True
[transforms-fftw]
# FFTW transform planning rigor (estimate, measure, patient, exhaustive)
PLANNING_RIGOR = measure
[parallelism]
# Default transpose library (fftw, mpi)
TRANSPOSE_LIBRARY = fftw
# Place MPI Barriers before each transpose call
SYNC_TRANSPOSES = False
# Transpose multiple fields together when possible
GROUP_TRANSPOSES = True
[parallelism-fftw]
# Perform FFTW transposes in-place
IN_PLACE = False
# FFTW transpose planning rigor (estimate, measure, patient, exhaustive)
PLANNING_RIGOR = measure
[parallelism-mpi]
# Use variable-length all-to-all routine
ALLTOALLV = False
[matrix construction]
# Put BC rows at the top of the matrix
BC_TOP = False
# Put tau columns at the left of the matrix
TAU_LEFT = False
# Interleave component modes
INTERLEAVE_COMPONENTS = False
# Store expanded LHS matrices
# Speeds up IVP matrix factorization at the expense of extra memory
STORE_EXPANDED_MATRICES = False
[linear algebra]
# Default sparse matrix solver for single solves
MATRIX_SOLVER = SuperLUColamdSpsolve
# Default sparse matrix factorizer for repeated solves
MATRIX_FACTORIZER = SuperLUColamdFactorizedTranspose
# Split CSR matvecs vector-by-vector
SPLIT_CSR_MATVECS = False
# Revert to old sparsetools code for CSR matvecs
OLD_CSR_MATVECS = False
[memory]
# Store output fields for all operators
STORE_OUTPUTS = True
# Cache operator evaluation for repeated use in expression graph
STORE_LAST_DEFAULT = True
[analysis]
# Default filehandler mode (overwrite, append)
FILEHANDLER_MODE_DEFAULT = overwrite
# Default filehandler parallel output method (gather, virtual, mpio)
FILEHANDLER_PARALLEL_DEFAULT = virtual
# Force filehandlers to touch a tmp file on each node.
# This works around NFS caching issues
FILEHANDLER_TOUCH_TMPFILE = False
[profiling]
# Default profile setting for solvers
# This saves accumulated profiling data using cProfile
PROFILE_DEFAULT = False
# Default parallel profile setting for solvers
# This saves per-process and accumulated profiling data using cProfile
PARALLEL_PROFILE_DEFAULT = False
# Profile directory base (will be expanded to <PROFILE_DIRECTORY>/runtime.prof, etc)
PROFILE_DIRECTORY = profiles