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

SIGSEGV: Segmentation fault - invalid memory reference during fit_photometry_example #39

Closed rmastand closed 7 years ago

rmastand commented 7 years ago

When running fit_photometry_example.param with beagle 0.9.2 (though I get the same error with beagle 0.7.2), I get the following error:

There are            8  different filters specified

 ---> fixed                         sfh_type                                   0
 ---> fitted                        mass                                       0
 ---> fitted                        redshift                                   0
 ---> dependent                     nebular_logU                               0
 ---> fixed                         nebular_xi                                 0
 ---> dependent                     nebular_Z                                  0
 ---> fixed                         attenuation_type                           0
 ---> fitted                        tauV_eff                                   0
 ---> fixed                         mu                                         0
 ---> fitted                        tau                                        1
 ---> fitted                        metallicity                                1
 n_fitted:            5
 ---------------------------------------------------------------------------------------------------

 Skipping object: 1.00000000000000

 Fitting object: 2.00000000000000

 Fitting object ID:        2.00000000000000

 *****************************************************
 MultiNest v3.9
 Copyright Farhan Feroz & Mike Hobson
 Release Oct 2014

 no. of live points =  150
 dimensionality =    5
 *****************************************************
 Starting MultiNest
 generating live points

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

Backtrace for this error:
#0  0x7F8F5BE22E08
#1  0x7F8F5BE21F90
#2  0x7F8F5B55449F
#3  0x6708CF in __lib_interpolation_MOD_locate_sp at lib_interpolation.f90:1172
#4  0x494860 in __parameters_handling_MOD_check_parameters_are_valid at parameters_handling.f90:814
#5  0x495D0A in __parameters_handling_MOD_set_and_change_galaxy_parameters at parameters_handling.f90:295
#6  0x45E674 in __likelihood_function_MOD_likelihood at likelihood_function.f90:123 (discriminator 4)
#7  0x4623D5 in __likelihood_function_MOD_mc_likelihood at likelihood_function.f90:93 (discriminator 4)
#8  0x4FD1C9 in __nested_sampling_MOD_getloglike at nested_sampling.f90:223 (discriminator 6)
#9  0x52FD50 in __nested_MOD_gen_initial_live at nested.F90:536
#10  0x5314CC in __nested_MOD_nestsample at nested.F90:352
#11  0x532564 in __nested_MOD_nestrun at nested.F90:239
#12  0x4FD5BC in __nested_sampling_MOD_run_nested_sampling at nested_sampling.f90:136
#13  0x4F7BA2 in __prosit_MOD_sample_pdf at PROSIT.f90:314
#14  0x40773E in MAIN__ at BEAGLE.f90:550

The errors / backtrace for this issue are identical to issue #31, even though the param files are different.

jacopo-chevallard commented 7 years ago

Hi radha, I cannot be of help without the input parameter files attached... can you put them in a tar?

rmastand commented 7 years ago

The files are attached: input_files.tar.gz

Apologies if this is an unrelated issue, but in case it's helpful: I still get the same error as above when I run these files, but when I run the docker comment 4 or more times in a row, the error changes to this:

 There are            8  different filters specified

 ---> fixed                         sfh_type                                   0
 ---> fitted                        mass                                       0
 ---> fitted                        redshift                                   0
 ---> dependent                     nebular_logU                               0
 ---> fixed                         nebular_xi                                 0
 ---> dependent                     nebular_Z                                  0
 ---> fixed                         attenuation_type                           0
 ---> fitted                        tauV_eff                                   0
 ---> fixed                         mu                                         0
 ---> fitted                        tau                                        1
 ---> fitted                        metallicity                                1
 n_fitted:            5
 ----------------------------------------------------------------------------------------------------
           [WARNING: Parameter redshift not found. ]
 [FUNCTION: "find_MCMC_parameter" ]
 [MODULE: "parameters_handling" ]
 ----------------------------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------------------------
           [WARNING: Parameter tauV_eff not found. ]
 [FUNCTION: "find_MCMC_parameter" ]
 [MODULE: "parameters_handling" ]
 ----------------------------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------------------------
           [WARNING: Parameter tau not found. ]
 [FUNCTION: "find_MCMC_parameter" ]
 [MODULE: "parameters_handling" ]
 ----------------------------------------------------------------------------------------------------
 ----------------------------------------------------------------------------------------------------
           [WARNING: Parameter metallicity not found. ]
 [FUNCTION: "find_MCMC_parameter" ]
 [MODULE: "parameters_handling" ]
 ----------------------------------------------------------------------------------------------------

 Skipping object: 1.00000000000000

 Skipping object: 2.00000000000000

 Skipping object: 3.00000000000000

 All observations have been fitted, or *lock files in the results directory prevent from fitting further objects

 Total CPU time:    0.00000000      seconds
rmastand commented 7 years ago

A note -- I have tried this again with the most recent version (0.10.7) and am consistently getting the error above ("All observations have been fitted, or *lock files in the results directory prevent from fitting further objects"). The input files are the same as above as well.

jacopo-chevallard commented 7 years ago

hi radha, the second error that you're getting

All observations have been fitted, or *lock files in the results directory prevent from fitting further objects

tells you that you should remove all *lock files in the results directory, otherwise the objects will be skipped.

The first error that you were getting

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

Backtrace for this error:
#0  0x7F8F5BE22E08
#1  0x7F8F5BE21F90
#2  0x7F8F5B55449F
#3  0x6708CF in __lib_interpolation_MOD_locate_sp at lib_interpolation.f90:1172
#4  0x494860 in __parameters_handling_MOD_check_parameters_are_valid at parameters_handling.f90:814
#5  0x495D0A in __parameters_handling_MOD_set_and_change_galaxy_parameters at parameters_handling.f90:295
#6  0x45E674 in __likelihood_function_MOD_likelihood at likelihood_function.f90:123 (discriminator 4)
#7  0x4623D5 in __likelihood_function_MOD_mc_likelihood at likelihood_function.f90:93 (discriminator 4)
#8  0x4FD1C9 in __nested_sampling_MOD_getloglike at nested_sampling.f90:223 (discriminator 6)
#9  0x52FD50 in __nested_MOD_gen_initial_live at nested.F90:536
#10  0x5314CC in __nested_MOD_nestsample at nested.F90:352
#11  0x532564 in __nested_MOD_nestrun at nested.F90:239
#12  0x4FD5BC in __nested_sampling_MOD_run_nested_sampling at nested_sampling.f90:136
#13  0x4F7BA2 in __prosit_MOD_sample_pdf at PROSIT.f90:314
#14  0x40773E in MAIN__ at BEAGLE.f90:550

was caused by using parameters for nebular emission with a model which does not include nebular emission. Try rather to use the attached parameter file and let me know if it works. Note that I added two more parameters, max_stellar_age and sfr. Depending on what you get with the current fitting, you can later decide to remove them.

fit_photometry_example.param.zip

rmastand commented 7 years ago

The new param file works great! I'm getting output files for both the example catalogue data and my own.

Just a note: this warning was thrown quite often:

-------------
 [WARNING: After            1  attempts to draw a valid set of parameters, none valid set 
has been found. Check that the input parameters range are compatible with the parameter 
space spanned by the models you are currently using. ]
 [FUNCTION: "set_and_change_galaxy_parameters" ]
 [MODULE: "parameters_handling" ]
 ----------------------------------------------------------------------------------------------------

Obviously it's not keeping output files from being produced, but is this related to something in the param file?

jacopo-chevallard commented 7 years ago

Warnings are, in general, nothing to worry about, as long as you get sensible results in output! closing this issue