This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Matthias, Thanks for reporting the problem. Apparently this has been reported before and seems to be a vendor problem with the C++ runtime. Here's the information we have about this: http://www.unidata.ucar.edu/netcdf/docs/known_problems.html#PG_shared The above information says the problem with the PGI C++ runtime was "Fixed in version 6.2.1". If your version of pgCC is later than 6.2.1, then we should correct this description. Your configure log included this: configure:6264: pgCC --version >&5 pgCC (aka pgcpp) 6.2-5 64-bit target on x86-64 Linux Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved. Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved. but I don't know the relationship between "6.2-5" and "6.2.1" versions. If you need the C++ interface for any reason, you may have to upgrade to 6.2.1. --Russ > the compiler option worked well. But I had to disable C++ completely in > order to pass all checks. If I only disable cxx-4 then I got: > make[2]: Leaving directory `/home/cuntz/netcdf-4.0.1/nf_test' > make[1]: Leaving directory `/home/cuntz/netcdf-4.0.1/nf_test' > Making check in cxx > make[1]: Entering directory `/home/cuntz/netcdf-4.0.1/cxx' > make nctst tst_failure > make[2]: Entering directory `/home/cuntz/netcdf-4.0.1/cxx' > source='nctst.cpp' object='nctst.o' libtool=no \ > DEPDIR=.deps depmode=none /bin/sh ../depcomp \ > pgCC -DHAVE_CONFIG_H -I. -I.. -I../fortran -I../libsrc4 > -I/home/cuntz/lib/hdf5_pgi//include -I/home/cuntz/lib/zlib_pgi//include > -I/home/cuntz/lib/szip_pgi//include -DNDEBUG -DpgiFortran -g -c -o > nctst.o nctst.cpp > /bin/sh ../libtool --tag=CXX --mode=link pgCC -g > -L/home/cuntz/lib/hdf5_pgi//lib -L/home/cuntz/lib/zlib_pgi//lib > -L/home/cuntz/lib/szip_pgi//lib -o nctst nctst.o > ../cxx/libnetcdf_c++.la ../libsrc4/libnetcdf.la -lhdf5_hl -lhdf5 > libtool: link: pgCC -g -o .libs/nctst nctst.o > -L/home/cuntz/lib/hdf5_pgi//lib -L/home/cuntz/lib/zlib_pgi//lib > -L/home/cuntz/lib/szip_pgi//lib ../cxx/.libs/libnetcdf_c++.so > /home/cuntz/netcdf-4.0.1/libsrc4/.libs/libnetcdf.so > ../libsrc4/.libs/libnetcdf.so /home/cuntz/lib/hdf5_pgi//lib/libhdf5_hl.a > /home/cuntz/lib/hdf5_pgi//lib/libhdf5.a > /home/cuntz/lib/szip_pgi//lib/libsz.so -lz -lm -Wl,--rpath > -Wl,/home/cuntz/lib/netcdf4_pgi/lib -Wl,--rpath > -Wl,/home/cuntz/lib/szip_pgi//lib > source='tst_failure.cpp' object='tst_failure.o' libtool=no \ > DEPDIR=.deps depmode=none /bin/sh ../depcomp \ > pgCC -DHAVE_CONFIG_H -I. -I.. -I../fortran -I../libsrc4 > -I/home/cuntz/lib/hdf5_pgi//include -I/home/cuntz/lib/zlib_pgi//include > -I/home/cuntz/lib/szip_pgi//include -DNDEBUG -DpgiFortran -g -c -o > tst_failure.o tst_failure.cpp > /bin/sh ../libtool --tag=CXX --mode=link pgCC -g > -L/home/cuntz/lib/hdf5_pgi//lib -L/home/cuntz/lib/zlib_pgi//lib > -L/home/cuntz/lib/szip_pgi//lib -o tst_failure tst_failure.o > ../cxx/libnetcdf_c++.la ../libsrc4/libnetcdf.la -lhdf5_hl -lhdf5 > libtool: link: pgCC -g -o .libs/tst_failure tst_failure.o > -L/home/cuntz/lib/hdf5_pgi//lib -L/home/cuntz/lib/zlib_pgi//lib > -L/home/cuntz/lib/szip_pgi//lib ../cxx/.libs/libnetcdf_c++.so > /home/cuntz/netcdf-4.0.1/libsrc4/.libs/libnetcdf.so > ../libsrc4/.libs/libnetcdf.so /home/cuntz/lib/hdf5_pgi//lib/libhdf5_hl.a > /home/cuntz/lib/hdf5_pgi//lib/libhdf5.a > /home/cuntz/lib/szip_pgi//lib/libsz.so -lz -lm -Wl,--rpath > -Wl,/home/cuntz/lib/netcdf4_pgi/lib -Wl,--rpath > -Wl,/home/cuntz/lib/szip_pgi//lib > make[2]: Leaving directory `/home/cuntz/netcdf-4.0.1/cxx' > make check-TESTS > make[2]: Entering directory `/home/cuntz/netcdf-4.0.1/cxx' > C++ runtime abort: internal error: static object marked for destruction > more than once > /bin/sh: line 1: 28212 Abgebrochen ${dir}$tst > FAIL: nctst > C++ runtime abort: internal error: static object marked for destruction > more than once > /bin/sh: line 1: 28235 Abgebrochen ${dir}$tst > XFAIL: tst_failure > > *** Testing C++ API test program output. > *** dumping classic format file to nctst_classic.cdl and comparing... > /home/cuntz/netcdf-4.0.1/ncdump/.libs/lt-ncdump: nctst_classic.nc: No > such file or directory > FAIL: run_nc_tests.sh > > *** Testing C++ API test program output for netCDF-4. > *** dumping netcdf-4 format file to nctst_netcdf4.cdl and comparing... > /home/cuntz/netcdf-4.0.1/ncdump/.libs/lt-ncdump: nctst_netcdf4.nc: No > such file or directory > FAIL: run_nc4_tests.sh > ========================================= > 3 of 4 tests failed > Please report to address@hidden > ========================================= > make[2]: *** [check-TESTS] Fehler 1 > make[2]: Leaving directory `/home/cuntz/netcdf-4.0.1/cxx' > make[1]: *** [check-am] Fehler 2 > make[1]: Leaving directory `/home/cuntz/netcdf-4.0.1/cxx' > make: *** [check-recursive] Fehler 1 > > > > Looks like that it is still checking cxx-4 even that I said: > % ./configure --prefix=/home/cuntz/lib/netcdf4_pgi/ --enable-shared > --enable-netcdf-4 \ > --enble-extra-example-tests --enable-extra-tests > --enable-large-file-tests \ > --with-hdf5=/home/cuntz/lib/hdf5_pgi/ > --with-zlib=/home/cuntz/lib/zlib_pgi/ \ > --with-szlib=/home/cuntz/lib/szip_pgi/ --disable-cxx-4 > --enable-ncgen4 && make check > > putting also --disable-cxx into configure works. > > Cheers > Matthias > > > > > Unidata netCDF Support schrieb: > > Hi Matthias, > > > > > >> I am compiling netcdf 4.0.1 on Linux with the Portland Group (pg) > >> compilers. I have compiled zlib, szip and hdf5 with the pg-compilers > >> builiding shared and static libraries without problems. > >> > >> Now I am compiling netcdf 4: > >> > >> % uname -a > >> Linux compile.liclus.leipzig.ufz.de 2.6.9-55.ELsmp #1 SMP Fri Apr 20 > >> 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux > >> % export CC=pgcc > >> % export CXX=pgCC > >> % export FC=pgf90 > >> % ./configure --prefix=/home/cuntz/lib/netcdf4_pgi/ --enable-shared > >> --enable-netcdf-4 --enable-cxx-4 \ > >> --enable-extra-example-tests --enable-extra-tests > >> --enable-large-file-tests \ > >> --with-hdf5=/home/cuntz/lib/hdf5_pgi/ --with-zlib=/home/cuntz/lib/ > >> --with-szlib=/home/cuntz/lib/ > >> % make | tee make.log > >> % make check | tee make_check.log > >> > >> I get: > >> > >> ========================================= > >> 4 of 46 tests failed > >> Please report to address@hidden > >> ========================================= > >> > > > > Portland Group has published recommendations for compiling netCDF with > > their compilers: > > > > http://www.pgroup.com/resources/netcdf/netcdf362_pgi71.htm > > > > and in that recommendation, they have set > > > > CFLAGS="-O2 -Msignextend -V" > > > > before running the configure script. I'm not sure how necessary the -O2 > > and -V are (I think that just prints the version), but we have tested the > > 4.0.1 version using the CFLAGS above on a 64-bit Linux platform with all > > PG compilers, and it worked. The exact settings we used were: > > > > CPPFLAGS="-DNDEBUG -DpgiFortran" > > CC=pgcc > > CFLAGS="-O2 -Msignextend -V" > > CXX=pgCC > > CXXFLAGS=-g > > FC=pgf90 > > FCFLAGS=-g > > F77=pgf90 > > FFLAGS="-O2 -w -V" > > > > and the configure script was called as: > > > > ./configure --enable-netcdf-4 --with-hdf5=/upc/share/ed/local/shecky > > > > before running > > > > make check install > > > > The output from this working build is here: > > > > > > http://www.unidata.ucar.edu/netcdf/builds/4_0_1/out_shecky_2009042811_20_1.txt > > > > As a side note, the cxx4 API is very incomplete and untested. It is > > experimental. If you want to use it, count on having to debug and > > improve it yourself. We hope to get the cxx4 API ready for the 4.2 > > release. I recommend you omit --enable-cxx-4 unless you really need > > it and are prepared to do some work on it. That's why it's currently > > disabled by default. > > > > I hope this helps. > > > > --Russ > > > > Russ Rew UCAR Unidata Program > > address@hidden http://www.unidata.ucar.edu > > > > > > > > Ticket Details > > =================== > > Ticket ID: ZXR-914718 > > Department: Support netCDF > > Priority: Normal > > Status: Closed > > > > > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ZXR-914718 Department: Support netCDF Priority: Normal Status: Closed