### camb halofit.f90 non-convergence error catch

Posted:

**January 30 2020**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