## CosmoMC - number of parameters changed

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Clement Leloup
Posts: 2
Joined: April 23 2018
Affiliation: CEA/Irfu

### CosmoMC - number of parameters changed

Hello,

I'm currently having trouble to perform importance sampling with CosmoMC. I want to add the constraints from the JLA supernovae data to chains that were run only with planck data. So I took my .ini file and changed this :

Code: Select all

action = 0 > action = 1

> DEFAULT&#40;batch2/JLA.ini&#41;
> redo_likelihoods = T
> redo_theory = F
> redo_cls = F
> redo_pk = F
> redo_skip = 0
> redo_outroot = mypath
> redo_thin = 1
> redo_add = F
> redo_from_text = F

But when I try to run with these settings, I get the following error :

Code: Select all

ReadModel&#58; number of parameters changed
MpiStop&#58;            0
application called MPI_Abort&#40;MPI_COMM_WORLD, -1344539000&#41; - process 0
&#91;unset&#93;&#58; write_line error; fd=-1 buf=&#58;cmd=abort exitcode=-1344539000
&#58;
system msg for write_line failure &#58; Bad file descriptor

I managed to understand that this comes from the fact that we need 2 nuisance parameters to run with the JLA sample that are absent when using only planck data : alpha_jla and beta_jla.
So I have two questions :
- how can I do what I'm wanting to do ?
- why does cosmomc stop when the number of parameters with the previous run is not the same as the new one when doing importance sampling since it must be a quite common situation ?

Thanks for your help,
Clement

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

### Re: CosmoMC - number of parameters changed

You can't directly importance sample when the number of parameters changes. Use batch2/JLA_marge.ini instead (which numerically integrates out the nuisance parameters at each step).

Clement Leloup
Posts: 2
Joined: April 23 2018
Affiliation: CEA/Irfu

### CosmoMC - number of parameters changed

Hi Antony,
Thank you for your quick answer !
Quick question : I don't know much about it so, is it inherent to the technique of importance sampling or is it the implementation that forbids to change the number of parameters ?

Thank you again,
Clement

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

### Re: CosmoMC - number of parameters changed

It's certainly inherent to the most usual meaning of importance sampling.