CMAQv5.2-MCIP compilation error

Dear all, I was trying to compile the MCIP, but I got the following error:

[yfjiao@localhost src]$ make
make[1]: Entering directory /home/yfjiao/CMAQ-5.2/PREP/mcip/src' mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c const_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c const_pbl_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c coord_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c date_time_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c date_pack_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c files_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c groutcom_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c luvars_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/CMAQ-5.2/PREP/mcip/src/lib/x86_64/pgi/ioapi/include -c mcipparm_mod.f90 PGF90-F-0004-Unable to open MODULE file m3utilio.mod (mcipparm_mod.f90: 126) PGF90/x86-64 Linux 10.6-0: compilation aborted make[1]: *** [mcipparm_mod.o] Error 2 make[1]: Leaving directory/home/yfjiao/CMAQ-5.2/PREP/mcip/src’
make: *** [all] Error 2

Thank you.

I’ll refer you to @cjcoats.

Thank you! I hope @cjcoats can give me some suggestion.

PGI does not follow the “industry standard” for USEing module files. For the various directories containing module files you need, you need a compiler-flag directive

-module <directory>

In particular, you need such a directive for the directory that contains m3utilio.mod (possibly the same directory as the one for libioapi.a)

Thanks for your suggestion. I got new error now.
[yfjiao@localhost src]$ make
make[1]: Entering directory /home/yfjiao/CMAQ-5.2/PREP/mcip/src' mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c const_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c const_pbl_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c coord_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c date_time_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c date_pack_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c files_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c groutcom_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c luvars_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c mcipparm_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c mcoutcom_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c mdoutcom_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c metinfo_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c metvars_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c vgrd_mod.f90 mpif90 -Mfree -O3 -I/home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include -I/home/yfjiao/ioapi3.1/Linux2_x86_64pg -c wrf_netcdf_mod.f90 PGF90-F-0004-Corrupt or Old Module file /home/yfjiao/CMAQ-5.2/lib/x86_64/pgi/netcdf/include/netcdf.mod (wrf_netcdf_mod.f90: 65) PGF90/x86-64 Linux 10.6-0: compilation aborted make[1]: *** [wrf_netcdf_mod.o] Error 2 make[1]: Leaving directory/home/yfjiao/CMAQ-5.2/PREP/mcip/src’
make: *** [all] Error 2

pgi10.6
netcdf4.1.1
ioapi3.1
mpich3.2

You need to build all components of the program (netCDF, I/O API, MCIP) with the same version of the same compilers (and with compatible compile-flags). It looks as though you need to re-build netCDF with PGI10.6 and use the result.

Thanks for your reply. The program (pgi, netcdf, ioapi) had been used in compiling CMAQv5.0.2, so I confirm the netcdf has no problem.
Does the " Old Module file " mean the new version of netcdf needed?
I’m trying to compile a new version of netcdf.

Does the " Old Module file " mean the new version of netcdf needed?

Exactly – Carlie