Compilation of 'Combine' post-processing tool

Hi,

I was trying to compile the executable for the ‘Combine’ post-processing tool. But I am getting error while running the make command. Here is my log file.

####################
Model set to combine_v521.exe
Repository set to /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/POST/combine
LIB_BASE set to /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/lib/x86_64/intel2018.2.199
LIB_1 set to ioapi/modules
LIB_2 set to ioapi/include_files
LIB_3 set to netcdf/include
LIB_4 set to ioapi/lib
CPP_FLAGS set to
F_COMPILER set to mpiifort
FSTD set to -O3 -fno-alias -mp1 -fp-model source
DBG set to -O0 -g -check bounds -check uninit -fpe0 -fno-alias -ftrapuv -traceback
f_flags set to -fixed -132 -O1 -qoverride-limits -fno-alias -mp1 -fp-model precise
f90_flags set to -free -O1 -fno-alias -mp1 -fp-model precise
LINK_FLAGS set to -qopenmp
IOAPI set to -lioapi
NETCDF set to -lnetcdff -lnetcdf

Building file list for module src
file /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/POST/combine/src/combine.F added to make list
file /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/POST/combine/src/module_evaluator.F added to make list
file /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/POST/combine/src/module_file.F added to make list
file /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/POST/combine/src/module_specdef.F added to make list
file /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/POST/combine/src/utils.F added to make list

Determining global module files

Generating Makefile

Compilers defined
CPP Flags defined
Libraries defined
Includes defined
Objects defined
Make rules defined

file,nfields-1 combine.F 5
modName,modFile 2 SPEC_DEF module_specdef.F
modName,modFile 3 M3FILES module_file.F
modName,modFile 4 EVALUATOR module_evaluator.F
modName 5 M3UTILIO -------------

file,nfields-1 module_evaluator.F 3
modName,modFile 2 M3FILES module_file.F
modName 3 M3UTILIO -------------

file,nfields-1 module_file.F 2
modName 2 M3UTILIO -------------

file,nfields-1 module_specdef.F 3
modName 2 M3UTILIO -------------
modName,modFile 3 M3FILES module_file.F

USE/MODULE dependencies defined

Makefile generated
mpiifort -c -fixed -132 -O1 -qoverride-limits -fno-alias -mp1 -fp-model precise -O3 -fno-alias -mp1 -fp-model source -I /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/lib/x86_64/intel2018.2.199/ioapi/modules -I /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/lib/x86_64/intel2018.2.199/ioapi/include_files -I /gpfs_common/share03/fgarcia4/safrin/cmaq-5.2.1-intel2018.2.199/lib/x86_64/intel2018.2.199/netcdf/include module_file.F
module_file.F(246): error #5102: Cannot open include file ‘netcdf.inc’
INCLUDE ‘netcdf.inc’
-----------------^
module_file.F(571): error #5102: Cannot open include file ‘netcdf.inc’
INCLUDE ‘netcdf.inc’
-----------------^
module_file.F(709): error #5102: Cannot open include file ‘netcdf.inc’
INCLUDE ‘netcdf.inc’
-----------------^
module_file.F(284): error #6404: This name does not have a type, and must have an explicit type. [NF_NOWRITE]
status = NF_OPEN(fname, NF_NOWRITE, ncid)
---------------------------------^
module_file.F(284): error #6404: This name does not have a type, and must have an explicit type. [NF_OPEN]
status = NF_OPEN(fname, NF_NOWRITE, ncid)
------------------^
module_file.F(292): error #6404: This name does not have a type, and must have an explicit type. [NF_GLOBAL]
status = NF_INQ_ATTLEN(ncid, NF_GLOBAL, ‘IOAPI_VERSION’, attlen)
--------------------------------------^
module_file.F(292): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_ATTLEN]
status = NF_INQ_ATTLEN(ncid, NF_GLOBAL, ‘IOAPI_VERSION’, attlen)
------------------^
module_file.F(295): error #6404: This name does not have a type, and must have an explicit type. [NF_CLOSE]
status = NF_CLOSE(ncid)
--------------------^
module_file.F(301): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_DIMID]
status = NF_INQ_DIMID(ncid, ‘west_east’, dimid)
------------------^
module_file.F(597): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_VARID]
status = NF_INQ_VARID( WRFid(fileNo), specName, varid)
---------------------------^
module_file.F(598): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_VAR]
status = status + NF_INQ_VAR( WRFid(fileNo), varid, name, xtype, ndims, dimids, natts )
---------------------------^
module_file.F(637): error #6404: This name does not have a type, and must have an explicit type. [NF_GET_VARA_REAL]
status = NF_GET_VARA_REAL( WRFid(fileNo), varid, start, count, specValue)
--------------------^
module_file.F(582): error #7915: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association - may be used in multiple contained procedures. [NF_MAX_VAR_DIMS]
Integer dimids( NF_MAX_VAR_DIMS )
-------------------------^
module_file.F(582): error #6404: This name does not have a type, and must have an explicit type. [NF_MAX_VAR_DIMS]
Integer dimids( NF_MAX_VAR_DIMS )
-------------------------^
module_file.F(754): error #6404: This name does not have a type, and must have an explicit type. [NF_GET_ATT_TEXT]
status = NF_GET_ATT_TEXT( WRFid(fileNo), NF_GLOBAL, ‘TITLE’, EXECN3D )
------------------^
module_file.F(760): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_DIMID]
status = NF_INQ_DIMID( WRFid(fileNo), ‘west_east’, dimid )
---------------------------^
module_file.F(761): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_DIMLEN]
status = status + NF_INQ_DIMLEN( WRFid(fileNo), dimid, NCOLS3D )
---------------------------^
module_file.F(783): error #6404: This name does not have a type, and must have an explicit type. [NF_GET_ATT_INT]
status = NF_GET_ATT_INT( WRFid(fileNo), NF_GLOBAL, ‘MAP_PROJ’, map_proj)
---------------------------^
module_file.F(784): error #6404: This name does not have a type, and must have an explicit type. [NF_GET_ATT_REAL]
status = status + NF_GET_ATT_REAL( WRFid(fileNo), NF_GLOBAL, ‘TRUELAT1’, truelat1)
---------------------------^
module_file.F(891): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_VARID]
status = NF_INQ_VARID( WRFid(fileNo), ‘P_TOP’, varid)
---------------------------^
module_file.F(892): error #6404: This name does not have a type, and must have an explicit type. [NF_GET_VARA_REAL]
status = status + NF_GET_VARA_REAL( WRFid(fileNo), varid, start, count, VGTOP3D)
---------------------------^
module_file.F(949): error #6404: This name does not have a type, and must have an explicit type. [NF_GET_VARA_TEXT]
status = NF_GET_VARA_TEXT( WRFid(fileNo), varid, start, count, timestamp)
-------------------^
module_file.F(1010): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_NVARS]
status = NF_INQ_NVARS( WRFid(fileNo), nvars )
------------------^
module_file.F(1015): error #6404: This name does not have a type, and must have an explicit type. [NF_INQ_VAR]
status = NF_INQ_VAR( WRFid(fileNo), n, name, xtype, ndims, dimids, natts )
--------------------^
compilation aborted for module_file.F (code 1)
make: *** [module_file.o] Error 1
ERROR while running make command

