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

[netCDF #YPM-575307]: Issues using NetCDF



Rob,

> Thank you for your help
> 
> I have been able to compile the scripts correctly now but still get
> run-time errors related to the NetCDF library.
> 
> I have just tried reinstalling NetCDF and this time I get lots of errors
> that look like this:
> 
> FAILURE at line 4189 of test_put.c: NetCDF: HDF error
> 
> I have reinstalled the hdf5 libraries (using Synaptic Package Manager)
> but still get the same results when I run the 'make check' on the NetCDF
> Library.
> 
> This is what I am doing
> 
> sudo ./configure FC=gfortran
> sudo make install
> sudo make check

You shouldn't run "make install" until after "make check" runs, although that
doesn't explain the HDF errors you're seeing.  "make check" runs checks against
the libraries and programs built in the source directory, not what's installed.
And installing software that doesn't pass the tests from "make check" just means
you've installed software that doesn't work as intended.  I think you can fix
this by running "sudo make uninstall".

Also, running "make install" using sudo is fine, but you shouldn't run the
configure script or "make check" using sudo in general, because on many
systems, using sudo means you won't see the effects of any environment
variables you've set that you use to control the build.  So if you set
CPPFLAGS or LDFLAGS or LD_LIBRARY_PATH for example, before running configure
or "make check", those values won't be used on many systems, as a security
measure.

The large number of HDF errors you're getting make me suspect something wrong
with the HDF5 installation.  Is it a version required by the netCDF version
you're building?  Generally, the current netCDF release requires a recent HDF5 
version, more recent than 1.8.6.

Building HDF5-1.8.10 from source is pretty easy.  You only need the HDF5 C 
library and can accept all the defaults other than specifying where you want
it installed with the --prefix option.

--Russ

> I have pasted the results of the 'make check' from the errors onwards below.
> 
> Can you let me know what is causing this?
> 
> Best Regards & Many thanks
> 
> Rob
> 
> 
> 
> 
> 
> *** testing nc_put_var_text ...
> FAILURE at line 2123 of test_put.c: NetCDF: HDF error
> FAILURE at line 2123 of test_put.c: NetCDF: HDF error
> FAILURE at line 2123 of test_put.c: NetCDF: HDF error
> FAILURE at line 2123 of test_put.c: NetCDF: HDF error
> 179 good comparisons.
> ### 4 FAILURES TESTING nc_put_var_text! ###
> *** testing nc_put_var_uchar ...
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> FAILURE at line 2246 of test_put.c: NetCDF: HDF error
> 264 good comparisons.
> ### 22 FAILURES TESTING nc_put_var_uchar! ###
> *** testing nc_put_var_schar ...
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> FAILURE at line 2369 of test_put.c: NetCDF: HDF error
> 269 good comparisons.
> ### 22 FAILURES TESTING nc_put_var_schar! ###
> *** testing nc_put_var_short ...
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> FAILURE at line 2492 of test_put.c: NetCDF: HDF error
> 682 good comparisons.
> ### 22 FAILURES TESTING nc_put_var_short! ###
> *** testing nc_put_var_int ...
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> FAILURE at line 2615 of test_put.c: NetCDF: HDF error
> 1189 good comparisons.
> ### 22 FAILURES TESTING nc_put_var_int! ###
> *** testing nc_put_var_long ...
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> FAILURE at line 2738 of test_put.c: NetCDF: HDF error
> 1189 good comparisons.
> ### 22 FAILURES TESTING nc_put_var_long! ###
> *** testing nc_put_var_float ...
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> FAILURE at line 2861 of test_put.c: NetCDF: HDF error
> 1194 good comparisons.
> ### 21 FAILURES TESTING nc_put_var_float! ###
> *** testing nc_put_var_double ...
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> FAILURE at line 2984 of test_put.c: NetCDF: HDF error
> 1207 good comparisons.
> ### 22 FAILURES TESTING nc_put_var_double! ###
> *** testing nc_put_var1_text ...  179 good comparisons. ok
> *** testing nc_put_var1_uchar ...  264 good comparisons. ok
> *** testing nc_put_var1_schar ...  269 good comparisons. ok
> *** testing nc_put_var1_short ...  682 good comparisons. ok
> *** testing nc_put_var1_int ...  1189 good comparisons. ok
> *** testing nc_put_var1_long ...  1189 good comparisons. ok
> *** testing nc_put_var1_float ...  1194 good comparisons. ok
> *** testing nc_put_var1_double ...  1207 good comparisons. ok
> *** testing nc_put_var1 ...  1386 good comparisons. ok
> *** testing nc_put_vara_text ...
> FAILURE at line 3139 of test_put.c: NetCDF: HDF error
> FAILURE at line 3185 of test_put.c: NetCDF: HDF error
> FAILURE at line 3139 of test_put.c: NetCDF: HDF error
> FAILURE at line 3185 of test_put.c: NetCDF: HDF error
> FAILURE at line 3139 of test_put.c: NetCDF: HDF error
> FAILURE at line 3139 of test_put.c: NetCDF: HDF error
> FAILURE at line 3139 of test_put.c: NetCDF: HDF error
> FAILURE at line 3139 of test_put.c: NetCDF: HDF error
> 179 good comparisons.
> ### 100 FAILURES TESTING nc_put_vara_text! ###
> *** testing nc_put_vara_uchar ...
> FAILURE at line 3289 of test_put.c: NetCDF: HDF error
> FAILURE at line 3289 of test_put.c: NetCDF: HDF error
> FAILURE at line 3289 of test_put.c: NetCDF: HDF error
> FAILURE at line 3289 of test_put.c: NetCDF: HDF error
> FAILURE at line 3335 of test_put.c: NetCDF: HDF error
> FAILURE at line 3289 of test_put.c: NetCDF: HDF error
> FAILURE at line 3335 of test_put.c: NetCDF: HDF error
> FAILURE at line 3289 of test_put.c: NetCDF: HDF error
> 264 good comparisons.
> ### 445 FAILURES TESTING nc_put_vara_uchar! ###
> *** testing nc_put_vara_schar ...
> FAILURE at line 3439 of test_put.c: NetCDF: HDF error
> FAILURE at line 3485 of test_put.c: NetCDF: HDF error
> FAILURE at line 3439 of test_put.c: NetCDF: HDF error
> FAILURE at line 3485 of test_put.c: NetCDF: HDF error
> FAILURE at line 3439 of test_put.c: NetCDF: HDF error
> FAILURE at line 3439 of test_put.c: NetCDF: HDF error
> FAILURE at line 3485 of test_put.c: NetCDF: HDF error
> FAILURE at line 3439 of test_put.c: NetCDF: HDF error
> 269 good comparisons.
> ### 450 FAILURES TESTING nc_put_vara_schar! ###
> *** testing nc_put_vara_short ...
> FAILURE at line 3589 of test_put.c: NetCDF: HDF error
> FAILURE at line 3589 of test_put.c: NetCDF: HDF error
> FAILURE at line 3635 of test_put.c: NetCDF: HDF error
> FAILURE at line 3589 of test_put.c: NetCDF: HDF error
> FAILURE at line 3635 of test_put.c: NetCDF: HDF error
> FAILURE at line 3589 of test_put.c: NetCDF: HDF error
> FAILURE at line 3589 of test_put.c: NetCDF: HDF error
> FAILURE at line 3635 of test_put.c: NetCDF: HDF error
> 682 good comparisons.
> ### 443 FAILURES TESTING nc_put_vara_short! ###
> *** testing nc_put_vara_int ...
> FAILURE at line 3739 of test_put.c: NetCDF: HDF error
> FAILURE at line 3785 of test_put.c: NetCDF: HDF error
> FAILURE at line 3739 of test_put.c: NetCDF: HDF error
> FAILURE at line 3739 of test_put.c: NetCDF: HDF error
> FAILURE at line 3785 of test_put.c: NetCDF: HDF error
> FAILURE at line 3739 of test_put.c: NetCDF: HDF error
> FAILURE at line 3785 of test_put.c: NetCDF: HDF error
> FAILURE at line 3739 of test_put.c: NetCDF: HDF error
> 1189 good comparisons.
> ### 468 FAILURES TESTING nc_put_vara_int! ###
> *** testing nc_put_vara_long ...
> FAILURE at line 3889 of test_put.c: NetCDF: HDF error
> FAILURE at line 3889 of test_put.c: NetCDF: HDF error
> FAILURE at line 3935 of test_put.c: NetCDF: HDF error
> FAILURE at line 3889 of test_put.c: NetCDF: HDF error
> FAILURE at line 3889 of test_put.c: NetCDF: HDF error
> FAILURE at line 3935 of test_put.c: NetCDF: HDF error
> FAILURE at line 3889 of test_put.c: NetCDF: HDF error
> FAILURE at line 3935 of test_put.c: NetCDF: HDF error
> 1189 good comparisons.
> ### 438 FAILURES TESTING nc_put_vara_long! ###
> *** testing nc_put_vara_float ...
> FAILURE at line 4039 of test_put.c: NetCDF: HDF error
> FAILURE at line 4039 of test_put.c: NetCDF: HDF error
> FAILURE at line 4039 of test_put.c: NetCDF: HDF error
> FAILURE at line 4039 of test_put.c: NetCDF: HDF error
> FAILURE at line 4039 of test_put.c: NetCDF: HDF error
> FAILURE at line 4085 of test_put.c: NetCDF: HDF error
> FAILURE at line 4039 of test_put.c: NetCDF: HDF error
> FAILURE at line 4085 of test_put.c: NetCDF: HDF error
> 1194 good comparisons.
> ### 430 FAILURES TESTING nc_put_vara_float! ###
> *** testing nc_put_vara_double ...
> FAILURE at line 4189 of test_put.c: NetCDF: HDF error
> FAILURE at line 4189 of test_put.c: NetCDF: HDF error
> FAILURE at line 4235 of test_put.c: NetCDF: HDF error
> FAILURE at line 4189 of test_put.c: NetCDF: HDF error
> FAILURE at line 4189 of test_put.c: NetCDF: HDF error
> FAILURE at line 4235 of test_put.c: NetCDF: HDF error
> FAILURE at line 4189 of test_put.c: NetCDF: HDF error
> FAILURE at line 4235 of test_put.c: NetCDF: HDF error
> 1207 good comparisons.
> ### 464 FAILURES TESTING nc_put_vara_double! ###
> *** testing nc_put_vara ...
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> FAILURE at line 903 of test_write.c: NetCDF: HDF error
> 1386 good comparisons.
> ### 422 FAILURES TESTING nc_put_vara! ###
> *** testing nc_put_vars_text ...  179 good comparisons. ok
> *** testing nc_put_vars_uchar ...  264 good comparisons. ok
> *** testing nc_put_vars_schar ...  269 good comparisons. ok
> *** testing nc_put_vars_short ...  682 good comparisons. ok
> *** testing nc_put_vars_int ...  1189 good comparisons. ok
> *** testing nc_put_vars_long ...  1189 good comparisons. ok
> *** testing nc_put_vars_float ...  1194 good comparisons. ok
> *** testing nc_put_vars_double ...  1207 good comparisons. ok
> *** testing nc_put_vars ...  1386 good comparisons. ok
> *** testing nc_put_varm_text ...  179 good comparisons. ok
> *** testing nc_put_varm_uchar ...  264 good comparisons. ok
> *** testing nc_put_varm_schar ...  269 good comparisons. ok
> *** testing nc_put_varm_short ...  682 good comparisons. ok
> *** testing nc_put_varm_int ...  1189 good comparisons. ok
> *** testing nc_put_varm_long ...  1189 good comparisons. ok
> *** testing nc_put_varm_float ...  1194 good comparisons. ok
> *** testing nc_put_varm_double ...  1207 good comparisons. ok
> *** testing nc_put_varm ...  1386 good comparisons. ok
> *** testing nc_rename_var ...  1386 good comparisons. ok
> *** testing nc_put_att_text ...  7 good comparisons. ok
> *** testing nc_put_att_uchar ...  5 good comparisons. ok
> *** testing nc_put_att_schar ...  7 good comparisons. ok
> *** testing nc_put_att_short ...  15 good comparisons. ok
> *** testing nc_put_att_int ...  19 good comparisons. ok
> *** testing nc_put_att_long ...  19 good comparisons. ok
> *** testing nc_put_att_float ...  21 good comparisons. ok
> *** testing nc_put_att_double ...  27 good comparisons. ok
> *** testing nc_put_att ...  34 good comparisons. ok
> *** testing nc_copy_att ...  34 good comparisons. ok
> *** testing nc_rename_att ...  34 good comparisons. ok
> *** testing nc_del_att ... ok
> *** testing nc_set_default_format ... ok
> 
> *** Total number of failures: 3817
> *** nc_test FAILURE!!!
> FAIL: nc_test
> 
> *** Testing some extra stuff.
> *** Trying to open non-netCDF files of tiny length...ok.
> *** Tests successful!
> PASS: tst_misc
> 
> *** testing UTF-8 normalization...ok.
> *** Tests successful!
> PASS: tst_norm
> 
> *** testing names with file tst_names.nc...
> *** switching to netCDF classic format...ok.
> *** switching to netCDF 64-bit offset format...ok.
> *** switching to netCDF netCDF-4/HDF5 format...ok.
> *** switching to netCDF netCDF-4 classic model format...ok.
> *** Tests successful!
> PASS: tst_names
> 
> *** Testing nofill mode.
> *** Create file in nofill mode, writing all values...ok.
> *** Create file with same data in fill mode, writing all values...ok.
> *** Compare values in nofill mode and fill mode files...ok.
> *** Tests successful!
> PASS: tst_nofill
> 
> *** Testing nofill mode.
> *** Create file in nofill mode, writing all values..., trying sizehint
> of 1750000 ...ok.
> *** Tests successful!
> PASS: tst_nofill2
> 
> *** Testing nofill mode.
> *** Create file in nofill mode using nc_create()...ok.
> *** Tests successful!
> PASS: tst_nofill3
> 
> *** Testing netcdf-3 attribute functions.
> *** testing really simple global atts...ok.
> *** testing simple global atts...ok.
> *** testing attribute data type conversions...ok.
> *** testing zero-length attributes...ok.
> *** testing zero-length attributes and redef...(this test skipped for
> HDF5-1.8.0 beta1ok.
> *** testing attribute deletes and renames...ok.
> *** testing attribute create order...ok.
> *** testing attribute ordering some more...ok.
> *** testing attribute ordering even more...ok.
> *** testing attributes and enddef/redef...ok.
> *** testing copy of simple global atts...ok.
> *** Tests successful!
> PASS: tst_atts3
> 
> *** Testing netCDF attributes.
> *** testing attribute renaming for memory leak, like nc_test...ok.
> *** testing attribute renaming for memory leak, like nc_test...ok.
> *** Tests successful!
> PASS: tst_atts
> 
> *** Testing in-memory (diskless) files with and without persistence
> **** Test diskless netCDF classic file without persistence
> 
> *** Testing the diskless API.
> *** testing diskless file with scalar vars...ok.
> ok.
> *** testing creation of simple diskless file...ok.
> *** testing diskless file with scalar vars and type conversion...ok.
> *** Tests successful!
> PASS: diskless netCDF classic file without persistence
> 
> **** Test diskless netCDF enhanced file without persistence
> 
> *** Testing the diskless API.
> *** testing diskless file with scalar vars...ok.
> ok.
> *** testing creation of simple diskless file...ok.
> *** testing diskless file with scalar vars and type conversion...ok.
> *** Tests successful!
> PASS: diskless netCDF enhanced file without persistence
> 
> **** Test diskless netCDF classic file with persistence
> 
> *** Testing the diskless API.
> *** testing diskless file with scalar vars...ok.
> *** testing diskless open of previously created file...ok.
> *** testing creation of simple diskless file...ok.
> *** testing diskless file with scalar vars and type conversion...ok.
> *** Tests successful!
> **** tst_diskless.nc created
> PASS: diskless netCDF classic file with persistence
> 
> **** Test diskless netCDF enhanced file with persistence
> 
> *** Testing the diskless API.
> *** testing diskless file with scalar vars...ok.
> ok.
> *** testing creation of simple diskless file...ok.
> *** testing diskless file with scalar vars and type conversion...ok.
> *** Tests successful!
> **** tst_diskless.nc created
> PASS: diskless netCDF enhanced file with persistence
> 
> **** Test extended enhanced diskless netCDF with persistence
> **** tst_diskless2.nc created
> PASS: extended enhanced diskless netCDF with persistence
> 
> **** Testing nc_open in-memory (diskless) files
> 
> **** Create and modify file without using diskless
> 
> *** Testing diskless file: create/modify in-file tst_diskless3.nc
> *** testing diskless file with two growing record variables, with
> attributes added...ok.
> *** Tests successful!
> 
> **** Create and modify file using diskless
> 
> *** Testing diskless file: create/modify in-memory tst_diskless3.nc
> *** testing diskless file with two growing record variables, with
> attributes added...ok.
> *** Tests successful!
> PASS: run_diskless.sh
> ================================================
> 1 of 12 tests failed
> Please report to address@hidden
> ================================================
> 
> 
> On 01/03/13 19:43, Unidata netCDF Support wrote:
> > Hi Rob,
> >
> >> I'm currently trying to get some ocean modelling software working which
> >> I have downloaded (NEMO - http://www.nemo-ocean.eu/) that uses NetCDF.
> >> I've been running into a lot of trouble with it, as I am compiling it.
> >>
> >> I am trying to build the model with gfortran using Ubuntu 12.04. The
> >> 'USE netcdf' commands within the Fortran files are processing without
> >> errors, but the references to netcdf within the code are giving errors
> >> such as this:
> >>
> >> histcom.f90:(.text+0x203): undefined reference to `__netcdf_MOD_nf90_redef'
> >>
> >> Am I correct in thinking that this is because the 'netcdf.mod' file that
> >> I have in my 'usr/includes/' folder is compiled using a different
> >> compiler to gfortran? If so, what would you recommend that I do? I have
> >> tried various ways of re-configuring the netcdf files but so far with no
> >> success.
> > Yes, using a different Fortran compiler (or in some cases just a different
> > version of the same Fortran compiler) changes the .mod file format.  You
> > will either have to use the same compiler that was used to build the netCDF
> > Fortran library, or rebuild and reinstall the netCDF Fortran library with
> > the same compiler you're using for your application.
> >
> >> Also, if it is possible for me to rebuild this, is it just the
> >> 'netcdf.mod' file in the 'usr/includes/' folder that needs to be replaced?
> > You would have to rebuild the netCDF Fortran library, but you may be able to
> > keep using the same netCDF C library that's already installed, depending on
> > how old the C library version is and whether it was built as a shared 
> > library
> > or not.  Here's the instructions for getting the netCDF Fortran library and
> > rebuilding it by telling it where the netCDF C library is installed:
> >
> >    http://www.unidata.ucar.edu/netcdf/docs/netcdf-fortran-install.html
> >
> > If you also need to get and build the netCDF C library, instructions for 
> > that
> > are here, under the "Getting" and "Building" links:
> >
> >    http://www.unidata.ucar.edu/netcdf/docs/
> >
> > --Russ
> >
> > Russ Rew                                         UCAR Unidata Program
> > address@hidden                      http://www.unidata.ucar.edu
> >
> >
> >
> > Ticket Details
> > ===================
> > Ticket ID: YPM-575307
> > Department: Support netCDF
> > Priority: Normal
> > Status: Closed
> >
> 
> 
> 

Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: YPM-575307
Department: Support netCDF
Priority: High
Status: Closed