derived parameters in output text chain files

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Mohammed Irshad
Posts: 11
Joined: March 28 2012
Affiliation: Institute for Theoretical Physics, University of Zurich

derived parameters in output text chain files

Post by Mohammed Irshad » May 22 2012

Hello Everyone,

Somehow I couldn't write the derived parameters (7 default) in my output chain text files.

The readme html files says that after 13 default parameters, there will be 7 more derived parameters in text chain file, but in my output text chain files there are only 13 parameters and no derived parameters.

Also when I am running getdist program for analysis, I am getting no information on derived parameters.

Please help me on this, I have tried many things to check the consistencies. Is there any switch that need to be on in order to write derived parameters?

Any help is appreciated!
Thanks in advance.

Jason Dossett
Posts: 97
Joined: March 19 2010
Affiliation: The University of Texas at Dallas
Contact:

derived parameters in output text chain files

Post by Jason Dossett » May 23 2012

Hi,
I have ran into this issue before. What version of cosmomc are you running?

When I had the issue it was with an older vernon of comsomc. Check params_CMB.f90. Notice that in the function CalcDerivedParams the variable num_derived should be an integer. Check to make sure that in the subroutines WriteParams and WriteParamsAndDat the data type for CalcDerivedParams matches i.e. you should have

Code: Select all

function CalcDerivedParams(P, derived) result (num_derived)
     use settings
     use cmbtypes
     use ParamDef
     use Lists
     implicit none
     Type(real_pointer) :: derived
     Type(ParamSet) P
     Type(CMBParams) CMB
     real r10   
     integer num_derived 
     
     num_derived = 11
and

Code: Select all

subroutine WriteParams(P, mult, like)
     use settings
     use cmbtypes
     use ParamDef
     use IO
     use Lists
     implicit none
     Type(ParamSet) P
     real, intent(in) :: mult, like
     Type(CMBParams) CMB
     real, allocatable :: output_array(:)
     Type(real_pointer) :: derived
     integer numderived 
     integer CalcDerivedParams
     external CalcDerivedParams
In an older version of cosmomc CalcDerivedParams was declared as a real in this other subroutines which I found some compilers had issues with, in my case pgf90.

Hope that helps.

Mohammed Irshad
Posts: 11
Joined: March 28 2012
Affiliation: Institute for Theoretical Physics, University of Zurich

derived parameters in output text chain files

Post by Mohammed Irshad » May 23 2012

Hi,

This exactly solves the problem. Actually in my params_cmb.f90 file, CalcDerivedParams was real. When I changed it to integer,as you mentioned, it starts writing all the derived parameters.

Thank you so much.

Post Reply