CosmoMC: seems to stop sampling chains...

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Xin Wang
Posts: 43
Joined: January 11 2012
Affiliation: NAOC/NJU

CosmoMC: seems to stop sampling chains...

Post by Xin Wang » June 14 2012

Hi Antony,

Recently I've run cosmomc with effective number of neutrinos freed as a parameter to be constrained. However, sometimes I found out that the .txt just stopped to get updated without any error messages or finishing notice. In fact the points gathered in the chain file is far from the assigned value of samples in the params.ini file. I've tried with parallel computation and this problem comes about still.

I'm wondering if you have ever run into this sort of problem. Could you help me with that?

Thanks!

Antony Lewis
Posts: 1947
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CosmoMC: seems to stop sampling chains...

Post by Antony Lewis » June 14 2012

Sounds like a bug in your modification, sampling n_eff is unproblematic.

Xin Wang
Posts: 43
Joined: January 11 2012
Affiliation: NAOC/NJU

Re: CosmoMC: seems to stop sampling chains...

Post by Xin Wang » June 15 2012

Antony Lewis wrote:Sounds like a bug in your modification, sampling n_eff is unproblematic.
Hi, Antony! Thanks so much for your prompt reply!

In order to free N_{eff}, do we have to modify the codes within /camb directory?

Do we have to change the following part in the subroutine InitCAMBParams(P) ?

Code: Select all

        P%Num_Nu_Massive = 3
        P%Num_Nu_Massless = 0.046

Xin Wang
Posts: 43
Joined: January 11 2012
Affiliation: NAOC/NJU

Re: CosmoMC: seems to stop sampling chains...

Post by Xin Wang » June 19 2012

Antony Lewis wrote:Sounds like a bug in your modification, sampling n_eff is unproblematic.
Hi, Antony,

It's found out that it's the loop below in subroutine ParamsToCMBParams that trapped the chain from updating,

Code: Select all

     do
            call SetForH(Params,CMB,(try_b+try_t)/2, .false.)
            D_try = CMBToTheta(CMB)
               if &#40;D_try < DA&#41; then
                  try_b = &#40;try_b+try_t&#41;/2
               else
                  try_t = &#40;try_b+try_t&#41;/2
               end if
               if &#40;abs&#40;D_try - lasttry&#41;< 1e-7&#41; exit
              lasttry = D_try
     end do
Could you share any ideas about why this happens?
Thank you very much!

Post Reply