Project

General

Profile

Segmentation fault when selecting variable

Added by Paolo Davini 5 days ago

Hi there,

I am testing the new conda-released 2.5.0 and we have a segfault when running the following command

```
cdo selname,cell_area pi_griddes_nodes_IFS.nc test.nc
cdi warning (read_coordinates_vars): NetCDF: Variable not found - >lat<
Segmentation fault
```

this was not happening with previous versions (still the warning with missing lat was there) but very surprisingly is happening only on a unix machine and not on a Mac OS one.

The setup is:

```
limate Data Operators version 2.5.0 (https://mpimet.mpg.de/cdo)
System: x86_64-conda-linux-gnu
CXX Compiler: /home/conda/feedstock_root/build_artifacts/cdo_1748444758362/_build_env/bin/x86_64-conda-linux-gnu-c++ -std=gnu++20 -fPIC -DPIC -g -O2 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /work/users/clima/davini/miniforge3/envs/aqua/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/cdo_1748444758362/work=/usr/local/src/conda/cdo-2.5.0 -fdebug-prefix-map=/work/users/clima/davini/miniforge3/envs/aqua=/usr/local/src/conda-prefix -fopenmp -pthread
CXX version : x86_64-conda-linux-gnu-c++ (conda-forge gcc 13.3.0-2) 13.3.0
CXX library :
C Compiler: /home/conda/feedstock_root/build_artifacts/cdo_1748444758362/_build_env/bin/x86_64-conda-linux-gnu-cc -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /work/users/clima/davini/miniforge3/envs/aqua/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/cdo_1748444758362/work=/usr/local/src/conda/cdo-2.5.0 -fdebug-prefix-map=/work/users/clima/davini/miniforge3/envs/aqua=/usr/local/src/conda-prefix -fopenmp -pthread -pthread
C version : x86_64-conda-linux-gnu-cc (conda-forge gcc 13.3.0-2) 13.3.0
F77 Compiler: /home/conda/feedstock_root/build_artifacts/cdo_1748444758362/_build_env/bin/x86_64-conda-linux-gnu-gfortran -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /work/users/clima/davini/miniforge3/envs/aqua/include -I/home/conda/feedstock_root/build_artifacts/cdo_1748444758362/_build_env/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/cdo_1748444758362/work=/usr/local/src/conda/cdo-2.5.0 -fdebug-prefix-map=/work/users/clima/davini/miniforge3/envs/aqua=/usr/local/src/conda-prefix
F77 version : GNU Fortran (conda-forge gcc 13.3.0-2) 13.3.0
Features: 1007GB 256threads c++20 OpenMP45 Fortran pthreads HDF5 NC4/HDF5/threadsafe OPeNDAP udunits2 proj xml2 magics curl fftw3 sse3
Libraries: yac/3.1.0 NetCDF/4.9.2 HDF5/1.14.3 proj/9.5.1 xml2/2.13.8 curl/8.14.0 magics/4.15.5
CDI data types: SizeType=size_t
CDI file types: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c nc5 nczarr
CDI library version : 2.5.0
cgribex library version : 2.3.1
ecCodes library version : 2.40.0
NetCDF library version : 4.9.2 of Dec 3 2024 13:20:46 $
exse library version : 2.0.0
FILE library version : 1.9.1

```

Here attached the file, I am happy to provide further details if required!


Replies (4)

RE: Segmentation fault when selecting variable - Added by Uwe Schulzweida 5 days ago

Hi Paolo,

Thanks for the information! This problem is solved in CDO release 2.5.1.

Cheers,
Uwe

RE: Segmentation fault when selecting variable - Added by Paolo Davini 5 days ago

Thanks Uwe!
Any chance to see this soonish on conda-forge? We rely on this in our CI/CD in our main project https://github.com/DestinE-Climate-DT/AQUA

RE: Segmentation fault when selecting variable - Added by Paolo Davini 5 days ago

or alternatively, is there a way to circumvent the issue by modifying the command or the input file?

RE: Segmentation fault when selecting variable - Added by Uwe Schulzweida 3 days ago

Deleting the unneeded coordinates attribute avoids the problem:

ncatted -a coordinates,,d,, pi_griddes_nodes_IFS.nc

    (1-4/4)