adding a new parameter to CosmoMC
Posted: March 16 2023
Hello,
I am having a problem with adding a new parameter to CosmoMC. This parameter, bpmf, appears in recfast.f90. To implement, I followed the instructions and some examples I have of CosmoMC with added parameters. My code compiles cosmomc, but crashes after completing the likelihood checks. Interestingly, when I compile it in the debug mode, cosmomc_debug runs OK, sampling the new parameter along with the others and writing to the chain files.
By putting write(*,*) statements in various parts of the code, I traced the problem to this line in function CAMBdata_DeltaTime in results.f90:
CAMBdata_DeltaTime = Integrate_Romberg(this, dtauda,a1,a2,atol)
I checked that the new parameter, P%bpmf, has a reasonable value by writing it between calling this%CMBToCAMB and this%CurrentState%SetParams, before the crashes.
I should add that his does not appear to be a problem specific to the latest version of CosmoMC. Exactly the same problem happens when I try to add a second parameter to an older version of CosmoMC that already had a new parameter in recfast.
Any clue what could be happening? And what could make cosmomc crush while allowing cosmomc_debug run OK?
Thanks!
Levon
I am having a problem with adding a new parameter to CosmoMC. This parameter, bpmf, appears in recfast.f90. To implement, I followed the instructions and some examples I have of CosmoMC with added parameters. My code compiles cosmomc, but crashes after completing the likelihood checks. Interestingly, when I compile it in the debug mode, cosmomc_debug runs OK, sampling the new parameter along with the others and writing to the chain files.
By putting write(*,*) statements in various parts of the code, I traced the problem to this line in function CAMBdata_DeltaTime in results.f90:
CAMBdata_DeltaTime = Integrate_Romberg(this, dtauda,a1,a2,atol)
I checked that the new parameter, P%bpmf, has a reasonable value by writing it between calling this%CMBToCAMB and this%CurrentState%SetParams, before the crashes.
I should add that his does not appear to be a problem specific to the latest version of CosmoMC. Exactly the same problem happens when I try to add a second parameter to an older version of CosmoMC that already had a new parameter in recfast.
Any clue what could be happening? And what could make cosmomc crush while allowing cosmomc_debug run OK?
Thanks!
Levon