Basic questions of using cosmomc with some changes

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Marianne Talvitie
Posts: 8
Joined: November 20 2009
Affiliation: University of Helsinki

Basic questions of using cosmomc with some changes

Post by Marianne Talvitie » December 12 2009

Hi,
As a new user to Cosmomc I have a few very basic questions:

1) I intend to use WMAP5yr + Acbar + SN data. For this, I have increased the lmax to 3000 but running cosmomc still gives the warning:
Warning: Window function non-zero outside l_max: data/windows/acbar2007_v3_corr_21 assuming contribution is negligible.
Should I still increase the lmax?

2) My first model should use seven parameters, which are already defined in params.ini and elsewhere, so I only need to reduce the nbr of already defined parameters accordingly. Should I do this by setting all the values (max, min etc) of the excess parameters to "0" in the params.ini or comment them away, i.e.:

Code: Select all

param[w] = 0 0 0 0 0
or

Code: Select all

#param[w] = -1 -1 -1 0 0
and then define

Code: Select all

cov_matrix_dimension = 7
in the distparams.ini file? Will it work this way like I want it to?

3) If I change the pivot scale in params.ini to e.g. 0.01, do I need to change it elsewhere also, e.g. in cmbtypes.f90, where the pivot scale also seems to be given?

4) After re-compiling with my changes, the program starts to run but stops pretty soon with a segmentation fault, entire output:
/cosmomc$ ./cosmomc params.ini
Random seeds: 16082, 6581 rand_inst: 0
Reading BCP data set: data/acbar2007_v3_corr.newdat
Reading: acbar2007_v3_corr_
Using selected band ranges
Warning: Window function non-zero outside l_max: data/windows/acbar2007_v3_corr_21
assuming contribution is negligible
Warning: Window function non-zero outside l_max: data/windows/acbar2007_v3_corr_22
assuming contribution is negligible
Warning: Window function non-zero outside l_max: data/windows/acbar2007_v3_corr_23
assuming contribution is negligible
Warning: Window function non-zero outside l_max: data/windows/acbar2007_v3_corr_24
assuming contribution is negligible
Warning: Window function non-zero outside l_max: data/windows/acbar2007_v3_corr_25
assuming contribution is negligible
Computing tensors: F
Doing CMB lensing: T
lmax = 3000
Number of C_ls = 3
Varying 7 parameters ( 0 fast)
reading: params_CMB.covmat
starting Monte-Carlo
Reading: supernovae data (SDSS).
Reading: data/MLCS.FITRES
Using 288 SNe from subset SDSS + ESSENCE + SNLS + LOWZ + HST.
reading WMAP5 data
Initializing WMAP likelihood, version v3
Segmentation fault
_____________________
Where can this segmentation fault come from? I have only changed lines in the files params.ini, distparams.ini and cmbtypes.f90. In addition to the abovementioned changes, I have set:
use_HST = F
...
use_Age_Tophat_Prior = F
use_SN = T
...
CMB_lensing = T
Without my changes described above, cosmomc seems to compile and run just fine.
I will be very grateful if somebody can take the time to guide me a bit forward.

Br,
Marianne

Marianne Talvitie
Posts: 8
Joined: November 20 2009
Affiliation: University of Helsinki

Cosmomc October 2009 Update: Basic questions of using cosmom

Post by Marianne Talvitie » December 16 2009

One more note:
It now seems obvious that the segmentation fault is somehow caused by acbar data. Leaving the acbar data out makes the calculation work. Lensing = T/F does not affect the occurrence of the fault.

Br,
Marianne

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

Re: Cosmomc October 2009 Update: Basic questions of using co

Post by Antony Lewis » December 16 2009

1. You'd have to check the acbar window functions to assess any error from truncation (but probably it is fine)

2. You can set to be fixed and leave cov_matrix_dimension unchanged, e.g.
param[w] = -1 -1 -1 0 0

3. If in doubt you can trace through the code where things are using; the pivot scale should be OK to change in the .ini

Not sure off hand what causes your seg fault.

Marianne Talvitie
Posts: 8
Joined: November 20 2009
Affiliation: University of Helsinki

Basic questions of using cosmomc with some changes

Post by Marianne Talvitie » December 21 2009

Thank you very much for these hints, I managed to get rid of the problem in point 1. by checking the l values in the acbar data and changing l_max accordingly. Point 2. and 3. were also clarified so the remaining problem is the segmentation fault. It appears only when the acbar data is included on my computer. When my params.ini file was copied and run on another system, cosmomc was running ok also with acbar data.
My cosmomc runs on Linux Ubuntu v.8.10 with gfortran compiler v.4.3.
How can I track where the problem happens and the program stops? Then it should be possible to provide more information about the problem.
Thanks,
Marianne

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

Re: Basic questions of using cosmomc with some changes

Post by Antony Lewis » December 21 2009

Compile with debugging and stack trace options. Or, better, use a debugger (I use Visual Fortran).

Matti Savelainen
Posts: 1
Joined: January 05 2010
Affiliation: University of Helsinki

Basic questions of using cosmomc with some changes

Post by Matti Savelainen » January 07 2010

I have also installed the new cosmomc using Louhi/csc super computer. The programming environment is Pathscale. The fault messages are like:
________________________________________________________

**** Segmentation fault! Fault address: 0x54

Fault address is 4194220 bytes below the first valid
mapping boundary, which is at 0x400000.

This may have been caused by a struct access through a null pointer.
Abort
___________________________________________

I have localized the problem to the moment when CMBLikes_CMBLike is called in cmbdata.F90 line ~860:

chisq = CMBLikes_CMBLike(aset%CMBLikes, cl, nuisance_params)

There is something funny in line ~980 in cmbdata.F90:

tot(i) = CalcLnLike(szcl,datasets(i), nuisance_params(nuisance:))

Changeing and this doing other minor changes around nuisance_paramsl could not fix the problem. Any help??
BR: Matti Savelainen

My ini file starts is listed here:
__________________________________________________________
#Sample parameters for cosmomc in default parameterization

#Root name for files produced
file_root = chains/MS5test

#action = 0: MCMC, action=1: postprocess .data file, action=2: find best fit point only
action = 0

#Maximum number of chain steps
samples = 200000

#Feedback level ( 2=lots,1=chatty,0=none)
feedback = 1

#Temperature at which to Monte-Carlo
temperature = 1

#filenames for CMB datasets and SZ templates (added to C_l times parameter(13))
#Note you may need to change lmax in cmbtypes.f90 to use small scales (e.g. lmax=2100)
cmb_numdatasets = 2
cmb_dataset1 = WMAP
cmb_dataset_SZ1 = data/WMAP_SZ_VBand.dat
cmb_dataset_SZ_scale1 = 1

cmb_dataset2 = data/acbar2007_l2000.newdat
cmb_dataset_SZ2 = data/WMAP_SZ_VBand.dat
cmb_dataset_SZ_scale2 = 0.28

#cmb_dataset3 = data/CBIpol_2.0_final.newdat
#cmb_dataset4 = data/B03_NA_21July05.newdat
______________________________________________-

Post Reply