MCIP Compilation

Dear all

I am trying to compile MCIP but I got the following error:

mpiifort -free -I/media/maria/Backup/CMAQ_Project/PREP/mcip/scripts/lib/x86_64/intel/netcdf/include -I/media/maria/Backup/CMAQ_Project/PREP/mcip/scripts/lib/x86_64/intel/ioapi/include -c mcipparm_mod.f90
mcipparm_mod.f90(126): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [M3UTILIO]
USE m3utilio, ONLY: mxdesc3
mcipparm_mod.f90(243): error #6406: Conflicting attributes or multiple declaration of name. [MXDESC3]
CHARACTER(LEN=80) :: fdesc ( mxdesc3 )
mcipparm_mod.f90(243): error #6223: A specification expression is invalid. [MXDESC3]
CHARACTER(LEN=80) :: fdesc ( mxdesc3 )
mcipparm_mod.f90(126): error #6580: Name in only-list does not exist or is not accessible. [MXDESC3]
USE m3utilio, ONLY: mxdesc3
compilation aborted for mcipparm_mod.f90 (code 1)
Makefile:136: fallo en las instrucciones para el objetivo ‘mcipparm_mod.o’
make[1]: *** [mcipparm_mod.o] Error 1
make[1]: se sale del directorio ‘/media/maria/Backup/CMAQ_Project/PREP/mcip/src’
Makefile:127: fallo en las instrucciones para el objetivo ‘all’
make: *** [all] Error 2

Searching on internet, they suggest to remove the corresponding INCLUDE -statements, function-declarations, and EXTERNAL statements. I remove on the Makefile the next instruction -I$(IOAPI_DIR)/include, however the error persist.

Do you have any suggestion?
Appreciate your help.

You need to tell the compiler where to find m3utilio.mod.
You need to have compiled IOAPI first. Then make sure there is a flag -I/path/to/the/directory in your Makefile. Note that you do not point specifically to the file m3utilio.mod, only to the directory containing it.

Thank you. I fixed the error.

Hi Maria,

I am getting the same error. Could you please demonstrate me, how you fixed the error? Any help will be appreciated.


Hi Sadia

I am not totally sure what I did (bad memory), but I remember that: first I installed IOAPI with the compiler ifort, the same that I used to install CMAQ. Then, in the Makefile that is located in the next path: $CMAQ_HOME/PREP/mcip/src I changed in the variable FFLAGS -fopenmp for -qopenmp. This is my script:

 FC = ${myFC}

FFLAGS = $(myFRFLAGS) -I$(NETCDF_DIR)/include -I$(IOAPI_DIR)/include_files -qopenmp

  LIBS = -L$(IOAPI_DIR)/lib $(ioapi_lib) \

        -L$(NETCDF_DIR)/lib $(netcdf_lib) $(extra_lib)

Hope, it can be useful for you.


Hi Maria,

Thank you so much for your quick response. It helped. But still, I am getting a different error. Thanks again.


@Sadia – What is your new error?

Thanks for your concern. I am actually came out from that Makefile. But now I am stuck in the CCTM compilation. I getting the following error:

make list
file /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/src/util/util/subhfile.F added to make list
file /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/src/util/util/UTILIO_DEFN.F added to make list
ERROR Cannot Open source file:alloc_data_mod.f
else if ( 0 ) then
mv Makefile Makefile.intel2017.1.132
mv: cannot stat ‘Makefile’: No such file or directory
if ( -e Makefile.intel2017.1.132 && -e Makefile ) rm Makefile
ln -s Makefile.intel2017.1.132 Makefile
if ( 0 != 0 ) then
if ( -e /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/scripts/BLD_CCTM_v521_intel2017.1.132/CCTM_v521.cfg ) then
mv CCTM_v521.cfg.bld /usr/local/usrapps/fgarcia4/CMAQ5.2.1-Sadia/CCTM/scripts/BLD_CCTM_v521_intel2017.1.132/CCTM_v521.cfg

It would be great if you could help me out.

@Sadia – If you have not already done so, please post this issue in the CMAQ topic area. It will be addressed there.

Thanks for your advice.