Problem with Adding a new model parameter in CosmoMC
-
- Posts: 8
- Joined: December 16 2019
- Affiliation: Tel Aviv University
Problem with Adding a new model parameter in CosmoMC
Hi,
As mentioned in my post from last month I'm interested in adding a new model parameter in the recent 2019 version.
Following the Readme, I added a 17'th parameter in the SetForH subroutine of CosmologyParameterizations.f90
right after CMB%fdm = Params(16) , and changed
call this%SetTheoryParameterNumbers(16,last_power_index)
to
call this%SetTheoryParameterNumbers(17,last_power_index).
I also defined the new parameter in Calculator_CAMB.f90, CosmologyTypes.f90 , camb.f90, and model f.90,
and of course modified results.f90 and recfast.f90 to reflect the new physics accounted for by the new model parameter.
In addition, I added the new parameter in the paramnames-file (in the 17'th line between fdm and logA)
and defined its range in the ini-file.
The code compiles OK. However, it stops shortly after it starts without calculating anything.
The error message I get is: "SetTheoryParameterNumbers: parameter numbers do not match".
Obviously, I'm doing something wrong but I can't tell what exactly. Does anyone know how to fix this error ?
Thanks,
Meir
As mentioned in my post from last month I'm interested in adding a new model parameter in the recent 2019 version.
Following the Readme, I added a 17'th parameter in the SetForH subroutine of CosmologyParameterizations.f90
right after CMB%fdm = Params(16) , and changed
call this%SetTheoryParameterNumbers(16,last_power_index)
to
call this%SetTheoryParameterNumbers(17,last_power_index).
I also defined the new parameter in Calculator_CAMB.f90, CosmologyTypes.f90 , camb.f90, and model f.90,
and of course modified results.f90 and recfast.f90 to reflect the new physics accounted for by the new model parameter.
In addition, I added the new parameter in the paramnames-file (in the 17'th line between fdm and logA)
and defined its range in the ini-file.
The code compiles OK. However, it stops shortly after it starts without calculating anything.
The error message I get is: "SetTheoryParameterNumbers: parameter numbers do not match".
Obviously, I'm doing something wrong but I can't tell what exactly. Does anyone know how to fix this error ?
Thanks,
Meir
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Problem with Adding a new model parameter in CosmoMC
It sounds fine if you are adding the extra parameter in ./paramnames/params_CMB.paramnames as you describe (and new version built ok).
-
- Posts: 8
- Joined: December 16 2019
- Affiliation: Tel Aviv University
Re: Problem with Adding a new model parameter in CosmoMC
Thanks. Indeed, I'm doing just that, and the code compiles fine, yet the run aborts right after it starts with the error message
"SetTheoryParameterNumbers: parameter numbers do not match". As part of my attempts to track down the source of the error
I've added a print command line in CosmologyTypes.f90, just before the call of MpiStop. still, surprisingly, nothing is printed and the
run aborts. Here is the line I added in CosmologyTypes.f90 :
print*, num_hard, num_initpower, num_theory_params
if (num_hard + num_initpower /= num_theory_params) &
call MpiStop('SetTheoryParameterNumbers: parameter numbers do not match')
index_initpower = num_hard+1
index_semislow = index_initpower
if (num_initpower> max_inipower_params) call MpiStop('see CosmologyTypes.f90: num_initpower> max_inipower_params')
I'm attaching an excerpt from the error message:
reading WL data set: DES_1YR_final
SetTheoryParameterNumbers: parameter numbers do not match
MpiStop: 1
SetTheoryParameterNumbers: parameter numbers do not match
MpiStop: 3
Any idea what's going on ?
Thanks,
Meir
"SetTheoryParameterNumbers: parameter numbers do not match". As part of my attempts to track down the source of the error
I've added a print command line in CosmologyTypes.f90, just before the call of MpiStop. still, surprisingly, nothing is printed and the
run aborts. Here is the line I added in CosmologyTypes.f90 :
print*, num_hard, num_initpower, num_theory_params
if (num_hard + num_initpower /= num_theory_params) &
call MpiStop('SetTheoryParameterNumbers: parameter numbers do not match')
index_initpower = num_hard+1
index_semislow = index_initpower
if (num_initpower> max_inipower_params) call MpiStop('see CosmologyTypes.f90: num_initpower> max_inipower_params')
I'm attaching an excerpt from the error message:
reading WL data set: DES_1YR_final
SetTheoryParameterNumbers: parameter numbers do not match
MpiStop: 1
SetTheoryParameterNumbers: parameter numbers do not match
MpiStop: 3
Any idea what's going on ?
Thanks,
Meir
-
- Posts: 1943
- Joined: September 23 2004
- Affiliation: University of Sussex
- Contact:
Re: Problem with Adding a new model parameter in CosmoMC
Perhaps you didn't successfully re-build the code
-
- Posts: 8
- Joined: December 16 2019
- Affiliation: Tel Aviv University
Re: Problem with Adding a new model parameter in CosmoMC
Thanks for the hint. I wasn't aware of the fact that I have to compile camb first, and only then compile the entire thing. It works.
Thanks,
Meir
Thanks,
Meir