rice-solar-physics / HYDRAD

HYDrodynamics and RADiation Code for computing solutions to field-aligned hydrodynamic equations in coronal loops
MIT License
10 stars 5 forks source link

Forward modelling returns a segmentation fault #101

Closed adolliou closed 7 months ago

adolliou commented 1 year ago

Dear all, While using linux, I encountered a segmentation fault while trying to use the "forward modelling" tools of HYDRAD. For example, after doing a 5000 s run with the default loop configuration, I have 500 .phy and .amr files in the Results folder. In "Forward_Model/build_scripts" , I run "./build_FM.bat". Going back to the parent folder, I run "./Forward_Model.exe". This results in the following output: "Initialising: SDO_AIA_193 Segmentation fault".

In Windows, doing the same procedure returns the following output : "Initialising: SDO_AIA_193 Adding ion: fe_8" There is no more outputs for at least one hour, so I am not sure whether the code is running or not. Thank you very much for your help.

If this may help: here are the outputs I have while running "./build_FM.bat":

../source/instrument.cpp: In member function ‘void CInstrument::Initialise(char*)’:
../source/instrument.cpp:66:32: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   66 | pEQRadiation = new CRadiation( "Radiation_Model/config/elements_eq.cfg" );
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source/instrument.cpp:67:33: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   67 | pNEQRadiation = new CRadiation( "Radiation_Model/config/elements_neq.cfg" );
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source/main.cpp: In function ‘int main()’:
../source/main.cpp:27:31: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   27 | pForwardModel = new CForward( "Forward_Model/config/forward_model.cfg" );
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source/main.cpp:28:40: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   28 | pForwardModel->WriteIonLineListToFile( "Results/Forward_Model/LINELIST.txt" );
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source/main.cpp:34:21: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   34 |  pLoop = new CLoop( "Results", i, i+4, 1, 1E8 );
      |                     ^~~~~~~~~
../source/main.cpp:42:38: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   42 |  pForwardModel->WriteDetectorToFile( "Results/Forward_Model/", i );
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~
sjbradshaw commented 1 year ago

Hi Antoine,

It might be the case that you don’t have the data files needed to use the Forward_Modeling software. They are huge files, containing wavelength-resolved emissivities for all of the ions in Chianti. Go into the “Forward_Model/ion_emiss_tables/” directory and open the plain text file “ion_emiss_tables.path”. This file tells you where the ion emissivity files are located in your local system. If you haven’t downloaded them then this directory will be empty. There is an IDL file in the above directory called “calc_wavelength_resolved_emiss_tables.pro” which might work, but I haven’t used it for quite a while (and not with the latest version of IDL). Otherwise, I’ll need to find a way to deliver the files to you (probably via a cloud-based folder.)

The best toolkit for forward modeling using HYDRAD output is Will Barnes’ “synthesizAR” python framework, which is far more powerful and much better supported than the FM software included with HYDRAD.

https://github.com/wtbarnes/synthesizAR

Cheers,

Steve

From: Antoine Dolliou @.> Sent: Friday, October 27, 2023 1:33 PM To: rice-solar-physics/HYDRAD @.> Cc: Subscribed @.***> Subject: [rice-solar-physics/HYDRAD] Forward modelling returns a segmentation fault (Issue #101)

Dear all, While using linux, I encountered a segmentation fault while trying to use the "forward modelling" tools of HYDRAD. For example, after doing a 5000 s run with the default loop configuration, I have 500 .phy and .amr files in the Results folder. In "Forward_Model/build_scripts" , I run "./build_FM.bat". Going back to the parent folder, I run "./Forward_Model.exe". This results in the following output: "Initialising: SDO_AIA_193 Segmentation fault".

In Windows, doing the same procedure returns the following output : "Initialising: SDO_AIA_193 Adding ion: fe_8" There is no more outputs for at least one hour, so I am not sure whether the code is running or not. Thank you very much for your help.

If this may help: here are the outputs I have while running "./build_FM.bat":

../source/instrument.cpp: In member function ‘void CInstrument::Initialise(char)’: ../source/instrument.cpp:66:32: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 66 | pEQRadiation = new CRadiation( "Radiation_Model/config/elements_eq.cfg" ); | ^~~~~~~~~~~~ ../source/instrument.cpp:67:33: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 67 | pNEQRadiation = new CRadiation( "Radiation_Model/config/elements_neq.cfg" ); | ^~~~~~~~~ ../source/main.cpp: In function ‘int main()’: ../source/main.cpp:27:31: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 27 | pForwardModel = new CForward( "Forward_Model/config/forward_model.cfg" ); | ^~~~~~~~~~~~ ../source/main.cpp:28:40: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 28 | pForwardModel->WriteIonLineListToFile( "Results/Forward_Model/LINELIST.txt" ); | ^~~~~~~~ ../source/main.cpp:34:21: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] 34 | pLoop = new CLoop( "Results", i, i+4, 1, 1E8 ); | ^~~~~ ../source/main.cpp:42:38: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings] 42 | pForwardModel->WriteDetectorToFile( "Results/Forward_Model/", i ); | ^~~~~~~~

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/rice-solar-physics/HYDRAD/issues/101__;!!BuQPrrmRaQ!hDVE0FqER4r9B2FWCHEHyrJ8a3KpcV862ebU-_WjF0WNqCLiub0VCUFmfiybHYIlC__xoK1k5h2P_qUDy4mkeQ8xFfbKsLy3cPM$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ACC6C7UQM6HEZEL7JUSKAFDYBP44TAVCNFSM6AAAAAA6TG3RUGVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE3DMMBRGA4DOOI__;!!BuQPrrmRaQ!hDVE0FqER4r9B2FWCHEHyrJ8a3KpcV862ebU-_WjF0WNqCLiub0VCUFmfiybHYIlC__xoK1k5h2P_qUDy4mkeQ8xFfbKHzZVkP0$ . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/ACC6C7RFLNNXRZE52OJ67B3YBP44TA5CNFSM6AAAAAA6TG3RUGWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHHKLXR74.gif Message ID: @. @.> >