lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
220 stars 291 forks source link

Segfault in DCDM calculations #515

Open fmccarthy opened 1 year ago

fmccarthy commented 1 year ago

I find a segfault in classy v3.2.0 for certain configurations of input parameters when asking for DCDM output. For example the following set of parameters:

A_s = 2.1080159136965503e-09 n_s = 0.9634998212853542 omega_b = 0.022299630125110836 omega_cdm = 0.11732130667401973 m_ncdm = 0.06 tau_reio = 0.06087141721157738 100*theta_s = 1.0419379601460101 nonlinear_min_k_max = 20 N_ncdm = 1 N_ur = 2.0328 output = tCl pCl tCl, lCl lCl, mPk pCl, dCl modes = s non_linear = hmcode l_max_scalars = 2500 lensing = yes P_k_max_1/Mpc = 1

Gamma_dcdm = 0.8914400255168418 Omega_ini_dcdm = 0.006748518551475872

Produces a segfault (I think this occurs somewhere in the "shooting" algorithm)

but configurations with parameters slightly perturbed from this seem to work fine. Not sure what's going on. Thanks :)

ShazAlvi commented 1 year ago

Did you try to remove the nonlinear computation and instead use linear computation?

fmccarthy commented 1 year ago

Yes, that doesn't help; I don't think the shooting algorithm should know about the nonlinearities in any case

fmccarthy commented 1 year ago

As an update: I'm avoiding this for now by reverting to class v2.10