getdist error: ParamNames_AsString: index out of range

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Russell W Johnston
Posts: 6
Joined: January 23 2014
Affiliation: University of the Western Cape

getdist error: ParamNames_AsString: index out of range

Post by Russell W Johnston » January 24 2014

Hello again.

After getting cosmoMC to work in generic mode, I now have a different issue with getdist.

Code: Select all

Reading            7 columns
 reading chains_1.txt
 reading chains_2.txt
 reading chains_3.txt
 reading chains_4.txt
 Number of chains used =             4
 RL: Thin for Markov:         22
 RL: Thin for indep samples:  23
 RL: Estimated burn in steps: 0 (0 rows)
 mean input multiplicity =    2.64981901941428     
 using        15195  rows, processing            5  parameters
 Approx indep samples:         1751
 Best fit -Ln(like) =    156.800000000000     
 Ln(mean 1/like) =    161.730524456866     
 mean(-Ln(like)) =    159.240688334492     
 -Ln(mean like)  =    158.493344556225     
 doing 2D plots for most correlated variables
 Producing           10  2D plots
 ParamNames_AsString: index out of range
*** The MPI_Comm_f2c() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.

So it seems to be this error which I am really not sure what it means:

Code: Select all

ParamNames_AsString: index out of range
Here are the settings in the .ini file I am using:

Code: Select all

columnnum  = 0


file_root     = chains
plot_data_dir = plots



num_params=5

#samples_are_chains = F can be useful for other samples when first two columns not present
#if parameter_names empty set from file_root.paramnames if it exists
#otherwise set up labels manually in this file using lab1=... etc.
parameter_names =
lab1=alpha_1
lab2=alpha_2
lab3=beta_1
lab4=beta_2
lab5=beta_3



#If generated chain at higher temperature can cool for computing results
cool = 1

#If 0 assume 1 and no chain filename prefixes
chain_num = 4
first_chain = 1
exclude_chain =

#width of Gaussian smoothing - Should check plots are robust to changes in
#this parameter. Narrow diagonal distributions need larger number
#Can also check plots by comparing with setting smoothing=F below
num_bins = 20

#For disgarding burn-in if using raw chains
#if < 1 interpreted as a fraction of the total number of rows &#40;0.3 ignores first 30% of lines&#41;
ignore_rows =0.3


plot_ext = py

#Switches; auto_label labels all parameters by their number
no_plots = F
no_tests = F
auto_label = T
samples_are_chains = T

plot_meanlikes = T
shade_meanlikes = T

# if non-zero, output _thin file, thinned by thin_factor
thin_factor = 0
#Do probabilistic importance sampling to single samples
make_single_samples = F
single_thin = 4


#Use a Gaussian smoothing with width of the bin size
#Otherwise use top hat bins
smoothing = T

num_contours = 2
contour1 = 0.68
contour2 = 0.95



#Output 2D plots for param combos with 1D marginalized plots along the diagonal
triangle_plot = T


I have tried commenting out the parameter names, but get same error. I have compiled it using mpif90. However, if you think that I should use a different compiler could you please advise what flags need to be changed in the makefile to get it to work?

Ideally, I would like have the plotting outputs in python.

Thanks in advance

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

getdist error: ParamNames_AsString: index out of range

Post by Jason Dossett » January 24 2014

A quick solution is make a file:

Code: Select all

params_generic.paramnames
Put in the names of your parameters like what is done in params_CMB.paramnames. Something like:

Code: Select all

p1  \alpha_1
p2  \alpha_2
p3  \beta_1
p4  \beta_2
p5  \beta_3.
Then in your .ini file add the line:

Code: Select all

parameter_names = params_generic.paramnames
You can then set your limits for those parameters using:

Code: Select all

limits&#91;p1&#93; = 0 N
etc.

Russell W Johnston
Posts: 6
Joined: January 23 2014
Affiliation: University of the Western Cape

Re: getdist error: ParamNames_AsString: index out of range

Post by Russell W Johnston » January 24 2014

Fantastic! Thanks Jason ;)

Post Reply