Problems in installing large version IOAPI

Hi all,
I am trying to compile IOAPI-large for my simulation but when I compiling m3tools I got error of:
In function wrvars_': wrvars.F90:(.text+0x115): undefined reference to nf_put_vara_int64_’
wrvars.F90:(.text+0x4cf): undefined reference to `nf_put_vara_int64_’

In function rdvars_': rdvars.F90:(.text+0x1de): undefined reference to nf_get_vara_int64_’
rdvars.F90:(.text+0x585): undefined reference to `nf_get_vara_int64_’

I am using intel/2018.1.163, I chose the Linux2_x86_64ifort_medium configuration in compiling IOAPI. I built my own NetCDF with hdf4 disable. Does anyone have any idea about how to solve this problem?


See the section in the installation manual on netCDF4:

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.

Thanks for your response. I have added this option in the Makeinclude file and got another error message:
/uufs/ In function wrvars_': /uufs/ undefined reference to nf_put_vara_int64_’
/uufs/ undefined reference to nf_put_vara_int64_' /uufs/ In function rdvars_‘:
/uufs/ undefined reference to nf_get_vara_int64_' /uufs/ undefined reference to nf_get_vara_int64_’
collect2: error: ld returned 1 exit status
make: *** [Makefile:256: airs2m3] Error 1

Whether you need this flag depends upon how you have built both netCDF and the I/O API.
When you do the commands
nm libnetcdff.a "| grep int64
nm libioapi.a | grep int64
what do you get?

If you get symbols of type T, then you need -DIOAPI_NCF4=1; if you don’t, then you don’t…

[and possibly you need to do this after a clean I/O API build…]

I got nothing back when doing commands: nm libnetcdff.a | grep int64
so I assume I don’t need -DIOAPI_NCF4=1
I built up NetCDF with --disable-netcdf-4 so I think the issue might not due to the NetCDF library
Do you have any suggestion on how should I deal with this?

This looks like you need a clean I/O API build for which IOAPI_NCF4 is not defined: in that case, modncfio.F90 defines “dummy” routines such as nf_put_var_int64; these dummy routines write an error message that says netCDF-4 not enabled and then return NF_FATAL as the error-status, tio indicate that the INTEGER*8 operations are not available.

Are you doing this as a clean/stand-alone I/O API build, or is this part of something else, like a CMAQ build? If the latter, that “something else” is screwing up.

I am building this large-IOAPI for the CMAQ-DDM run. But I build this stand-alone.