Segmentation fault using era52arl

Post questions and find resources to convert meteorological data into a format HYSPLIT can read.
AlexB
Posts: 7
Joined: September 26th, 2019, 10:04 am
Registered HYSPLIT User: Yes

Segmentation fault using era52arl

Post by AlexB »

Hello,

I recently tried to convert some ERA5 data to ARL format.

I used the code provided by Alice Crawford (I am very grateful, it's very helpful !) https://github.com/amcz/hysplit_metdata.

I reached the point when the data is well downloaded (8-split) and the python script tries to execute the era52arl program with the data.

Firstly, I had trouble compiling era52arl as described in an other topic (viewtopic.php?t=1643).
I finally make the right links with the eccodes library (at least I think so) and compiled era52arl. But is it successfully compiled ? I can doubt it ... For information, it weights 132.5 kB.

Now, when I try either the conversion code provided or to use directly era52arl both with split files and full-day file (downloaded afterward) I have this "Segmentation fault - invalid memory reference".
See the output in my terminal window at the end of the post.

I am so close to have these data converted it is really frustrating.
Did someone already have this type of error or understand it ?

Thank you so much in advance,

Alex


%%%%%%%%%%%%%%%%%%%%%%%%%%
alex@alex-VirtualBox:~/Desktop/CDSxHYSPLIT/DATA/Test_11June2019_fullfile$ ./era52arl -iERA5_2019.Jun11.3dpl.all.grib -aERA5_2019.Jun11.2dpl.all.grib

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

Backtrace for this error:
#0 0x7fa3b95a82da in ???
#1 0x7fa3b95a7503 in ???
#2 0x7fa3b8c24f1f in ???
#3 0x7fa3b8d70d10 in ???
#4 0x7fa3b9731d79 in ???
#5 0x7fa3b95a7ccf in ???
#6 0x55b942a8fda2 in era52arl
at /home/chrisl/V951/hysp_new/data2arl/era52arl/era52arl.f:343
#7 0x55b942a8da72 in main
at /home/chrisl/V951/hysp_new/data2arl/era52arl/era52arl.f:92
Segmentation fault (core dumped)
%%%%%%%%%%%%%%%%%%%%%%%%%
alicec
Posts: 411
Joined: February 8th, 2016, 12:56 pm
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by alicec »

What version of HYSPLIT are you using?

Can you try running the era52arl without any inputs

./era52arl

Should give you this:

Usage: era52arl [-options]
One pressure level file and at least one surface file must be input.
The surface file(s) should have all the time periods that
pressure level files have do but they can have extra time periods.
A default era52arl.cfg will be created if none exists or
alternate name is not specified with the -d option.
This file specifies variables and pressure levels to be written.
to the ARL file.
-d[decoding configuration file {name | create era52arl.cfg}]
-i[input grib1 file with pressure level fields name {DATA.GRIB}]
-a[input grib1 surface fields name {SFC.GRIB}]
-f[input grib1 surface fields name {SFC2.GRIB}]
-o[output data file name {DATA.ARL}]
-p[ensemble data. Number of ensemble to extract]
-t[{1} integer. Extract every ith time period in the grib file]
e.g. 1 extract all time periods. 2 extract every other time
period.
-v[verbose mode {False}]
AlexB
Posts: 7
Joined: September 26th, 2019, 10:04 am
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by AlexB »

Thank you for your prompt reply.

I downloaded the executables for Ubuntu 18.10 released in September 2019. It is the version 4.2.0 of Hysplit I guess.

By running ./era52arl this gives the expected output as you mentioned it.
I also checked the libraries linked to era52arl typing in the exec folder "exec$ ldd era52arl". It seems that all the links are found.

Does this process require a lot of computer resources ? I run these programs in an Ubuntu virtual machine (VirtualBox) to which I have allocated 4 Go of RAM.

Kind regards,

Alex
alicec
Posts: 411
Joined: February 8th, 2016, 12:56 pm
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by alicec »

Can you send me the command you are using to download the files with the python script?
AlexB
Posts: 7
Joined: September 26th, 2019, 10:04 am
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by AlexB »

I run "bash program.sh" where program.sh is a modified version of your example_global.sh to fit my purposes (paths and time periods modified).
AlexB
Posts: 7
Joined: September 26th, 2019, 10:04 am
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by AlexB »

In a clean directory, I tried the whole process again. The data is well downloaded but the program crashes when it calls era52arl... Segmentation fault...

I have heard that this kind of error can come from table allocation problems (for example, trying to store too many numbers in a pre-allocated table that is too small).

Thank you for any clue you can give me.
alicec
Posts: 411
Joined: February 8th, 2016, 12:56 pm
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by alicec »

It's difficult to trouble shoot a segmentation fault on someone else's system, so I'm not sure how helpful I can be.
What compiler are you using?
AlexB
Posts: 7
Joined: September 26th, 2019, 10:04 am
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by AlexB »

Yes, I understand, thank you for your time and your insights anyway !
I use the compiler gcc.
I have just seen this topic (viewtopic.php?f=14&t=1712) where jrpreece has the same kind of error. The common ground of our two cases is that we use linux on a virtual machine. Perhaps I should try the whole process on a computer with a proper linux OS installed.
Thank you
Alex
Fabio.Dioguardi
Posts: 31
Joined: August 17th, 2018, 12:36 pm
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by Fabio.Dioguardi »

Hi,

I am experiencing the same problem, with the Segmentation Fault error...
Are there any updates on this?

Thanks
Fabio
AlexB
Posts: 7
Joined: September 26th, 2019, 10:04 am
Registered HYSPLIT User: Yes

Re: Segmentation fault using era52arl

Post by AlexB »

Hi,

So far, I did not find any solution to this issue. Are you using a virtual machine to run these programs ? I use virtual box and I plan to try the whole process on a proper linux machine.

I will keep you informed through this thread if it is successful.

Alex
Post Reply

Return to “Conversion programs”