-
Notifications
You must be signed in to change notification settings - Fork 292
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
parameter set causing "Segmentation fault" in python wrapper #419
Comments
Hi @lukashergt , this is interesting. I have seen a similar issue in the context of energy injection with class This can be fixed by explicitly checking the derivatives and throwing an error if they are ill-defined. Best, |
Hi @pstoecker and @lukashergt, I tried reproducing this issue to see if my fix over at https://github.com/GambitBSM/gambit/issues/278 worked here. I couldn't reproduce the issue with either of these:
In a discussion with Lukas, we pinned down the following:
I'm going to look into
But this discussion makes me more certain that the patch will not rule out valid points in parameter space - we definitely want to avoid that happening. |
OK, I see. I think there are two issues to fix here. The first thing is that The other thing is the particular issue that is happening here. Also on my system (ubuntu 18.04, gcc 7.5) this particular parameter point does not crash. I haven't checked the results though but I guess that I will see a similar doubtful value of H. Given your explanation, I agree that this needs some investigation. |
Ah, I should've been more clear - we tried the fix from https://github.com/GambitBSM/gambit/issues/278 and it successfully avoids the seg fault, so CLASS fails in a more elegant way and doesn't disrupt the MCMC chains. |
Hi @fruzsinaagocs and @pstoecker, thanks for both your inputs that was very helpful. The ndf15-fix definitely proved useful in some cases. I found another issue, though, that relates to this particular case and to curvature runs in general. The following lines in /** - control that cosmological parameter values make sense, otherwise inform user */
/* H0 in Mpc^{-1} */
/* Many users asked for this test to be supressed. It is commented out. */
/*class_test((pba->H0 < _H0_SMALL_)||(pba->H0 > _H0_BIG_),
pba->error_message,
"H0=%g out of bounds (%g<H0<%g) \n",pba->H0,_H0_SMALL_,_H0_BIG_);*/ This test is important to filter out cases such as collapsing universes. I don't know why "many users asked for this test to be suppressed", but there are definitely situations where these are relevant. Maybe an approach similar to CAMB would be useful, where you are allowed to set a viable H0 range, maybe with the additional option of leaving it unspecified? |
The following parameter set causes a
Segmentation fault
in the'background'
module (both python wrapper and command line call to CLASS):Example python script to reproduce the error:
I've chased it down to line
1355
intools/evolver_ndf15.c
:nj_ws->Rowmax[j]
returns some random number, so I guessj
overshoots theRowmax
array somehow.I'm a bit lost with all these indices. Can anyone else reproduce this? Anybody an idea what might be going wrong here?
Versions:
The text was updated successfully, but these errors were encountered: