CMAQv5.3 mcip compiling error- Check INCLUDE paths. [M3UTILIO]

Hi Carlie and Liz et al.,

I am running into a problem related to M3UTILIO when compiling MCIP in v5.3, any suggestion will be helpful. My make file, ioapi location, and error messages are listed below.

I also tried changing FC from ifort to mpif90, but same error, all these programs are installed using intel 17



Here is my Makefile

    #...Intel Fortran
    FC      = ifort
    NETCDF = /storage/highspeed/apps/netcdf-c-4.7.0-intel17
    IOAPI_ROOT = /storage/highspeed/apps/ioapi-3.2_2019025
    ###FFLAGS  = -g -O0 -check all -C -traceback -FR -I$(NETCDF)/include  \
    ###          -I$(IOAPI_ROOT)/Linux2_x86_64ifort
    FFLAGS  = -FR -O3 -traceback -I$(NETCDF)/include -I$(IOAPI_ROOT)/Linux2_x86_64ifort_intel17
    #LIBS    = -L$(IOAPI_ROOT)/lib -lioapi \
    LIBS    = -L$(IOAPI_ROOT)/Linux2_x86_64ifort_intel17 -lioapi \
    -L$(NETCDF)/lib -lnetcdff -lnetcdf

Here is my m3utilio location

    [jhuang@ncaqc2017 Linux2_x86_64ifort_intel17]$ pwd
    [jhuang@ncaqc2017 Linux2_x86_64ifort_intel17]$ ls m3utilio.*
      m3utilio.mod  m3utilio.o

Here is the error

    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c const_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c const_pbl_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c coord_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c ctmvars_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c date_time_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c date_pack_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c files_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c lucats_mod.f90
    ifort -FR -O3 -traceback -I/storage/highspeed/apps/netcdf-c-4.7.0-intel17/include -I/storage/highspeed/apps/ioapi-3.2_2019025/Linux2_x86_64ifort_intel17  -c mcipparm_mod.f90
    mcipparm_mod.f90(146): error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [M3UTILIO]
    USE m3utilio, ONLY: mxdesc3
      mcipparm_mod.f90(310): error #6406: Conflicting attributes or multiple declaration of name.   [MXDESC3]
    CHARACTER(LEN=80)                 :: fdesc      ( mxdesc3 )
      mcipparm_mod.f90(310): error #6223: A specification expression is invalid.   [MXDESC3]
    CHARACTER(LEN=80)                 :: fdesc      ( mxdesc3 )
      mcipparm_mod.f90(146): error #6580: Name in only-list does not exist.   [MXDESC3]
    USE m3utilio, ONLY: mxdesc3
      compilation aborted for mcipparm_mod.f90 (code 1)
    make[1]: *** [mcipparm_mod.o] Error 1
    make[1]: Leaving directory `/storage/highspeed/Models/aq/CMAQ/CMAQ_v5.3/PREP/mcip/src'
    make: *** [all] Error 2

I had a successful compile of mcip.exe when I used the following settings.
Note, I am pointing directly to each of the netcdf C and netcdf Fortran directories and to the directory where I/O API was installed.

FC      = ifort
#NETCDF = /usr/local/apps/netcdf-4.6.3/intel-18.0
NETCDF = /proj/ie/proj/CMAS/CMAQ/CMAQv5.3_branch_UNC10/openmpi_3.1.4_intel_18.2/library/netcdf-c-4.7.0/netcdf-c-4.7.0-intel18.2
NETCDFF = /proj/ie/proj/CMAS/CMAQ/CMAQv5.3_branch_UNC10/openmpi_3.1.4_intel_18.2/library/netcdf-fortran-4.4.5/netcdf-fortran-4.4.5-intel18.2
#IOAPI_ROOT = /usr/local/apps/ioapi-3.2/intel-18.0
IOAPI_ROOT = /proj/ie/proj/CMAS/CMAQ/CMAQv5.3_branch_UNC10/openmpi_3.1.4_intel_18.2/library/ioapi-3.2
###FFLAGS  = -g -O0 -check all -C -traceback -FR -I$(NETCDF)/include  \
###          -I$(IOAPI_ROOT)/Linux2_x86_64ifort
FFLAGS  = -FR -O3 -traceback -I$(NETCDFF)/include -I$(NETCDF)/include -I$(IOAPI_ROOT)/Linux2_x86_64ifort_openmpi_3.1.4_intel18.2
LIBS    = -L$(IOAPI_ROOT)/Linux2_x86_64ifort_openmpi_3.1.4_intel18.2 -lioapi \
          -L$(NETCDFF)/lib -lnetcdff -L$(NETCDF)/lib -lnetcdf -qopenmp


I noticed that problem, therefore, I did the soft link for netcdf lib and include dir

  [jhuang@ncaqc2017 include]$ pwd
  [jhuang@ncaqc2017 include]$ ll
  total 84
  -rw-r--r-- 1 jhuang hpc  1453 Sep 25 19:31 netcdf_aux.h
  lrwxrwxrwx 1 jhuang hpc    75 Sep 30 18:39 netcdf_f03.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/netcdf_f03.mod
  -rw-r--r-- 1 jhuang hpc   616 Sep 25 19:31 netcdf_filter.h
  lrwxrwxrwx 1 jhuang hpc    91 Sep 30 18:39 netcdf_fortv2_c_interfaces.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/netcdf_fortv2_c_interfaces.mod
  -rw-r--r-- 1 jhuang hpc 67862 Sep 25 19:31 netcdf.h
  lrwxrwxrwx 1 jhuang hpc    71 Sep 30 18:39 -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/
  -rw-r--r-- 1 jhuang hpc  1542 Sep 25 19:31 netcdf_mem.h
  -rw-r--r-- 1 jhuang hpc  2401 Sep 25 19:31 netcdf_meta.h
  lrwxrwxrwx 1 jhuang hpc    71 Sep 30 18:39 netcdf.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/netcdf.mod
  lrwxrwxrwx 1 jhuang hpc    79 Sep 30 18:39 netcdf_nc_data.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/netcdf_nc_data.mod
  lrwxrwxrwx 1 jhuang hpc    85 Sep 30 18:39 netcdf_nc_interfaces.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/netcdf_nc_interfaces.mod
  lrwxrwxrwx 1 jhuang hpc    79 Sep 30 18:39 netcdf_nf_data.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/netcdf_nf_data.mod
  lrwxrwxrwx 1 jhuang hpc    85 Sep 30 18:39 netcdf_nf_interfaces.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/netcdf_nf_interfaces.mod
  lrwxrwxrwx 1 jhuang hpc    74 Sep 30 18:39 typesizes.mod -> /storage/highspeed/apps/netcdf-fortran-4.4.5-intel17/include/typesizes.mod

I also tried your method, but both methods returned the same error.

Hi Liz,

I am running offline WRF CMAQ, netcdf and ioapi libs in mcip installation do not have to be same as CMAQ right?
I used other netcdf version (fortran 4.5.0) and it went through, not sure what was the problem.


1 Like