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 when running stuff with PRINT AGN_SPECTRUM T #112

Closed chavezoscar009 closed 2 months ago

chavezoscar009 commented 3 months ago

Hey y'all, so I added into the BEAGLES param file the PRINT AGN_SPECTRUM T and also added in the parameter agn_lacc and ran into some errors, I am using BEAGLE v0.29.2.

The first one is more a question, what are the units of agn_lacc I should use, are they in linear space so 1e40 is what is needed here or is it in log10 so only 40 is needed? In the param file I uploaded I assumed log10 scaling but can change that in the next run.

The main error happens when I added the PRINT AGN_SPECTRUM T and agn_lacc in the param file I got this error outputted:

docker run --rm -it -v /Users/oac466/Desktop/BEAGLE-general:/BEAGLE_virtual_workdir --env-file Docker_env.list --user $(id -u):$(id -g) beagletool/beagle:0.29.2 --parameter-file /BEAGLE_virtual_workdir/params/Jorges_Fit.param --fit ---> fitted: mass ---> fitted: agn_lacc ---> fitted: nebular_logu ---> fitted: nebular_z ---> fitted: tauv_eff ---> fitted: agn_logu ---> fitted: agn_z ---> fitted: agn_xi ---> fitted: tau ---> fitted: metallicity ---> fitted: specific_sfr ---> fitted: current_sfr_timescale ---> fitted: formation_redshift n_fitted: 13


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

no. of live points = 195 dimensionality = 13


Starting MultiNest generating live points

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

Backtrace for this error:
#0  0x7f1d42dd9ad0 in ???
#1  0x7f1d42dd8c35 in ???
#2  0x7f1d42ac751f in ???
#3  0x55dffb267a14 in __lib_checking_MOD_almost_equal_sp
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/astrofortran/src/lib_checking.f90:2960
#4  0x55dffb5eb252 in __lib_interpolation_MOD_locate_sp
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/astrofortran/src/lib_interpolation.f90:267
#5  0x55dffb510603 in __parameters_handling_MOD_check_parameters_are_valid
    at /home/runner/work/BEAGLE/BEAGLE/src/parameters_handling.f90:948
#6  0x55dffb512553 in __parameters_handling_MOD_set_and_change_galaxy_parameters
    at /home/runner/work/BEAGLE/BEAGLE/src/parameters_handling.f90:325
#7  0x55dffb4ff94e in __likelihood_function_MOD_likelihood
    at /home/runner/work/BEAGLE/BEAGLE/src/likelihood_function.f90:169
#8  0x55dffb5057a0 in __likelihood_function_MOD_mc_likelihood
    at /home/runner/work/BEAGLE/BEAGLE/src/likelihood_function.f90:123
#9  0x55dffb0b9bd0 in getloglike
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/mcfor-src/src/nested_sampling.f90:224
#10  0x55dffb111bd4 in __nested_MOD_gen_initial_live
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/multinest-src/nested.F90:536
#11  0x55dffb113cbb in __nested_MOD_nestsample
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/multinest-src/nested.F90:352
#12  0x55dffb1150a0 in __nested_MOD_nestrun
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/multinest-src/nested.F90:239
#13  0x55dffb0ba2e8 in __nested_sampling_MOD_run_nested_sampling
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/mcfor-src/src/nested_sampling.f90:137
#14  0x55dffb0abe3a in __prosit_MOD_sample_pdf
    at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/mcfor-src/src/PROSIT.f90:322
#15  0x55dffb068005 in beagle
    at /home/runner/work/BEAGLE/BEAGLE/src/BEAGLE.f90:665
#16  0x55dffb063ca6 in main
    at /home/runner/work/BEAGLE/BEAGLE/src/BEAGLE.f90:6

Param_File.docx

Any thoughts on what this could be?

eclake commented 3 months ago

Hi @chavezoscar009, I'm not sure if this is the reason for your error, but you need to also point BEAGLE towards the AGN templates by adding the following line: TEMPLATES AGN = $BEAGLE_TEMPLATES/agn_nlr_May2020/nlr_fits_list.dat Do you have the NLR templates? my nlr_fits_list.dat file looks like this:

nlr_xi1_n3_al1.7_C100_v100_h1_r3.fits
nlr_xi3_n3_al1.7_C100_v100_h1_r3.fits
nlr_xi5_n3_al1.7_C100_v100_h1_r3.fits

Could you let me know whether it stops with the same error if you include that line?

chavezoscar009 commented 3 months ago

Oh I see, yeah I do not think I have those AGN templates. The directory I was pointed to only had the BC03 templates. Is there a way for me to have access to the AGN templates?

eclake commented 3 months ago

I've just e-mailed you a link where you can download them

chavezoscar009 commented 3 months ago

Awesome, thanks!! I have downloaded the AGN templates and I am trying to incorporate them into BEAGLE and ran into a different error. My guess is that this is stemming from the nebular line templates but i'm not 100% sure. Right now I am using cb2016_Jan16_line_wavelengths_may2017.dat but maybe I would need one for the AGN template?

docker run --rm -it -v /Users/oac466/Desktop/BEAGLE-general:/BEAGLE_virtual_workdir --env-file Docker_env.list --user $(id -u):$(id -g) beagletool/beagle:0.29.2 --parameter-file /BEAGLE_virtual_workdir/params/Jorges_Fit.param --fit ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [ERROR: CFITSIO error number 219 ---> named column not found "Mg10@610_609.789978" ] [FUNCTION: "cfitsio_print_error" ] [MODULE: "fits_io" ] [BACKTRACE:

0 0x7f3549b84ad0 in ???

1 0x557476a6fe12 in print_backtrace

at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/astrofortran-src/src/lib_messages.f90:873

2 0x557476a70adc in __lib_messages_MOD_printerror

at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/astrofortran-src/src/lib_messages.f90:393

3 0x557476a6849b in __fits_buffers_MOD_cfitsio_print_error

at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/astrofortran-src/src/fits_buffers.f90:1005

4 0x557476a2762e in __lib_fits_io_MOD_read_fits_column_0d_sp

at /home/runner/work/BEAGLE/BEAGLE/build/dependencies/astrofortran/src/lib_fits_io.f90:6080

5 0x557476c338f0 in __io_nebular_emission_MOD_read_templates_agn_nebular_emission

at /home/runner/work/BEAGLE/BEAGLE/src/io_nebular_emission.f90:1819

6 0x557476bd43c7 in __iotemplates_MOD_initialize_templates

at /home/runner/work/BEAGLE/BEAGLE/build/src/iotemplates.f90:276

7 0x5574767d0237 in beagle

at /home/runner/work/BEAGLE/BEAGLE/src/BEAGLE.f90:337

8 0x5574767cdca6 in main

at /home/runner/work/BEAGLE/BEAGLE/src/BEAGLE.f90:6

] [ ***** ] [ ----> EXITING FUNCTION / SUBROUTINE <---- ] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [ * STOPPING PROGRAM ***** ] Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

eclake commented 3 months ago

Good guess - please try this one cb2016_n2_mup100_N015_O01_deplO70_C100_Jan16_line_wavelengths_may2017_sensibleLables.dat.zip

chavezoscar009 commented 3 months ago

Okay that seems to have done the trick. Seems like I needed to have an AGN template as well as having some of the AGN lines from the sensiblelables.dat file present for it to run. I can see the output in the results directory and see the AGN Spectrum in the extension as well as AGN Emission.