baudren / montepython_public

Public repository for the Monte Python Code
MIT License
65 stars 114 forks source link

MontePython with MultiNest - seg fault #122

Open susanpyne opened 5 years ago

susanpyne commented 5 years ago

I have been running with Metropolis-Hastings with no problems. I just started using MultiNest instead and I'm getting segmentation faults - sometimes before any MultiNest output and sometimes after many lines of sample size/evidence values.

Also get CLASS error messages but I don't think these are the cause. Error in Class: background_init(L:657) :error in background_solve(ppr,pba); =>background_solve(L:1587) :condition ((tau_end-tau_start)/tau_start < ppr->smallest_allowed_variation) is true; integration step: relative change in time =1.164104e-16 < machine precision : leads either to numerical error or infinite loop

Any suggestions why the seg faults happen, what I can do about it, how I can track the problem down?

PS others have been advised to go to latest github to report issues, but the forum link there just comes back to here.

brinckmann commented 5 years ago

We will need more information, e.g. on which likelihoods are being used.

The links to the new github page work fine for me: https://github.com/brinckmann/montepython_public Note that the pages look very similar since the new one is forked from the old github page. As such you can also find it under forks of this github page, or by navigating through my profile. Best, Thejs

susanpyne commented 5 years ago

I'll reply through the new page. The problem is the link to 'forum'. It's fine if you go through 'issues' which clearly several people (like me) have not done.

brinckmann commented 5 years ago

Oh, thanks a lot! I hadn't updated the link. I will do that for the next release.

kssiobr commented 5 years ago

Hey! I'm also trying to run MontePython with MultiNest and I'm facing the following problem:

Error in Class: background_init(L:634) :condition (pba->shooting_failed == TRUE) is true; Shooting failed, try optimising input_get_guess(). Error message:

input_init(L:330) :error in input_find_root(&xzero, &fevals, &fzw, errmsg); =>input_find_root(L:4011) :error in input_fzerofun_1d(x1, pfzw, &f1, errmsg); =>input_fzerofun_1d(L:3548) :error in input_try_unknown_parameters(&input, 1, pfzw, output, error_message); =>input_try_unknown_parameters(L:3733) :error in thermodynamics_init(&pr,&ba,&th); =>thermodynamics_init(L:390) :error in thermodynamics_recombination(ppr,pba,pth,preco,pvecback); =>thermodynamics_recombination(L:2611) :error in thermodynamics_recombination_with_recfast(ppr,pba,pth,preco,pvecback); =>thermodynamics_recombination_with_recfast(L:3253) :error in generic_integrator(thermodynamics_derivs_with_recfast, zstart, zend, y, &tpaw, ppr->tol_thermo_integration, ppr->smallest_allowed_variation, &gi); =>generic_integrator(L:112) :error in rkqs(&x, h, eps, &hdid, &hnext, derivs, parameters_and_workspace_for_derivs, pgi); =>rkqs(L:156) :condition (xnew == *x) is true; stepsize underflow at x=nan


The *.param file is written as follows:

------Experiments to test (separated with commas)-----

data.experiments=['Planck_highl','Planck_lowl','Planck_lensing']

------ Settings for the over-sampling.

data.over_sampling=[1, 4]

------ Parameter list -------

Cosmological parameters list

data.parameters['omega_b'] = [2.249, 1.8, 3, 0.016, 0.01,'cosmo'] data.parameters['omega_cdm'] = [0.1120, 0.1, 0.2, 0.0016,1, 'cosmo'] data.parameters['n_s'] = [0.963, 0.9,1.1, 0.004, 1, 'cosmo']

data.parameters['A_s'] = [2.42, 1.8,3, 0.038, 1e-9,'cosmo']

data.parameters['h'] = [0.703, 0.6,0.8, 0.0065,1, 'cosmo']

data.parameters['tau_reio'] = [0.085, 0.04,0.12, 0.0044,1, 'cosmo'] data.parameters['100*theta_s'] = [ 1.0418, 0.01, 4, 3e-4, 1, 'cosmo'] data.parameters['ln10^{10}A_s'] = [ 3.0753, 2, 4 , 0.0029, 1, 'cosmo']

