Quantcast
Viewing all articles
Browse latest Browse all 173

Computers and software • Re: Cobaya error using HyRec

Hi,
Thanks to the advice here, I successfully ran Cobaya in a normal setting.
So next, I want to try to run Cobaya using CAMB and HyRec.

I have already confirmed that CAMB runs well with the following command:

Code:

camb ./inifiles/params.ini
and I have rewritten params.ini as follows:

Code:

new_par        = 1            #my new model parameternew_par2       = 1.05             #my new model parameter 2recombination_model = HyRec

Then, I ran COBAYA with the following yaml file

Code:

theory:  camb:    extra_args:      lens_potential_accuracy: 1      num_massive_neutrinos: 1      recombination_model:  HyRec      nnu: 3.044      theta_H0_range:      - 20      - 100likelihood:  H0.freedman2020: null  sn.pantheonplus: null  bao.desi_2024_bao_all: null  planck_2018_lowl.TT: null  planck_2018_lowl.EE: null  planck_NPIPE_highl_CamSpec.TTTEEE: null  planckpr4lensing:    package_install:      github_repository: carronj/planck_PR4_lensing      min_version: 1.0.2params:  logA:    prior:      min: 1.61      max: 3.91    ref:      dist: norm      loc: 3.05      scale: 0.001    proposal: 0.001    latex: \log(10^{10} A_\mathrm{s})    drop: true  new_par:    prior:      min: 0.9      max: 1.1    ref:      dist: norm      loc: 1      scale: 0.01    proposal: 0.005    latex: newpar1  new_par2:    prior:      min: 0.9      max: 1.1    ref:      dist: norm      loc: 1      scale: 0.01    proposal: 0.005    latex: newpar2  As:    value: 'lambda logA: 1e-10*np.exp(logA)'    latex: A_\mathrm{s}  ns:    prior:      min: 0.8      max: 1.2    ref:      dist: norm      loc: 0.965      scale: 0.004    proposal: 0.002    latex: n_\mathrm{s}  theta_MC_100:    ・・・
and I obtained the following error:

Code:

[toda@hpc03 work]$ cobaya-run -M Test3.yaml[output] Output to be read-from/written-into folder 'chains_me', with prefix 'me'[camb] `camb` module loaded successfully from /home/toda/work/path/to/packages/code/CAMB_me/camb[bao.desi_2024_bao_all] Initialized.[planck_npipe_highl_camspec.ttteee] L-range for 143x143: 30 2000[planck_npipe_highl_camspec.ttteee] L-range for 217x217: 500 2500[planck_npipe_highl_camspec.ttteee] L-range for 143x217: 500 2500[planck_npipe_highl_camspec.ttteee] L-range for TE: 30 2000[planck_npipe_highl_camspec.ttteee] L-range for EE: 30 2000[planck_npipe_highl_camspec.ttteee] Number of data points: 9915[minimize] Initializing/home/toda/work/cobaya/cobaya/model.py:88: RuntimeWarning: overflow encountered in scalar add  sum(self.loglikes) if self.loglikes is not None else None)[minimize] Run 1/2 will start from random initial point:[minimize] {'logA': 3.0486453461409546, 'new_par': 1.0072769879794776, 'new_par2': 0.99693123809272, 'ns': 0.957368604845639, 'theta_MC_100': 1.0411859130206975, 'ombh2': 0.022586477907162197, 'omch2': 0.12064944127770272, 'tau': 0.056125968446188605, 'A_planck': 1.000694383715175, 'amp_143': 7.28911263092761, 'amp_217': 20.82221335583108, 'amp_143x217': 10.147448499739776, 'n_143': 0.9066416621134722, 'n_217': 1.2927021273986556, 'n_143x217': 0.8896568522174871, 'calTE': 1.001620284022922, 'calEE': 0.9934030264531668}[minimize] Run 2/2 will start from random initial point:[minimize] {'logA': 3.0508425371747867, 'new_par': 1.00728155250226, 'new_par2': 0.9988034607576631, 'ns': 0.9638508137362026, 'theta_MC_100': 1.041364451637785, 'ombh2': 0.022282413684969964, 'omch2': 0.11889926537537034, 'tau': 0.06624427071674205, 'A_planck': 0.9987275086858627, 'amp_143': 10.661304231524392, 'amp_217': 19.839607972540747, 'amp_143x217': 10.546776671778067, 'n_143': 1.0563217087122478, 'n_217': 0.9610368832917634, 'n_143x217': 1.0184536907693362, 'calTE': 1.0030946949124595, 'calEE': 0.9926984550637672}[prior] *WARNING* There are unbounded parameters (['A_planck', 'calEE', 'calTE']). Prior bounds are given at 0.9999995 confidence level. Beware of likelihood modes at the edge of the prior[minimize] Starting run 1/2[minimize] Run 1/2 converged.[minimize] Starting run 2/2[minimize] Run 2/2 converged.[minimize] Finished successfully![minimize] -log(posterior) minimized to 1.79769e+308[minimize] *ERROR* Cannot reproduce log minimum to within 0.01. Maybe your likelihood is stochastic or large numerical error? Recomputed min: -inf (was -1.79769e+308) at array([ 3.04864535,  1.00727699,  0.99693124,  0.9573686 ,  1.04118591,        0.02258648,  0.12064944,  0.05612597,  1.00069438,  7.28911263,       20.82221336, 10.1474485 ,  0.90664166,  1.29270213,  0.88965685,        1.00162028,  0.99340303])[exception handler] ---------------------------------------Traceback (most recent call last):  File "/usr/local/bin/cobaya-run", line 8, in <module>    sys.exit(run_script())  File "/home/toda/work/cobaya/cobaya/run.py", line 191, in run_script    run(info, **arguments.__dict__)  File "/home/toda/work/cobaya/cobaya/run.py", line 143, in run    sampler.run()  File "/home/toda/work/cobaya/cobaya/samplers/minimize/minimize.py", line 342, in run    self.process_results(*mpi.zip_gather(  File "/home/toda/work/cobaya/cobaya/mpi.py", line 274, in wrapper    result = method(self, *args, **kwargs)  File "/home/toda/work/cobaya/cobaya/samplers/minimize/minimize.py", line 389, in process_results    raise LoggedError(cobaya.log.LoggedError: Cannot reproduce log minimum to within 0.01. Maybe your likelihood is stochastic or large numerical error? Recomputed min: -inf (was -1.79769e+308) at array([ 3.04864535,  1.00727699,  0.99693124,  0.9573686 ,  1.04118591,        0.02258648,  0.12064944,  0.05612597,  1.00069438,  7.28911263,       20.82221336, 10.1474485 ,  0.90664166,  1.29270213,  0.88965685,        1.00162028,  0.99340303])-----------------------------------------------

I guess the error is due to the Cobaya source file not being changed, but I don't know which specific Cobaya source file I need to modify.
Could you tell me which file I should modify?

Thank you for your attention and future advice.

Statistics: Posted by Yo Toda — February 23 2025



Viewing all articles
Browse latest Browse all 173

Trending Articles