Airs2m3 error 2 while compiling m3tool in IOAPI3.2

Hi, I am trying to compile IOAPI 3.2 with ifort, and it succeeds when “make” under /ioapi, and there is libioapi.a under /Linux5_x86_64ifort.

My loaded modules include:
intel/ cray-hdf5/ cray-netcdf/

But when I tried to compile m3tool, it shows the attached air2m3 error message.
I also attach Makefile in m3tool.

Thanks your time.

log_ifort.txt (5.7 KB)
Makefile.txt (11.9 KB)


…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.

1 Like

Thanks for your time.

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)

…add -DIOAPI_NCF4=1 either to the ARCHFLAGS in your I/O API Makeinclude.${BIN} or to the DEFINEFLAGS in your I/O API Makefile

Thanks for your reply, @cjcoats .

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

I attached the error message.
log_ftn.txt (9.4 KB)
log_ifort.txt (4.2 KB)

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…

Hi, @cjcoats

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:

export CRAYPE_LINK_TYPE=static
export LIBRARY_PATH=$LIBRARY_PATH:/global/common/cori/usg/curl/7.50.1/hsw/lib

I attach the message. It seems there is no error but I am not sure.
log_m3tools.txt (107.0 KB)

Can you give me a hint how to make sure I successfully compiled m3tools?

All files under /Linux5_x86_64ftn include


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…