Nuisance parameter list, same call, except the name does not have to be a class name

data.parameters['A_cib_217'] = [ 61, 0, 200, 7, 1,'nuisance'] data.parameters['cib_index'] = [ -1.3, -1.3, -1.3, 0, 1,'nuisance'] data.parameters['xi_sz_cib'] = [ 0.13, 0, 1, 0.3, 1,'nuisance'] data.parameters['A_sz'] = [ 6.86, 0, 10, 1.9, 1,'nuisance'] data.parameters['ps_A_100_100'] = [ 222.9, 0, 400, 30, 1,'nuisance'] data.parameters['ps_A_143_143'] = [ 38, 0, 400, 8, 1,'nuisance'] data.parameters['ps_A_143_217'] = [ 35.2, 0, 400, 10, 1,'nuisance'] data.parameters['ps_A_217_217'] = [ 102.6, 0, 400, 11, 1,'nuisance'] data.parameters['ksz_norm'] = [ 0, 0, 10, 4.2, 1,'nuisance'] data.parameters['gal545_A_100'] = [ 6.75, 0, 50, 1.8, 1,'nuisance'] data.parameters['gal545_A_143'] = [ 9.41, 0, 50, 1.8, 1,'nuisance'] data.parameters['gal545_A_143_217'] = [ 19.28, 0, 100, 4.2, 1,'nuisance'] data.parameters['gal545_A_217'] = [ 81.7, 0, 400, 7.9, 1,'nuisance'] data.parameters['calib_100T'] = [ 998.59, 0, 3000, 0.73, 0.001,'nuisance'] data.parameters['calib_217T'] = [ 995.89, 0, 3000, 1.4, 0.001,'nuisance'] data.parameters['A_planck'] = [100.028, 90, 110, 0.25, 0.01,'nuisance']

Derived parameters

data.parameters['z_reio'] = [1, None, None, 0, 1, 'derived'] data.parameters['Omega_Lambda'] = [1, None, None, 0, 1, 'derived']

data.parameters['Y_He'] = [1, None, None, 0, 1, 'derived']

data.parameters['H0'] = [0, None, None, 0, 1, 'derived'] data.parameters['A_s'] = [0, None, None, 0, 1e-9, 'derived'] data.parameters['sigma8'] = [0, None, None, 0, 1, 'derived']

Other cosmo parameters (fixed parameters, precision parameters, etc.)

data.cosmo_arguments['sBBN file'] = data.path['cosmo']+'/bbn/sBBN.dat'

data.cosmo_arguments['k_pivot'] = 0.05

The base model features two massless

and one massive neutrino with m=0.06eV.

The settings below ensures that Neff=3.046

and m/omega = 93.14 eV

data.cosmo_arguments['N_ur'] = 2.0328 data.cosmo_arguments['N_ncdm'] = 1 data.cosmo_arguments['m_ncdm'] = 0.06 data.cosmo_arguments['T_ncdm'] = 0.71611 data.cosmo_arguments['YHe'] = 0.24

These two are required to get sigma8 as a derived parameter

(class must compute the P(k) until sufficient k)

data.cosmo_arguments['output'] = 'mPk' data.cosmo_arguments['P_k_max_h/Mpc'] = 1.

------ Mcmc parameters ----

data.N=10 data.write_step=5


Thanks!

Cristian1200 commented 4 years ago

Hi , I have been running MontePython to create the chains, but when I want to create new chains and I run a file.param where the parameters w0_fld and wa_fld are variying, I get the following error in the terminal : Cosmological Module Error: /|\ Something went wrong when calling CLASS /o\ Error in Class: Class did not read input parameter(s): w0_fld, wa_fld

I don't know what is happening, because in my class version I have the file background.h where are defined wa_fld and w0_fld.

Thanks!

am610 commented 3 years ago

@Cristian1200 https://github.com/lesgourg/class_public/issues/88 see this thread