Function
NumCosmoMathcfg_init
Declaration [src]
void
ncm_cfg_init (
void
)
Description [src]
Initializes the library; it must be called before any other NumCosmo function, and later calls return immediately. It
- sets the default FFTW planner flag and time limit from
NCM_FFTW_PLANNERandNCM_FFTW_PLANNER_TIMELIMIT, see ncm_cfg_set_fftw_default_from_env_str(); the time limit is 10 s whenNCM_FFTW_PLANNER_TIMELIMITis not set; - creates the NumCosmo user data directory, see ncm_cfg_get_fullpath(); it is
NUMCOSMO_HOMEwhen set, otherwise~/.numcosmowhen that directory exists (deprecated), otherwise$XDG_DATA_HOME/numcosmo, or~/.local/share/numcosmowhenXDG_DATA_HOMEis unset, empty or relative; aborts whenNUMCOSMO_HOMEis relative or the directory cannot be created; - sets the Cuba library core counts to zero;
- turns the GSL error handler off, see ncm_cfg_enable_gsl_err_handler();
- installs the NumCosmo log handlers;
- warns when
OMP_NUM_THREADSexceedsOMP_THREAD_LIMIT, since an OpenMP-threaded BLAS can then deadlock; - registers the library objects and functions;
- under an MPI launcher, initializes MPI; every rank except the master then runs the worker loop and never returns.
MPI is detected from the launcher’s environment (Open MPI, MPICH/Hydra, Slurm);
NUMCOSMO_MPI_INIT set to 1 or 0 forces or skips it.
Same as ncm_cfg_init_full() without command-line arguments.