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 Arjen, > I am trying to build the NetCDF4 libraries for Intel Fortran 2014 > (Windows 7, 64-bits), as that is the compiler we are using at the moment > for our programs. I am familiar with the CMake build configuration tool, > so I used that to start the building process. However, I had to make > some adjustments because of failures in the build process and finally > I got a number of messages about unresolved external symbols. > > Here is what I did: > > - I downloaded the precompiled version of HDF5 (1.8.14), as NetCDF4 > requires this package and installed the libraries. The unresolved external symbols you encountered are related to parallel I/O support in the netCDF-C library, which requires parallel I/O support in the HDF5 library. Building with parallel I/O support is often not required and complicates later linking with the libraries. For example, shared libraries must be disabled to make use of the HDF5 parallel I/O support. Do you really need parallel I/O? If so, have you already installed a parallel file system and the necessary compilers or compiler wrappers (such as mpicc and mpif90) to support parallel I/O? If you don't need parallel I/O, it would simplify your build and installation process to start with an HDF5-1.8.14 library that is not configured for parallel I/O. If you do require parallel I/O support in netCDF Fortran, that requires that the HDF5 C library and netCDF-C library are built with parallel I/O support. CMake-oriented instructions for building hdf5 and netcdf-c with parallel io support are here: http://www.unidata.ucar.edu/software/netcdf/docs/cmake_faq.html Autoconf-oriented instructions for building HDF5 and netCDF-C with parallel I/O support are here: http://www.unidata.ucar.edu/software/netcdf/docs/getting_and_building_netcdf.html#build_parallel In either case, if you are building and installing on Windows, you will be attempting to build and install with parallel I/O on an as yet untested and hence unsupported configuration. > - I downloaded the sources for NetCDF4-C (4.3.2) > > - I downloaded the sources for NetCDF4-Fortran (4.4.1) > > - Using CMake 2.8.10.2 with the NMake Makefile generator, I created the > C libraries. That took some experimenting with the various CMake > configuration variables, but that succeeded. I turned DAP support off. > > - Running the tests via "nmake test", I noticed 27 failing tests - from > the assertion messages, most of them had to do with heap space problems. I > have not recorded the precise messages, but I can send you the report. > > - Then I moved on to the Fortran bindings, ignoring the failing tests: > > o CMake was complaining about a file "netcdf-targets.cmake", so I changed > the CMake file that it referred to manually - according to the message it > was looking for "d://share/cmake/netcdf-targets.cmake". By replacing the > reference to "${_prefix}" by the expanded value I got the configuration > to continue. > > o The build then failed on the netcdf.h include file. Examination of > the various generated files did not reveal how I could amend for this > (I had specified NETCDF_C_INCLUDE_DIR at the command-line, but its value > was not present in the flags.make file.) To work around this problem > I simply copied the header files from the netcdf/include directory to > netcdf-fortran/fortran . > > o That did the trick in as far as the compilation succeeded. However, > building the libraries themselves failed with several missing references: > > § nc_create_par_fortran in NF_CREATE_PAR (nf_nc4.f90) > > § nc_open_par_fortran in NF_OPEN_PAR > > § nc_var_par_access in NF_VAR_PAR_ACCESS > > § ncerr and ncopts in nf_v2compat.c > > I hope you can advise me how to proceed with this, as we want to use > the NetCDF4 library instead of a legacy library we are currently using. The netCDF-Fortran parallel I/O configuration has as yet only been tested on Unix-based platforms, using an autoconf-oriented build process. So please let us know if you get a different configuration working! --Russ > Kind regards, > > Arjen Markus > Sr. Adviseur/Onderzoeker > T > > 088 - 33 58 273 > > E > > address@hidden > > > > > [Logo]<http://www.deltares.com/> > > www.deltares.com<http://www.deltares.com/> > > Postbus 177 > 2600 MH Delft > > [Deltares Twitter] > <http://www.twitter.com/deltares> > > [Deltares LinkedIn]<http://www.linkedin.com/company/217430> > > [Deltares Facebook]<https://www.facebook.com/pages/Deltares/154189334634001> > > > > [Think before printing]Please consider the environment before printing this > email > DISCLAIMER: This message is intended exclusively for the addressee(s) and may > contain confidential and privileged information. If you are not the intended > recipient please notify the sender immediately and destroy this message. > Unauthorized use, disclosure or copying of this message is strictly > prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, > The Netherlands, Commercial Registration Number 41146461, is not liable in > any way whatsoever for consequences and/or damages resulting from the > improper, incomplete and untimely dispatch, receipt and/or content of this > e-mail. > > Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: WFW-324794 Department: Support netCDF Priority: Normal Status: Closed