…NetCDF Version 4.x have lots of additional build options, that will require a complex set of additional libraries in your Makefiles and all other model-building systems. It is recommended that you disable these options by adding the command-line flags below to your netCDF configure command:
--disable-netcdf4 --disable-dap
or (depending upon netCDF version; don’t you love consistency and compatibility !?? )
--disable-netcdf-4 --disable-dap
If you build netCDF-4 without the --disable-netcdf4, you will also need to add -DIOAPI_NCF4=1 either to the ARCHFLAGS in your Makeinclude.${BIN} or to the DEFINEFLAGS in your Makefile, since defining netCDF-4 causes netCDF to change parts of the netCDF-3 interface.
If I understand correctly, adding --disable-netcdf4 --disable-dap is in Makefile of NetCDF4 compilation. Is that right?
If so, I may not be able to solve it because NetCDF4 was not compiled on my personal computer but on the super computer (NERSC Cori). Should I connect with the helpdesk?
Also, I tried an alternative to compile with ftn, because in the previous Cori, ftn works.
Still, ioapi compilation succeeds, but m3tools compiling still has the attached error message. log_ftn.txt (11.4 KB)
I tried the following 4 combinations for compiling ioapi/m3tools, but only ioapi succeeded. m3tools compilation still failed.
Under Linux5_x86_64ifort:
(1) -DIOAPI_NCF4=1 in Makeinclude.Linux5_x86_64ifort
(2) activate -DIOAPI_NCF4=1 in Makefile without -DIOAPI_NCF4=1 in Makeinclude.Linux5_x86_64ifort
Under Linux5_x86_64ftn:
(3) -DIOAPI_NCF4=1 in Makeinclude.Linux5_x86_64ftn
(4) activate -DIOAPI_NCF4=1 in Makefile without -DIOAPI_NCF4=1 in Makeinclude.Linux5_x86_64ftn
Run the net CDF commands ncconfig and nfconfig to find out what extra libraries you will need. Then contact your system administrator for where to find these libraries.
Or else build your own netCDF (as most people do), following the I/O API recommendations.
And note that you need to build netCDF with the same compiler you use for everything else: for example, an ifort/icc netCDF won’t necessarily work with a gfortran/gcc I/O API and vice versa…
Some updates and one naive question.
The system administrator suggests exporting CRAYPE_LINK_TYPE and LIBRARY_PATH before the m3tool compilation.
So I add the two command lines in m3tools/Makefile as follows:
Top-Level make targets include the following:
… make test (for I/O API 3.2 post-March 25, or I/O API 4.0)
Subsequent to make all, the command make test from the installations ${BASEDIR} runs a series of tests that ensures the I/O API and m3tools programs are correctly installed, and demonstrate various I/O API capabilities…