Page 1 of 2

Segmentation fault using era52arl

Posted: September 26th, 2019, 10:40 am
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)
%%%%%%%%%%%%%%%%%%%%%%%%%

Re: Segmentation fault using era52arl

Posted: September 27th, 2019, 12:31 pm
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}]

Re: Segmentation fault using era52arl

Posted: September 30th, 2019, 12:10 pm
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

Re: Segmentation fault using era52arl

Posted: October 1st, 2019, 7:59 am
by alicec
Can you send me the command you are using to download the files with the python script?

Re: Segmentation fault using era52arl

Posted: October 1st, 2019, 1:32 pm
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).

Re: Segmentation fault using era52arl

Posted: October 2nd, 2019, 1:24 pm
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.

Re: Segmentation fault using era52arl

Posted: October 7th, 2019, 8:33 am
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?

Re: Segmentation fault using era52arl

Posted: October 7th, 2019, 9:21 am
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

Re: Segmentation fault using era52arl

Posted: November 14th, 2019, 6:44 am
by Fabio.Dioguardi
Hi,

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

Thanks
Fabio

Re: Segmentation fault using era52arl

Posted: November 14th, 2019, 9:12 am
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