# Error: While running make command for SMAT hr2day compilation

**URL:** <https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157>\
**Category:** CMAQ-POST\
**Tags:** admin\
**Created:** [March 10, 2021, 4:52pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157 "2021-03-10T16:52:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 10, 2021, 4:52pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157/1 "2021-03-10T16:52:19Z")

</div>

Hello,  
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](https://forum.cmascenter.org/uploads/short-url/5c8vbyph3Xu6YjXp2ZxRxiox6yX.txt) (10.7 KB) and then modified only set ioapi line in bldit\_hr2day.csh (attached) file [bldit\_hr2day (copy).txt](https://forum.cmascenter.org/uploads/short-url/rO6y7YFEaO48XQmkTaC33NqfMeU.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 [http://www.pgroup.com/community](http://www.pgroup.com/community) or**  
**contact PGI Sales at [sales@pgroup.com](mailto:sales@pgroup.com) 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**  
**FORTRAN STOP**  
**mv: ‘Makefile’ and ‘Makefile.pgi’ are the same file**

Your help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [March 10, 2021, 5:56pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157/2 "2021-03-10T17:56:19Z")

</div>

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`

to

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

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 10, 2021, 7:04pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157/3 "2021-03-10T19:04:59Z")

</div>

Hello,  
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**_  
_ **/root/Documents/softwares/ioapi3.2\_install/ioapi-3.2-20200828/Linux3** _

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
```

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [March 10, 2021, 7:29pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157/4 "2021-03-10T19:29:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 10, 2021, 7:47pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157/5 "2021-03-10T19:47:54Z")

</div>

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

**[root@adeq pgi]# pwd**  
**/root/Downloads/CMAQ-master/lib/x86\_64/pgi**  
**[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]#**

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [March 10, 2021, 8:07pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157/6 "2021-03-10T20:07:12Z")

</div>

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`?

---

<div class="post-metadata">

**Author:** ![Iqbal](https://avatars.discourse-cdn.com/v4/letter/i/bc8723/32.png) [@Iqbal](https://forum.cmascenter.org/u/Iqbal)\
**Post date:** [March 10, 2021, 8:25pm UTC](https://forum.cmascenter.org/t/error-while-running-make-command-for-smat-hr2day-compilation/2157/7 "2021-03-10T20:25:44Z")

</div>

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
