Error: While running make command for SMAT hr2day compilation

I have downloaded CMAQ 5.3.2 and trying to compile ‘hr2day’ from CMAQ-master/POST/ directory.

I am using pgi compiler and ioapi v3.2. I have modified the directory path as my system in config_cmaq.csh file (attached) config_cmaq (copy).txt (10.7 KB) and then modified only set ioapi line in bldit_hr2day.csh (attached) file bldit_hr2day (copy).txt (8.5 KB) from /POST/hr2day/scripts folder
’ #> Set IO/API version
set IOAPI = ioapi_3.2

Then I issued the command ./bldit_hr2day.csh pgi which is giving me following error in the terminal:

USE/MODULE dependencies defined

Makefile generated
/home/IqbalHossan/Documents/software/pgi/linux86-64/19.10/bin/pgf90 -c -Mfixed -Mextend -mcmodel=medium -tp px -Bstatic_pgi -O3 -I /root/Downloads/CMAQ-master/lib/x86_64/pgi/ioapi/lib -I /root/Downloads/CMAQ-master/lib/x86_64/pgi/ioapi/include_files -I /root/Downloads/CMAQ-master/lib/x86_64/pgi/netcdf/include -I /root/Downloads/CMAQ-master/lib/x86_64/pgi/netcdff/include module_file.F

WARNING: Your license to use PGI Community Edition version 19.10 has expired.
Please obtain a new version at or
contact PGI Sales at to obtain a perpetual license.

PGF90-F-0004-Unable to open MODULE file m3utilio.mod (module_file.F: 33)
PGF90/x86-64 Linux 19.10-0: compilation aborted
make: *** [module_file.o] Error 2
ERROR while running make command

Warning: ieee_inexact is signaling
mv: ‘Makefile’ and ‘Makefile.pgi’ are the same file

Your help would be greatly appreciated.

You specified an incorrect location for IOAPI_MOD_DIR when you edited config_cmaq. You need to set it to the directory where m3utilio.mod is located, this is what the compiler error message is telling you.

Assuming it is located in the same directory as libioapi.a in your installation, this means changing

setenv IOAPI_MOD_DIR /root/Documents/softwares/ioapi3.2_install/ioapi-3.2-20200828/ioapi/Makeinclude.Linux3


setenv IOAPI_MOD_DIR /root/Documents/softwares/ioapi3.2_install/ioapi-3.2-20200828/Linux3

Thank you for the response. I did modify the path, But still same error occurs.

You can see the path from terminal:
root@adeq Linux3]# ls -l m3ut
-rw-r–r--. 1 root root 286294 Feb 9 13:00 m3utilio.mod
-rw-r–r--. 1 root root 293616 Feb 9 13:00 m3utilio.o
[root@adeq Linux3]# pwd

The config.cmaq.csh library location section is

    #> I/O API, netCDF, and MPI library locations
    setenv IOAPI_MOD_DIR  /root/Documents/softwares/ioapi3.2_install/ioapi-3.2-20200828/Linux3 #> I/O API precompiled modules
    setenv IOAPI_INCL_DIR  /root/Documents/softwares/ioapi3.2_install/ioapi-3.2-20200828/ioapi/fixed_src           #> I/O API include header files
    setenv IOAPI_LIB_DIR   /root/Documents/softwares/ioapi3.2_install/ioapi-3.2-20200828/Linux3             #> I/O API libraries
    setenv NETCDF_LIB_DIR  /usr/local/netcdf-4.7.4/lib       #> netCDF directory path
    setenv NETCDF_INCL_DIR /usr/local/netcdf-4.7.4/include   #> netCDF directory path
    setenv MPI_LIB_DIR     /usr/local/mpich-install                           #> MPI directory path

O.k., let’s step back.

I realized now that the release version of config_cmaq.csh does not even set IOAPI_MOD_DIR since both libioapi.a and m3utilio.mod are expected under the standard IOAPI_LIB_DIR directory, so there was no need for you to introduce IOAPI_MOD_DIR, but even setting it to a wrong value shouldn’t have harmed things.

Did you verify that the links which config_cmaq.csh creates under /root/Downloads/CMAQ-master/lib/x86_64/pgi/ioapi are indeed pointing to the correct I/O API installation location and specifically that libioapi.a and m3utilio.mod are present in the directory which /root/Downloads/CMAQ-master/lib/x86_64/pgi/ioapi/lib links to?

It didn’t create ioapi link in the lib folder. Please see the following:

[root@adeq pgi]# pwd
[root@adeq pgi]# ls -ltrh
total 0
drwxr-xr-x. 2 root root 32 Mar 9 14:40 netcdf
drwxr-xr-x. 2 root root 6 Mar 9 14:40 netcdff
lrwxrwxrwx. 1 root root 24 Mar 10 13:02 mpi → /usr/local/mpich-install
[root@adeq pgi]#

So even when you go to /root/Downloads/CMAQ-master/ and type source ./config_cmaq.csh, no ioapi directory is created under /root/Downloads/CMAQ-master/lib/x86_64/pgi? Do you see error messages? Are there any other directories under /root/Downloads/CMAQ-master/lib?

Thank you so much for the help. I successfully created hr2day_v532.exe.

After setting up the correct directory path I ran ./config_cmaq.csh which was successful and then I ran /POST/hr2day/scripts/bldit_hr2day.csh .

Thank you so much