camb halofit.f90 non-convergence error catch
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
camb halofit.f90 non-convergence error catch
Hi Antony,
My MCMC chain involving modified camb freezes from time to time when turning halofit nonlinear correction for the lensing potential power on. I looked into the halofit.f90 file, and it seems to me that the problem is that for some extension model predicted non-standard linear matter power spectrum, halofit.f90 could run into non-converging situations and this kind of errors was not captured by the program. My question is, could I use the GlobalError defined in config.f90 followed by return to raise non-converging problem to mpirun? Specifically, I'm thinking about replacing all the "stop" by "GlobalError(message,halofit_error) \n return", and set a maximum iteration cap ~1000 to the do loop in the subroutine NonLinear_GetNonLinRatios.
best,
Angela
My MCMC chain involving modified camb freezes from time to time when turning halofit nonlinear correction for the lensing potential power on. I looked into the halofit.f90 file, and it seems to me that the problem is that for some extension model predicted non-standard linear matter power spectrum, halofit.f90 could run into non-converging situations and this kind of errors was not captured by the program. My question is, could I use the GlobalError defined in config.f90 followed by return to raise non-converging problem to mpirun? Specifically, I'm thinking about replacing all the "stop" by "GlobalError(message,halofit_error) \n return", and set a maximum iteration cap ~1000 to the do loop in the subroutine NonLinear_GetNonLinRatios.
best,
Angela
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: camb halofit.f90 non-convergence error catch
That could work (I assume you are using Takahashi, not HMCode). What's happening to xlogr1 and xlogr2?
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb halofit.f90 non-convergence error catch
sorry I'm not sure, didn't out put xlogr2 value when running the chains. If it was stuck in that loop, I guess it never dropped under -2, but I don't know exactly what was happening.Antony Lewis wrote: ↑January 30 2020That could work (I assume you are using Takahashi, not HMCode). What's happening to xlogr1 and xlogr2?
-
- Posts: 24
- Joined: January 11 2019
- Affiliation: University of Michigan
Re: camb halofit.f90 non-convergence error catch
It seems to me that for some extreme parameters of my extension model, sigma(r) is too large (between 1-2) and xlogr2 never converges.Antony Lewis wrote: ↑January 30 2020That could work (I assume you are using Takahashi, not HMCode). What's happening to xlogr1 and xlogr2?