FATAL ERROR (SEGFAULT): when python embedding #2660
-
I am trying to use python embedding to run grid_stat and I keep getting this SEGFAULT message.
As I understand it, segmentation fault refers to the container trying to access something in memory it isn't allowed to. I've run into this error several times now and not just the grid_stat utility. I had the issue with plot_point_obs as well. Though I was able to get around that one by using ascii2nc to convert my point obs to a .nc file and then plotting that. The goal of my work is to read in an aerosol model in netcdf format. My strategy at first was to use xarray to read the netcdf and then pull out the data as a numpy array. Code is as follows (slightly truncated):
After some troubleshooting I became suspicious that the python version I was using in my environment was a couple versions ahead of the one used to compile my singularity container. My next troubleshooting step was to save met_data and attrs using pickle and then read those pickle files in using python3.9 instead of the 3.10 version that I'd been using. That still gave me the segmentation fault so for the time being I'm fresh out of ideas. I've saved my directory structure to /incoming/irap/met_help/DAVIS_DATA/DAVIS_DATA_FULL.tar There is another file there called DAVIS_DATA but I hit control+c trying to copy the text, interrupting the transfer instead, use DAVIS_DATA_FULL to access everything. The MET version I'm running with is 12.0.0 in a singularity container, I'll pass that along too if you need. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 21 replies
-
I @Wesley-J-Davis, I downloaded the tar file but don't see this script: Can you share that script? I will start by testing |
Beta Was this translation helpful? Give feedback.
-
Here's the python version checking: Setting python3.9 and checking version
Shelling into the met 12 container to look for /usr/local/bin/python3
shelling into the met11 container to do the same thing
|
Beta Was this translation helpful? Give feedback.
-
exact contents of NAAPS_PYTHON_READER_2.py
|
Beta Was this translation helpful? Give feedback.
OK, agreed probably a container or environment issue.
In your first error, I saw this:
And in your last test with
11.0.1
, I see this:Does that mean when using 12.0.0-beta1 you're also using Python 3.6? If so, I would encourage you to upgrade Python to 3.10.4+ and re-compile MET against it and see if that helps before we go any farther. The current documentation details requirements for Python embedding here:
https://met.readthedocs.io/en/latest/Users_Guid…