mv: ‘Makefile’ and ‘Makefile.intel2018.2.199’ are the same file

#######################
It would be great if anyone can help me.
Thanks,
Sadia

for netCDF[-fortran]-4, include-files are probably found somewhere other than where you think and you probably missed some of them in copying into your “netcdf/include

In my netCDF installation, I have include-files in both directories netcdf-4.4.1.1/include/ and netcdf-fortran-4.4.4/fortran/; netcdf.inc is in the latter.

Thanks for your reply. I also noticed that I don’t have that netcdf.inc under the path “fgarcia4/netcdf-c-4.6.1-intel2017/include”. But there is a netcdf.inc file for the netcdf FORTRAN compiler. So do I have to compile the CMAQ again with a new version of NetCDF to run the bldtit script?

For CMAQ (and I/O API generally), module MODNCFIO serves as a unifying replacement for all the needed netCDF and PnetCDF related include-files, together with a number of high-level routines for reading and writing “raw” netCDF files; so basically the issue doesn’t come up.

In my installation described above, netcdf-4.4.1.1/ has the library with the C-compiler calls, together with tools ncgen and ncdump and the include-files used by C-language calls to netCDF; netcdf-fortran-4.4.4 has the routines for the Fortran-compiler calls (which are written in C, by the way), together with the include-files used by Fortran programs.

If you install netCDF using “./configure --prefix=somewhere …; make; make install” for both the Fortran and the C parts, the build-process will install all the libraries under somewhere/lib, tools ncgen and ncdump under somewhere/bin, and all the include and module files under somewhere/include.

Note that this sort of install is problematic if you’re using more than one Fortran compiler (these tend not to be link compatible), or if you want additional debug or profiling versions of your libraries (GNU autoconf as used by netCDF isn’t really up to dealing with such things)… the I/O API system works by copying the various versions of the libraries (etc.) into the relevant compiler-and-option specific directories ${BIN} (e.g., Linux2_x86_64ifort, Linux2_x86_64ifortdbg, Linux2_x86_64ifortpg, Linux2_x86_64ifort_medium, Linux2_x86_64ifortmpi, …)

Thank you so much for explaining it.

Regards,
Sadia