Project

General

Profile

intyear produces segmentation fault

Added by J. Eric Klobas over 3 years ago

Problem: I have some monthly values for certain variables for certain years, namely 2015, 2020, 2030, ..., 2100. I would like to use CDO to interpolate values for the missing dates with the interpolation conducted for each month (e.g., only consider January 2015 and 2020 data when interpolating values for January 2016). It is my understanding that -intyear performs this operation.

I have uploaded two small, representative netcdf files which produce the error on my system when I try a command like (filenames truncated for clarity):

cdo -intyear,2016,2017,2018,2019 file2015.nc file2020.nc outpattern
or
cdo -intyear,2016/2019/1 file2015.nc file2020.nc outpattern

I receive a segmentation fault. When I run the above commands with a verbose -v argument:
OpenMP: num_procs=1 max_threads=1
Segmentation fault (core dumped)

and cdo -V provides
CDO version 1.9.4, Copyright (C) 2003-2018 Uwe Schulzweida
This is free software and comes with ABSOLUTELY NO WARRANTY
Report bugs to <http://mpimet.mpg.de/cdo>
(socol_env) [holy7c24402 dms_surf_emiss 14:27:00]$ cdo -V
Climate Data Operators version 1.9.4 (http://mpimet.mpg.de/cdo)
System: x86_64-pc-linux-gnu
CXX Compiler: icpc -std=gnu++11 -g -O2 -fopenmp
CXX version : icpc (ICC) 17.0.4 20170411
C Compiler: icc -std=gnu99 -g -O2 -fopenmp
C version : icc (ICC) 17.0.4 20170411
F77 Compiler: ifort -g
F77 version : ifort (IFORT) 17.0.4 20170411
Features: 188GB C++11 Fortran DATA PTHREADS OpenMP45 HDF5 NC4/HDF5 OPeNDAP UDUNITS2 PROJ.4 SSE2
Libraries: HDF5/1.10.1 proj/4.93
Filetypes: srv ext ieg grb1 nc1 nc2 nc4 nc4c nc5
CDI library version : 1.9.4
CGRIBEX library version : 1.9.0
NetCDF library version : 4.5.0 of May 10 2018 16:11:33 $
HDF5 library version : 1.10.1
EXSE library version : 1.4.0
FILE library version : 1.8.3

Now, I'm curious if this is idiosyncratic to my build of CDO (Harvard Cannon Cluster), if I'm doing something incorrectly, or if it's a bug. For what it's worth, I've tried using several different permutations of openmpi/mvapich2 and gcc/intel compilers with no change in behavior.

Is anyone able to reproduce this segfault with my datafiles?


Replies (5)

RE: intyear produces segmentation fault - Added by Uwe Schulzweida over 3 years ago

Thanks for this example! This is definitely a CDO bug. We will solve the problem in the next CDO release.

Cheers,
Uwe

RE: intyear produces segmentation fault - Added by J. Eric Klobas over 3 years ago

Thank you for the confirmation.
For anyone reading this who needs an easy alternative in the meantime, the attached python3 tool will accomplish this task relatively quickly.
Disclaimer: I make no guarantees of performance or accuracy

RE: intyear produces segmentation fault - Added by Tuuli Miinalainen over 3 years ago

Hi,
I am still facing the same problem, and my colleague also gets the segmentation fault with intyear command.
We both have CDO v. 1.9.9.

Here's what cdo -V command gives:

Climate Data Operators version 1.9.9rc6 (https://mpimet.mpg.de/cdo)
System: x86_64-pc-linux-gnu
CXX Compiler: g++ -g -O2 -fdebug-prefix-map=/build/cdo-MHLf4o/cdo-1.9.9~rc6=. -fstack-protector-strong -Wformat -Werror=format-security -fopenmp -pthread
CXX version : g++ (Ubuntu 10.2.0-5ubuntu2) 10.2.0
C Compiler: gcc -g -O2 -fdebug-prefix-map=/build/cdo-MHLf4o/cdo-1.9.9~rc6=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -fPIC -fopenmp -pthread -pthread
C version : gcc (Ubuntu 10.2.0-5ubuntu2) 10.2.0
F77 Compiler: f77 -g -O2 -fdebug-prefix-map=/build/cdo-MHLf4o/cdo-1.9.9~rc6=. -fstack-protector-strong
F77 version : GNU Fortran (Ubuntu 10.2.0-5ubuntu2) 10.2.0
Features: 15GB 8threads C++14 OpenMP45 Fortran PTHREADS HDF5 NC4/HDF5/threadsafe OPeNDAP SZ UDUNITS2 PROJ MAGICS CURL FFTW3 SSE2
Libraries: HDF5/1.10.6 proj/7.1.0 curl/7.68.0
Filetypes: srv ext ieg grb1 grb2 nc1 nc2 nc4 nc4c nc5
CDI library version : 1.9.9rc4
ecCodes library version : 2.18.0
NetCDF library version : 4.7.4 of May 13 2020 13:14:30 $
hdf5 library version : library undefined
exse library version : 1.4.1
FILE library version : 1.9.1

Any ideas what might the source for this issue?
BR,
Tuuli

RE: intyear produces segmentation fault - Added by Uwe Schulzweida over 3 years ago

This bug is fixed in the final CDO release 1.9.9. You are using the prereleased version 1.9.9rc6, which doesn't include the bug fix.

RE: intyear produces segmentation fault - Added by Tuuli Miinalainen over 3 years ago

Thanks for the info! Seems that Ubuntu package manager offers only 1.9.9rc6. Should I download 1.9.9. manually then? -Tuuli

    (1-5/5)