jacopo-chevallard / BEAGLE-general

Basic information to get started with the galaxy spectral modelling tool Beagle
https://www.iap.fr/beagle/
9 stars 0 forks source link

Error while fitting Photometry: ERROR: `Inf` or `NaN` detected in the star formation history `dM` array! #84

Closed lukasfurtak closed 5 years ago

lukasfurtak commented 5 years ago

Hi,

I get this error from BEAGLE when trying to fit a 'rising' SFH galaxy with the attached parameter files: beagle_test.tar.gz

---> fitted: mass
---> fitted: redshift
---> fitted: tau
---> fitted: max_stellar_age 
---> fitted: metallicity
---> fitted: tauv_eff
n_fitted:            6
*****************************************************
MultiNest v3.9
Copyright Farhan Feroz & Mike Hobson
Release Oct 2014

no. of live points =  150
dimensionality =    6
*****************************************************
Starting MultiNest
generating live points
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[ERROR: 'Inf' or 'NaN' detected in the star formation history 'dM' array! ]
[FUNCTION: "get_star_formation_history" ]
[MODULE: "star_formation" ]

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7ff1ab33437a in ???
#1  0x7ff1ab3335a3 in ???
#2  0x7ff1aa9aef1f in ???
#3  0x55e33d1b86f2 in print_backtrace
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/astrofortran-src/src/lib_messages.f90:869
#4  0x55e33d1ba671 in __lib_messages_MOD_print_error
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/astrofortran-src/src/lib_messages.f90:819
#5  0x55e33d3d406b in __star_formation_MOD_get_star_formation_history
        at /root/src/github.com/jacopo-chevallard/BEAGLE/src/star_formation.f90:820
#6  0x55e33d35186f in __galaxy_sed_MOD_compute_sed
        at /root/src/github.com/jacopo-chevallard/BEAGLE/src/galaxy_SED.f90:195
#7  0x55e33d3ab519 in __likelihood_function_MOD_likelihood
        at /root/src/github.com/jacopo-chevallard/BEAGLE/src/likelihood_function.f90:203
#8  0x55e33d3b168b in __likelihood_function_MOD_mc_likelihood
        at /root/src/github.com/jacopo-chevallard/BEAGLE/src/likelihood_function.f90:120
#9  0x55e33cfd5dce in getloglike
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/mcfor-src/src/nested_sampling.f90:224
#10  0x55e33d00f802 in __nested_MOD_gen_initial_live
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/multinest-src/nested.F90:536
#11  0x55e33d010ee2 in __nested_MOD_nestsample
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/multinest-src/nested.F90:352
#12  0x55e33d01227b in __nested_MOD_nestrun
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/multinest-src/nested.F90:239
#13  0x55e33cfd631c in __nested_sampling_MOD_run_nested_sampling
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/mcfor-src/src/nested_sampling.f90:137
#14  0x55e33cfc963a in __prosit_MOD_sample_pdf
        at /root/src/github.com/jacopo-chevallard/BEAGLE/build/dependencies/mcfor-src/src/PROSIT.f90:322
#15  0x55e33cf8e23e in beagle
        at /root/src/github.com/jacopo-chevallard/BEAGLE/src/BEAGLE.f90:636
#16  0x55e33cf8a316 in main
        at /root/src/github.com/jacopo-chevallard/BEAGLE/src/BEAGLE.f90:6
lukasfurtak commented 5 years ago

Just as for issue #83 , this seems to work when using BEAGLE version 0.19.7.

jacopo-chevallard commented 5 years ago

@lukasfurtak can you check with version 0.23.0?

lukasfurtak commented 5 years ago

@jacopo-chevallard This error does not appear in version 0.23.0 because it is replaced by a similar error message as in #85 :

[ERROR: "locate" failed, the condition x(i) <= x < x(i+1) is not satisfied, for x=NaN           , x(i)=-3.30103      , x(i+1)=-3.00000 ]
 [FUNCTION: "locate_sp" ]
 [MODULE: "lib_interpolation" ]
jacopo-chevallard commented 5 years ago

I think that the initial error you were getting will be solved using the solution I proposed in https://github.com/jacopo-chevallard/BEAGLE-general/issues/85#issuecomment-511134496 (chanign the prior range for a rising SFH), @lukasfurtak you can then check if you're still getting the error above

jacopo-chevallard commented 5 years ago

@lukasfurtak same for this one, can we close?

lukasfurtak commented 5 years ago

@jacopo-chevallard : You are right, this one is also solved by using viable priors on tau you as suggested in #85 ! Thanks! Also closing this issue then ;)