You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TL;DR: A call to boltzmann.py within CCL is failing in the derivative calculation, presumably due to O(10^-9) values in A_s.
Explanation: When attempting a 3x2pt forecast, it runs and completes when the sigma8 parameter is used. If A_s is used instead, the Jupyter kernel dies after a few seconds when trying to calculate the Fisher matrix. Running the code as a python script from the command line, the error returned is:
(forecasting) brunomor@Brunos-MacBook-Pro-2 forecasts_neutrinos_workshop2024 % time python 2024-07-02_neutrino_3x2pt_SRD.py
forecasting_strawberry_run.sacc
/Users/brunomor/miniforge3/envs/forecasting/lib/python3.12/site-packages/pyccl/boltzmann.py:170: RuntimeWarning: invalid value encountered in log
ln_p_k_and_z[i, :] = np.log(pk[sind, :])
zsh: abort python 2024-07-02_neutrino_3x2pt_SRD.py
The trace did not contain information about where this error occurred, so I ran pdb on the script (my first time, so not very skillfully) and found the spot where it is breaking:
> /Users/brunomor/lib/python/augur/augur/analyze.py(191)get_fisher_matrix()
-> if self.derivatives is None:
(Pdb) n
> /Users/brunomor/lib/python/augur/augur/analyze.py(192)get_fisher_matrix()
-> self.get_derivatives(method=method)
(Pdb) n
/Users/brunomor/miniforge3/envs/forecasting/lib/python3.12/site-packages/pyccl/boltzmann.py:170: RuntimeWarning: invalid value encountered in log ln_p_k_and_z[i, :] = np.log(pk[sind, :])
zsh: abort python 2024-07-02_neutrino_3x2pt_SRD.py
The text was updated successfully, but these errors were encountered:
@fjaviersanchez , I could pinpoint more or less where the error is, but this is something I never fixed before. I assume it's numerical instabilities in the derivatives due to the small values of A_s compared to the other parameters. I won't be able to solve it now.
bruno-moraes
changed the title
Jupyter kernel dying when running a 3x2pt forecast with A_s and m_nu
Using A_s instead of sigma8 in a 3x2pt forecast is generating invalid values in CCL boltzmann.py when performing derivative calculations
Jul 5, 2024
Thank you for checking and identifying the issue! I think this can be potentially solved when we add the stem derivative method. One potential solution is to normalize all parameters internally for the derivatives and then change back or change the step size dynamically, but will check first if the easy fix works.
TL;DR: A call to boltzmann.py within CCL is failing in the derivative calculation, presumably due to O(10^-9) values in A_s.
Explanation: When attempting a 3x2pt forecast, it runs and completes when the sigma8 parameter is used. If A_s is used instead, the Jupyter kernel dies after a few seconds when trying to calculate the Fisher matrix. Running the code as a python script from the command line, the error returned is:
The trace did not contain information about where this error occurred, so I ran
pdb
on the script (my first time, so not very skillfully) and found the spot where it is breaking:The text was updated successfully, but these errors were encountered: