cmbant / CosmoMC

MCMC parameter sampling code
https://cosmologist.info/cosmomc/
81 stars 68 forks source link

Issue with using action=2 (BOBYQA) #36

Open AvivTheMan opened 3 years ago

AvivTheMan commented 3 years ago

When running the minimizer with action=2 in the CosmoMC May 2020 release (for example, on the Planck 2018 data or BAO compilation), it crashes every time with output similar to:

Caught signal 11 (Segmentation fault: address not mapped to object at address (nil))

The stack looks like:

0 0x0000000000010e90 __funlockfile()  ???:0
1 0x00000000007bd4ba __intel_avx_rep_memcpy()  ???:0
2 0x00000000006cca34 do_alloc_copy()  for_alloc_copy.c:0
3 0x00000000006cceef do_alloc_copy()  for_alloc_copy.c:0
4 0x00000000006ce10c for_alloc_assign_v2()  ???:0
5 0x00000000005ae7ac results_mp_cambdata_setparams_()  ???:0
6 0x00000000004a2ce7 calculator_camb_mp_cambcalc_initcamb_()  ???:0
7 0x000000000049f24d calculator_camb_mp_cambcalc_cmbtotheta_()  ???:0
8 0x0000000000545928 cosmologyparameterizations_mp_tp_paramarraytotheoryparams_()  ???:0
9 0x000000000048d62f calclike_cosmology_mp_tcosmolikecalculator_settheoryparams_()  ???:0
10 0x000000000054bb0a calclike_mp_theorylike_getloglikemain_()  ???:0
11 0x00000000005499c9 calclike_mp_getloglike_()  ???:0
12 0x000000000046fd56 minimize_mp_tpowellminimizer_findbestfit_()  ???:0
13 0x0000000000554c22 MAIN__()  ???:0
14 0x000000000040f34e main()  ???:0
15 0x00000000000202e0 __libc_start_main()  ???:0
16 0x000000000040f26a _start()  /tmp/nix-build-glibc-2.24.drv-0/glibc-2.24/csu/../sysdeps/x86_64/start.S:120

I've seen this issue appear in CosmoCoffee (https://cosmocoffee.info/viewtopic.php?t=3207); however, the fix to camb/fortran/ mentioned near the end seems to already be implemented, yet it still results in the above error.

Any help would be appreciated. Thanks!

cmbant commented 3 years ago

Sorry I don't know what causes this, if you figure it out a pull request would be welcome. Otherwise you can try using the same function Cobaya.