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

"Program received signal SIGSEGV: Segmentation fault" while fitting photometry #31

Closed alex-delavega closed 8 years ago

alex-delavega commented 8 years ago

I have two galaxies from 3DHST for which I'm trying to fit the photometry from the 3DHST catalogue. I can run cat_fit_photomtry.param and fit_spectrum_example.param fine, and earlier this week I was able to fit the photometry for my targets without a problem. When I try again today I keep seeing this error occur just for my .param file and I'm not sure what's going on:

docker run --rm -it -v /Users/vega/Desktop/BEAGLE/BEAGLE-general-master:/opt/BEAGLE --env-file env.list beagletool/beagle:0.7.2 --parameter-file /opt/BEAGLE/params/fit_3dhst.param --fit

  All the templates read.

 Reading Filter File: /opt/BEAGLE/build/FILTERBIN.RES
 271 filters defined, out of 500                                maximum     ...done
 ---> fixed                         sfh_type                                   0
 ---> from_file                     redshift                                   0
 ---> fixed                         attenuation_type                           0
 ---> fixed                         mu                                         0
 ---> fitted                        tau                                        1
 ---> fitted                        metallicity                                1
 ---> fitted                        mass                                       1
 ---> fitted                        sfr                                        1
 ---> fitted                        tauV_eff                                   1
 n_fitted:            5
 *****************************************************
 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  0x7F65CC708E08
#1  0x7F65CC707F90
#2  0x7F65CBE3A49F
#3  0x449116 in __parameters_handling_MOD_set_galaxy_parameters at parameters_handling.f90:369
#4  0x449601 in __parameters_handling_MOD_set_and_change_galaxy_parameters at parameters_handling.f90:276
#5  0x433194 in __likelihood_function_MOD_likelihood at likelihood_function.f90:118 (discriminator 4)
#6  0x436DD5 in __likelihood_function_MOD_mc_likelihood at likelihood_function.f90:89 (discriminator 4)
#7  0x4FE2A3 in __nested_sampling_MOD_getloglike at nested_sampling.f90:206 (discriminator 6)
#8  0x52BE90 in __nested_MOD_gen_initial_live at nested.F90:536
#9  0x52D60C in __nested_MOD_nestsample at nested.F90:352
#10  0x52E6A4 in __nested_MOD_nestrun at nested.F90:239
#11  0x4FE67C in __nested_sampling_MOD_run_nested_sampling at nested_sampling.f90:134
#12  0x4F3DD2 in __prosit_MOD_sample_pdf at PROSIT.f90:314
#13  0x406FF9 in MAIN__ at BEAGLE.f90:547

Attached are my files, including the data. 3dhst_fit.zip

jacopo-chevallard commented 8 years ago

It looks like this is due to the line

PARAMETER  = name:redshift     type:from_file

in your parameter file.

Can you try to set the redshift of the sources in a different way, i.e. removing the above line from the parameter file, and change your filters_3dhst.dat into

# It contains the filters to be used when calculating only photmetric models
redshift:colName:z
#uncomment the above if you want to fit with a fixed redshift, also change param file to make redshift parameter 'fixed', rather than 'fitted'
units:Jy
object_ID:colName:ID
redshift:colName:z

index:208       flux:colName:flux_B   fluxerr:colName:fluxerr_B      label:WFC_F435W
index:209       flux:colName:flux_V   fluxerr:colName:fluxerr_V      label:WFC_F606W
index:210       flux:colName:flux_i   fluxerr:colName:fluxerr_i      label:WFC_F775W
index:212       flux:colName:flux_z   fluxerr:colName:fluxerr_z      label:WFC_F850W
index:215       flux:colName:flux_j1  fluxerr:colName:fluxerr_j1     label:WFC3_F125W
index:216       flux:colName:flux_j2  fluxerr:colName:fluxerr_j2     label:WFC3_F140W
index:217       flux:colName:flux_H   fluxerr:colName:fluxerr_H      label:WFC3_F160W

Let me know if it solves the crash

alex-delavega commented 8 years ago

@jacopo-chevallard, thank you! No crashes!

I did have another issue. I would like to include Ha and Hb in the fits (for now just Ha) and have attempted to do so in the additional files in the new attached .zip. When running fit_3dhst_spec.param I acquire the same error as before:

docker run --rm -it -v /Users/vega/Desktop/BEAGLE/BEAGLE-general-master:/opt/BEAGLE --env-file env.list beagletool/beagle:0.7.2 --parameter-file /opt/BEAGLE/params/fit_3dhst_spec.param --fit

  All the templates read.

 Reading Filter File: /opt/BEAGLE/build/FILTERBIN.RES
 271 filters defined, out of 500                                maximum     ...done
 ---> fixed                         sfh_type                                   0
 ---> fixed                         attenuation_type                           0
 ---> fitted                        tauV_eff                                   0
 ---> fixed                         mu                                         0
 ---> fitted                        tau                                        1
 ---> fitted                        metallicity                                1
 ---> fitted                        mass                                       1
 ---> fitted                        sfr                                        1
 n_fitted:            5

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

Backtrace for this error:
#0  0x7FD87EEF4E08
#1  0x7FD87EEF3F90
#2  0x7FD87E62649F
#3  0x494061 in __spectral_indices_MOD_load_observation_indices at spectral_indices.f90:449
#4  0x407143 in MAIN__ at BEAGLE.f90:386

Quantities are in default units. Thanks! 3dhst_fit.zip

jacopo-chevallard commented 8 years ago

Hi Alex, can you, please, move this other issue into a new issue? just to keep some order here! :)

alex-delavega commented 8 years ago

My apologies! Moved to #32.

jacopo-chevallard commented 8 years ago

Perfect!