[CosmoMC] Error with params.ini file - Planck likelihood not found

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Mason Ng
Posts: 26
Joined: May 17 2017
Affiliation: The University of Auckland

[CosmoMC] Error with params.ini file - Planck likelihood not

Post by Mason Ng » June 15 2017

I have managed to successfully build CosmoMC and the Planck likelihood on the cluster environment. I have also run (separately)

Code: Select all

mpirun -np 2 ./cosmomc test.ini
mpirun -np 2 ./cosmomc test_planck.ini 
which both produce outputs that are as expected. I am now trying to obtain test chains through params_generic.ini and I am getting the following error in the job log:

Code: Select all

Number of MPI processes:           2
 Error :params_generic.ini , include file not found: ./data/clik/hi_l/plik/plik_
 dx11dr2_HM_v18_TT.clik
 MpiStop:            0
 Error :params_generic.ini , include file not found: ./data/clik/hi_l/plik/plik_
 dx11dr2_HM_v18_TT.clik
application called MPI_Abort(MPI_COMM_WORLD, 1818192232) - process 0
In: PMI_Abort(1818192232, application called MPI_Abort(MPI_COMM_WORLD, 1818192232) - process 0)
 MpiStop:            1
application called MPI_Abort(MPI_COMM_WORLD, 1818192232) - process 1
In: PMI_Abort(1818192232, application called MPI_Abort(MPI_COMM_WORLD, 1818192232) - process 1)
slurmstepd: error: *** STEP 64118033.0 ON compute-a1-052 CANCELLED AT 2017-06-15T14:16:51 ***
srun: Job step aborted: Waiting up to 122 seconds for job step to finish.
srun: error: compute-a1-052: tasks 0-1: Killed
It is probably something to do with the params_generic.ini file - it is here:

Code: Select all

#Sample parameters for cosmomc used as a generic sampler
#Write your likelihood function in calclike.f90

generic_mcmc=T
parameterization=generic

#Folder where files (chains, checkpoints, etc.) are stored
root_dir = chains/

#Root name for files produced
file_root = planck_best_fit

#action = 0, to MCMC, action=1, postprocess .data file
action = 0

#general settings
#Planck 2015 likelihoods
INCLUDE(./data/clik/hi_l/plik/plik_dx11dr2_HM_v18_TT.clik)
INCLUDE(./data/clik/low_l/commander/commander_rc2_v1.1_l2_29_B.clik)
#NOTE: I have tried both "INCLUDE" and "DEFAULT". 
#You can either use numbered parameters, or, usually better, define a parameter name file as below
#num_theory_params = 2
#e.g. for 2D Gaussian
#param[param1] = 0 -20 20 1 1
#param[param2] = 0 -20 20 1 1

#alternative using parameter names from your generic_example.paramnames file
ParamNamesFile = ./batch2/params_CMB_defaults.ini
#param[mypar1] = 0 -20 20 1 1
#param[mypar2] = 0 -20 20 1 1

#Max samples to get
samples = 100000

#Use vanilla MCMC here since no speed hierarchy defined
sampling_method = 1
use_fast_slow = F

estimate_propose_matrix = F
delta_loglike = 2

propose_scale = 2.4

#Temperature at which to Monte-Carlo
temperature = 1

#Feedback level ( 2=lots,1=chatty,0=less,-1=minimal)
feedback = 1

#Can re-start from the last line of previous run (.txt file)
continue_from =

#Increase to oversample fast parameters,e.g. if space is odd shape
oversample_fast = 1

#Can use covariance matrix for proposal density, otherwise use settings below
#Covariance matrix can be produced using "getdist" prorgram.
propose_matrix =

#If action = 1
redo_likelihoods = T
redo_theory = F
redo_cls = F
redo_pk = F
redo_skip = 0
redo_outroot =
redo_thin = 1
#If large difference in log likelihoods may need to offset to give sensible weights
#for exp(difference in likelihoods)
redo_likeoffset =  0

#Number of distinct points to sample
#Every accepted point is included

#number of steps between independent samples
#if non-zero all info is dumped to file file_root.data
#if you change this probably have to change output routines in code too
indep_sample = 0

#number of samples to disgard at start
#May prefer to set to zero and remove later
burn_in = 0

#If zero set automatically
num_threads = 0

#MPI mode multi-chain options (recommended)
#MPI_Converge_Stop is a (variance of chain means)/(mean of variances) parameter that can be used to stop the chains
#Set to a negative number not to use this feature. Does not guarantee good accuracy of confidence limits.
MPI_Converge_Stop = 0.01
#if MPI_LearnPropose = T, the proposal density is continally updated from the covariance of samples so far (since burn in)
MPI_LearnPropose = T

#Can optionally also check for convergence of confidence limits (after MPI_Converge_Stop  reached)
MPI_Check_Limit_Converge = T

#if MPI_Check_Limit_Converge = T, give tail fraction to check (checks both tails):
MPI_Limit_Converge = 0.025
#And the permitted percentil chain variance in units of the standard deviation (small values v slow):
MPI_Limit_Converge_Err = 0.1
#which parameter's tails to check. If zero, check all parameters:
MPI_Limit_Param = 0

#If have covmat, R to reach before updating proposal density (increase if covmat likely to be poor)
#Only used if not varying new parameters that are fixed in covmat
MPI_Max_R_ProposeUpdate = 2
#As above, but used if varying new parameters that were fixed in covmat
MPI_Max_R_ProposeUpdateNew = 30


#if blank this is set from system clock
rand_seed =

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

Re: [CosmoMC] Error with params.ini file - Planck likelihood

Post by Antony Lewis » June 15 2017

The provided params_generic (intended for doing on-cosmology runs) does not have any of those INCLUDE lines. See test_planck.ini for how to include Planck files and the readme for how to install them.

Mason Ng
Posts: 26
Joined: May 17 2017
Affiliation: The University of Auckland

Re: [CosmoMC] Error with params.ini file - Planck likelihood

Post by Mason Ng » June 15 2017

Antony Lewis wrote:The provided params_generic (intended for doing on-cosmology runs) does not have any of those INCLUDE lines. See test_planck.ini for how to include Planck files and the readme for how to install them.
Thanks for the reply. I did try both "DEFAULT" and "INCLUDE" lines and they both result in the same error message.

I have seen test_planck.ini before as well, and I see that it uses the likelihood from batch2 (so with .ini). I was under the impression that I could do the same thing if I did

Code: Select all

DEFAULT(./data/clik/hi_l/plik/plik_dx11dr2_HM_v18_TT.clik)
It seems like I had the wrong idea?

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

Re: [CosmoMC] Error with params.ini file - Planck likelihood

Post by Antony Lewis » June 15 2017

Mason Ng wrote:
Antony Lewis wrote: It seems like I had the wrong idea?
Yes

Post Reply