Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in perturbations_solve with several NCDM species #588

Open
gaetanfacchinetti opened this issue Aug 22, 2024 · 0 comments
Open

Error in perturbations_solve with several NCDM species #588

gaetanfacchinetti opened this issue Aug 22, 2024 · 0 comments

Comments

@gaetanfacchinetti
Copy link

I am currently facing an issue while trying to run the unmodified version of CLASS (classy v3.2.3) with massive neutrinos and warm dark matter. A script with an example set of failing parameters is

import classy
cosmo = classy.Class()
cosmo.set({'output': 'mPk, vTk', 'h': 0.6766, 'YHe': 0.24500000476837158, 
'omega_b': 0.02242, 'A_s': 2.105209331337507e-09, 'n_s': 0.9665, 
'alpha_s': 0.0, 'P_k_max_h/Mpc': 10058.980279169373, 'reio_parametrization': 'reio_none', 
'z_pk': 1010, 'omega_cdm': 0.0, 'm_ncdm': '0.02,7507.499999999999', 
'N_ur': 0.00641, 'deg_ncdm': '3,1', 'N_ncdm': 2, 
'T_ncdm': '0.71611,0.08146910903562146', 'ncdm_fluid_approximation': '2,2'})
cosmo.compute()

which gives the following error message:

File classy.pyx:398, in classy.Class.compute()

CosmoComputationError: 

Error in Class: operator()(L:934) :error in perturbations_solve(ppr, pba, pth, ppt, index_md, index_ic, index_k, &pw);
=>perturbations_solve(L:3224) :error in generic_evolver(perturbations_derivs, interval_limit[index_interval], interval_limit[index_interval+1], ppw->pv->y, ppw->pv->used_in_sources, ppw->pv->pt_size, &ppaw, ppr->tol_perturbations_integration, ppr->smallest_allowed_variation, perturbations_timescale, ppr->perturbations_integration_stepsize, ppt->tau_sampling, tau_actual_size, perturbations_sources, perhaps_print_variables, ppt->error_message);
=>evolver_ndf15(L:466) :condition (absh <= hmin) is true; Step size too small: step:5.85188e-13, minimum:5.85188e-13, in interval: [0.371511:365.742]

In the vast majority of cases, the error does not show when removing 'z_pk' : 1010, however I need to compute the velocity transfer function at this redshift. I have tried testing other available solvers and changing perturbations_integration_stepsize without success. For the latter the value by default is 0.5 (far from 5.85188e-13 given in the error log) and decreasing it by half for instance did not change anything.

Any help would be greatly appreciated,
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant