[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #OKV-678812]: Problems reading a netcdf-4 lib file



A couple of things.
1. Is there any way you can get us a copy of the failing file,
   or is it too large?
2. It used to be the case that using parallel IO and compression
   with HDF5 was illegal. You had to read a compressed file serially.
   Since you are using mpicc, I speculate that this is happening here.

> 
> I am contacting you after many years of usage of the library without troubles.
> 
> I typically use the Fortran library. Until now, I have compiled netCDF with 
> disables netcdf-4. Only recently, I had to read a file that is expected to be 
> netcdf-4 lib compressed. So I have recompiled enabling netcdf-4. After more 
> than one week of multiple tests, I still have a crash (seg fault) opening the 
> file. I think that the problem is related to file itself, but I am not fully 
> sure. The reason why I say this is the following.
> 
> I am using Linux version 2.6.32-696.23.1.el6.x86_64 
> (address@hidden<mailto:address@hidden>) (gcc version 4.4.7 20120313 (Red Hat 
> 4.4.7-18) (GCC) ) #1 SMP Tue Mar 13 22:44:18 UTC 2018
> 
> 
> I use gnu compilers (gcc, gfortran): gcc version 4.4.7 20120313 (Red Hat 
> 4.4.7-18) (GCC)
> 
> I have both tried pre-compiled static libraries and my compiled ones.
> 
> Observation 1)
> If I use the pre-installed ncdump it works, but if I use my compiled version 
> I get an error:
> 
> NetCDF: HDF error
> Location: file vardata.c; line 473
> 
> This happen before reading a "short” variable.
> 
> 
> Observation 2)
> If I try to nccopy the file, then both built crashes:
> 
> Pre-built:
> NetCDF: Start+count exceeds dimension bound
> Location: function nc_get_vara; file nccopy.c; line 798
> 
> My built:
> NetCDF: HDF error
> Location: file nccopy.c; line 1044
> 
> 
> Observation 3)
> If I use the command nc4tonc3 of the pre-built version (I don’t have the same 
> command in my built), then I get the following message:
> 
> Traceback (most recent call last):
> File "/usr/bin/nc4tonc3", line 127, in <module>
> nc4tonc3(filename4,filename3,clobber=overwritefile,quiet=quiet,format=format)
> File "/usr/bin/nc4tonc3", line 9, in nc4tonc3
> raise IOError('input file must be in NETCDF4_CLASSIC format')
> IOError: input file must be in NETCDF4_CLASSIC format
> 
> 
> I am pasting the compilation instruction here below, where you can also see 
> which versions I am using.
> 
> Thank you in advance for your kind support.
> 
> Damiano
> 
> 
> 
> 
> 
> #=====
> # ZLIB
> #=====
> cd ${SRC_DIR}/zlib-1.2.11
> CC=mpicc  CFLAGS=-fPIC ./configure --prefix=${LIB_DIR}/zlib
> make
> make install
> 
> 
> #=====
> # CURL
> #=====
> cd ${SRC_DIR}/curl-7.59.0
> CC=mpicc  CFLAGS=-fPIC ./configure --prefix=${LIB_DIR}/curl
> make
> 
> 
> #=====
> # HDF5
> #=====
> cd ${SRC_DIR}/hdf5-1.10.1
> CC=mpicc CXX=mpic++ FC=mpif90 CFLAGS=-fPICCCFLAGS=-L${MPI_LIB} 
> FCFLAGS=-L${MPI_LIB} FCFLAGS="-static-libgfortran -static-libgcc -O3" 
> ./configure --prefix=${LIB_DIR}/hdf5 --disable-shared --with-zlib=${LIB_DIR}
> make
> make install
> 
> 
> #=======
> # NETCDF
> #=======
> cd ${SRC_DIR}/netcdf-4.4.1.1
> LD_LIBRARY_PATH=${LIB_DIR}:${LD_LIBRARY_PATH}
> export LD_LIBRARY_PATH
> make clean
> CC=mpicc  CXX=mpic++ CFLAGS=-fPIC CPPFLAGS=-I${INCLUDE_DIR} 
> LDFLAGS=-L${LIB_DIR} ./configure --prefix=${LIB_DIR}/netcdf --disable-shared 
> --disable-parallel4 --disable-dap —with zlib=${LIB_DIR} --with-hdf5=${LIB_DIR}
> mkdir curl
> cd curl
> ln -s ${INCLUDE_DIR}/curl.h .
> cd ..
> make
> make install
> 
> 
> #===============
> # NETCDF-FORTRAN
> #===============
> cd ${SRC_DIR}/netcdf-fortran-4.4.4
> LD_LIBRARY_PATH=${LIB_DIR}:${LD_LIBRARY_PATH}
> export LD_LIBRARY_PATH
> LD_LIBRARY_PATH=${LIB_DIR}:${LIB_DIR}/netcdf/lib:${LD_LIBRARY_PATH}
> export LD_LIBRARY_PATH
> make clean
> CC=mpicc  CXX=mpic++ FC=mpif90 CFLAGS=-fPIC CPPFLAGS=-I${INCLUDE_DIR} 
> LDFLAGS=-L${LIB_DIR} FCFLAGS="-static-libgfortran -static-libgcc -O3” 
> ./configure --prefix=${LIB_DIR}/netcdf-fortran --disable-shared
> make
> make install
> 
> 
> 
> 
> 
> 
> 
> 
> Best regards,
> Damiano
> 
> ================================================
> Damiano Casalino, PhD
> Senior Director, Aerospace Applications Manager
> Exa GmbH
> Curiestrasse 4, D-70563 Stuttgart, Germany
> Phone:  +49-711-68-70-32-41
> Mobile: +49-172-63-51-41-3
> Fax:       +49-711-68-70-32-44
> e-mail: address@hidden<mailto:address@hidden>
> web:     www.exa.com<http://www.exa.com/>
> ================================================
> 
> Important change to EXA’ e-mail addresses. Following EXA’ acquisition by 
> Dassault Systèmes, please use my Dassault Systèmes e-mail address 
> address@hidden<mailto:address@hidden> to contact me. Don’t forget to add the 
> new address to your Safe Senders list, to ensure you will continue to receive 
> my e-mails.
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: OKV-678812
Department: Support netCDF
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.