COSMOMC April 2013: bug with 'propose_matrix'

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Francesco Montesano
Posts: 11
Joined: June 14 2012
Affiliation: MPE, Garching, Germany

COSMOMC April 2013: bug with ''propose_matrix''

Post by Francesco Montesano » May 03 2013

In my inifile I have set

Code: Select all

propose_matrix=%LOCALDIR%planck_covmats/base_planck_lowl_lowLike.covmat
and when running cosmomc I get and error because %LOCALDIR% is not substituted.

The source of the problem is at line 286 of paramdef.F90. Substituting

Code: Select all

prop_mat = trim(Ini_Read_String_File(Ini,'propose_matrix'))
(function from camb/inifile.f90) with

Code: Select all

prop_mat = trim(ReadIniFileName(Ini,'propose_matrix'))
(function from source/settings.f90) solves the problem

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

Re: COSMOMC April 2013: bug with ''''propose_matrix''''

Post by Antony Lewis » May 03 2013

Thanks, though i think the location is automatically relative to localDir so you don't have to put the placeholder here.

Francesco Montesano
Posts: 11
Joined: June 14 2012
Affiliation: MPE, Garching, Germany

COSMOMC April 2013: bug with ''propose_matrix''

Post by Francesco Montesano » May 03 2013

Thanks, though i think the location is automatically relative to localDir so you don't have to put the placeholder here.
Yes it is so. In fact I was getting the errors saying that

Code: Select all

localDir/%LOCALDIR%planck_covmats/base_planck_lowl_lowLike.covmat
does not exists, of course.

Anyway, I think that all keywords hosting file names should have the same behavior, to avoid confusion. Thus my suggestion for the fix. And I think that in this way there is more freedom about where to store the covariance matrices.

Francesco Montesano
Posts: 11
Joined: June 14 2012
Affiliation: MPE, Garching, Germany

COSMOMC April 2013: bug with ''propose_matrix''

Post by Francesco Montesano » May 04 2013

For the records, to allow to use

Code: Select all

 cmb_dataset_SZ1 = %DATASETDIR%wmap_sz_spectrum_61GHz_v5.txt
in the inifiles I've modified source/cmbdata.F90 from

Code: Select all

if (Ini_HasKey_File(Ini,KeyName)) SZTemplate = Ini_Read_String_File(Ini,keyname, .false.)
to

Code: Select all

if (Ini_HasKey_File(Ini,KeyName)) SZTemplate = ReadIniFileName(Ini,keyname,NotFoundFail=.false.)

Post Reply