I modified CAMB to model the Dark Energy as a scalar field, and then I included some specific potentials in the module DarkEnergyQuintessence.f90. However, I hit on a problem that I can't solve and I'm wondering if you have some hints about this.
When running some chains with Cobaya, after some steps in the MCMC computation, the chains are frequently stopping because the code obtains a small but a negative value for omega_de. For example, the last I obtained was omega_de = -6.9014583878874115E-003.
To try to overcome this problem, I used the GlobalError after the lines where omega_de is computed, which are the lines 457 and 458 of https://github.com/cmbant/CAMB/blob/master/fortran/results.f90. Then, below the line 458 I inserted the following exception:
Code: Select all
if (this%Omega_de<0) then call GlobalError('Exception: Omega_de < 0') end if
Edit: I also used the flag stop_at_error: False on my .yaml, but the problem persists. Probably I incorrectly raised the above exception, if so how can I correctly raise the exception to be catched by the flag stop_at_error: False?