# Bcon compilation

**URL:** <https://forum.cmascenter.org/t/bcon-compilation/494>\
**Category:** Compiling\
**Created:** [January 24, 2019, 7:57pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494 "2019-01-24T19:57:32Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![mms](https://avatars.discourse-cdn.com/v4/letter/m/b5a626/32.png) [@mms](https://forum.cmascenter.org/u/mms)\
**Post date:** [January 24, 2019, 7:57pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/1 "2019-01-24T19:57:32Z")

</div>

Hello,

I am trying to compile CMAQv5.2.1 benchmark, while building bcon, I get the following error, any clue to fix this highly appreciated.  
MMS

terp.o -L/home/cmaq/T1/CMAQ\_REPO/lib/x86\_64/pgi/ioapi/lib -lioapi -L/home/cmaq/T1/CMAQ\_REPO/lib/x86\_64/pgi/netcdf/lib -lnetcdf -lnetcdff -o BCON\_v52\_profile.exe  
/usr/bin/ld: cannot find -lnetcdff  
Makefile:83: recipe for target ‘BCON\_v52\_profile.exe’ failed  
make: \*\*\* [BCON\_v52\_profile.exe] Error 2  
**ERROR** while running make command

FORTRAN STOP

---

<div class="post-metadata">

**Author:** ![foley.kristen](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@foley.kristen](https://forum.cmascenter.org/u/foley.kristen)\
**Post date:** [January 29, 2019, 7:08pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/2 "2019-01-29T19:08:12Z")

</div>

Please take a look at Issue CMAQv5.2.1-i2 on the Known Issues page for v5.2.1 and let us know if the fix that is provided is able to resolve the error.

> <https://github.com/USEPA/CMAQ/blob/5.2.1/DOCS/Known_Issues/README.md>

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [February 4, 2019, 3:09pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/3 "2019-02-04T15:09:06Z")

</div>

The issue I think you’re having does not seem to be properly reflected on the CMAQ “known issues” page;  
instead, see the I/O API Installation Notes ([Availability/Download of the BAMS/Models-3 I/O&nbsp;API](https://cjcoats.github.io/ioapi/AVAIL.html#ncf4) or [Availability/Download of the BAMS/Models-3 I/O&nbsp;API](https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#ncf4)):

> …NetCDF Version 4.1 and later also split the Fortran interfaces into a separate library _libnetcdff.a_ As a result, much compatiblity with the infrastructure (Makefiles, etc.) is broken: you **must modify all Makefiles, replacing _`-lnetcdf`_ with _`lnetcdff -lnetcdf`_** …

Carlie J. Coats, Jr., Ph.D. I/O API Author/Maintainer

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [April 5, 2019, 7:23am UTC](https://forum.cmascenter.org/t/bcon-compilation/494/4 "2019-04-05T07:23:44Z")

</div>

@cjcoats Please, below is the response I got while trying to configure CMAQ:

ERROR: /home/catalyst/Desktop/Build\_WRF/CMAQ-5.2.1/lib/x86\_64/gcc/netcdf/lib/libnetcdf.a does not exist in your CMAQ\_LIB directorysource config\_cmaq.csh gcc! Check your installation before proceeding with CMAQ build.

Also, while compiling ICON and BCON:  
rm: No match.  
mpif90: Command not found.  
mpif90: Command not found.  
mpif90: Command not found.  
mpif90: Command not found.  
mpif90: No match.

_ **ERROR** _ BLDMAKE Compile failed

Kindly help, please.

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [April 5, 2019, 1:00pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/5 "2019-04-05T13:00:41Z")

</div>

You are missing required software that is required to build the code.  
Please check with your system administrators.

If you are running on a linux server that has a module load command you may need to use

```auto
module avail

```

To determine what modules to load on your server to allow you to find the mpif90 command.

If you do not have system administrators, and need to install the software on your linux system on your own, you can try following these instructions.

> <https://github.com/USEPA/CMAQ/blob/5.2.1/DOCS/Tutorials/CMAQ_GettingStarted.md>

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [April 5, 2019, 4:25pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/6 "2019-04-05T16:25:07Z")

</div>

Thanks for your response. But the problems still persist after installing netcdf-c-4.6.3 and netcdf-fortran-4.4.4 following your instructions.  
The I/O API Version 3.2 couldn’t be installed on my system too. My system’s linux version is ‘‘x86\_64-linux-gnu’’ and is not listed among the versions compatible with the I/0 API.

source config\_cmaq.csh gcc 7.3.0  
Compiler is set to gcc  
ERROR: /home/catalyst/Desktop/Build\_WRF/CMAQ-5.2.1/lib/x86\_64/gcc7.3.0/netcdf/lib/libnetcdf.a does not exist in your CMAQ\_LIB directorysource config\_cmaq.csh gcc 7.3.0! Check your installation before proceeding with CMAQ build.

I’ll appreciate your further help. Thanks.

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [April 5, 2019, 7:23pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/7 "2019-04-05T19:23:29Z")

</div>

Did you follow the I/O API installation instructions, from the I/O API manual?

See [https://cjcoats.github.io/ioapi/AVAIL.html#build](https://cjcoats.github.io/ioapi/AVAIL.html#build)

What you probably want is BIN=Linux2\_x86\_64gfort

Carlie J. Coats, Jr., Ph.D. I/O API Author/Maintainer  
Senior Software Engineer cjcoats@email.unc.edu  
UNC Institute for the Environment www.ie.unc.edu  
100 Europa Dr., Suite 490 / Campus Box 1105 Tel 919.843.5951  
Chapel Hill, NC 27599-1105 Fax 919.966.9920

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [April 6, 2019, 8:28am UTC](https://forum.cmascenter.org/t/bcon-compilation/494/8 "2019-04-06T08:28:03Z")

</div>

Below is what I got:

Makefile:95: home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/ioapi/Makeinclude.Linux2\_x86\_64gfort: No such file or directory  
make: \*\*\* No rule to make target ‘home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/ioapi/Makeinclude.Linux2\_x86\_64gfort’. Stop.

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [April 30, 2019, 12:37pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/9 "2019-04-30T12:37:59Z")

</div>

Hello Lizadams,  
This is what I got:  
catalyst-Precision-Tower-3620:~/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/ioapi% make  
cd /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort; ar rsv libioapi.a m3utilio.o modgctp.o modwrfio.o modmpasfio.o modatts3.o modncfio.o modpdata.o  
/bin/sh: 1: cd: can’t cd to /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort  
r - m3utilio.o  
r - modgctp.o  
r - modwrfio.o  
r - modmpasfio.o  
r - modatts3.o  
r - modncfio.o  
r - modpdata.o  
cd /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort; ar rsv libioapi.a bilin.o bmatvec.o chkbuf3.o ckdesc3.o ckfile3.o ckgeom.o ckname.o crtbuf3.o currstep.o dble2real.o dbllist.o dmatvec.o dscgrid.o dt2str.o filchk3.o find1.o find2.o find3.o find4.o findc.o findr1.o findr2.o findr3.o findr4.o flush3.o gcd.o gctp.o getdble.o getmenu.o getnum.o getreal.o getstr.o getyn.o grdchk3.o gridops.o hhmmss.o index1.o initblk3.o intg2real.o intlist.o ioparms3.o lambert.o lblank.o len2.o ll2utm.o locat1.o locat2.o locat3.o locat4.o locatc.o locatr1.o locatr2.o locatr3.o locatr4.o lustr.o m3warn.o name2fid.o pcoef.o pgrdsum.o pmatvec.o poly.o promptdfile.o promptffile.o promptgrid.o promptmfile.o rdbndary.o rdbuf3.o rdcustom.o rdgrdded.o readsmet.o realist.o scanint.o setsphere.o sec2time.o str2dble.o skipl.o smatvec.o splitline.o str2int.o str2real.o strlist.o synchtao.o time2sec.o trimlen.o ungridb.o ungridi.o upcase.o utm2ll.o wrbndary.o wrbuf3.o wrcustom.o wrgrdded.o xtbuf3.o year4.o chkfil3.o cktflag3.o crdict3.o crtkf.o kfindx.o kfopen.o m3abort.o modgctp.o opnlist3.o rddict3.o rdiddata.o rdsmatrx.o runspec.o sync3.o wrdict3.o wriddata.o wrsmatrx.o xtract3.o  
/bin/sh: 1: cd: can’t cd to /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort  
r - bilin.o  
r - bmatvec.o  
r - chkbuf3.o  
r - ckdesc3.o  
r - ckfile3.o  
r - ckgeom.o  
r - ckname.o  
r - crtbuf3.o  
r - currstep.o  
r - dble2real.o  
r - dbllist.o  
r - dmatvec.o  
r - dscgrid.o  
r - dt2str.o  
r - filchk3.o  
r - find1.o  
r - find2.o  
r - find3.o  
r - find4.o  
r - findc.o  
r - findr1.o  
r - findr2.o  
r - findr3.o  
r - findr4.o  
r - flush3.o  
r - gcd.o  
r - gctp.o  
r - getdble.o  
r - getmenu.o  
r - getnum.o  
r - getreal.o  
r - getstr.o  
r - getyn.o  
r - grdchk3.o  
r - gridops.o  
r - hhmmss.o  
r - index1.o  
r - initblk3.o  
r - intg2real.o  
r - intlist.o  
r - ioparms3.o  
r - lambert.o  
r - lblank.o  
r - len2.o  
r - ll2utm.o  
r - locat1.o  
r - locat2.o  
r - locat3.o  
r - locat4.o  
r - locatc.o  
r - locatr1.o  
r - locatr2.o  
r - locatr3.o  
r - locatr4.o  
r - lustr.o  
r - m3warn.o  
r - name2fid.o  
r - pcoef.o  
r - pgrdsum.o  
r - pmatvec.o  
r - poly.o  
r - promptdfile.o  
r - promptffile.o  
r - promptgrid.o  
r - promptmfile.o  
r - rdbndary.o  
r - rdbuf3.o  
r - rdcustom.o  
r - rdgrdded.o  
r - readsmet.o  
r - realist.o  
r - scanint.o  
r - setsphere.o  
r - sec2time.o  
r - str2dble.o  
r - skipl.o  
r - smatvec.o  
r - splitline.o  
r - str2int.o  
r - str2real.o  
r - strlist.o  
r - synchtao.o  
r - time2sec.o  
r - trimlen.o  
r - ungridb.o  
r - ungridi.o  
r - upcase.o  
r - utm2ll.o  
r - wrbndary.o  
r - wrbuf3.o  
r - wrcustom.o  
r - wrgrdded.o  
r - xtbuf3.o  
r - year4.o  
r - chkfil3.o  
r - cktflag3.o  
r - crdict3.o  
r - crtkf.o  
r - kfindx.o  
r - kfopen.o  
r - m3abort.o  
r - modgctp.o  
r - opnlist3.o  
r - rddict3.o  
r - rdiddata.o  
r - rdsmatrx.o  
r - runspec.o  
r - sync3.o  
r - wrdict3.o  
r - wriddata.o  
r - wrsmatrx.o  
r - xtract3.o  
cd /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort; ar rsv libioapi.a cbarnes1.o cbarnesN.o check3.o crlf.o currec.o daymon.o ddtvar3.o ddtvar3v.o getdate.o getdfile.o getefile.o getffile.o initlog3.o interp3.o isdstime.o jstep3.o julian.o junit.o m3err.o m3exit.o m3msg2.o mmddyy.o nextime.o read3.o read4d.o secsdiff.o wkday.o write3.o write4d.o yr2day.o close3.o crtfil3.o desc3.o init3.o inqatt3.o kfread.o kfwrite.o open3.o opnfil3.o opnkf.o opnlog3.o pn\_crtfil3.o pn\_opnfil3.o pn\_wrvars.o rdatt3.o rdgrnest.o rdprofil.o rdtflag.o rdvars.o shut3.o syncfid.o wratt3.o wrgrnest.o wrmpigrd.o wrpatch.o wrprofil.o wrtflag.o wrvars.o  
/bin/sh: 1: cd: can’t cd to /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort  
r - cbarnes1.o  
r - cbarnesN.o  
r - check3.o  
r - crlf.o  
r - currec.o  
r - daymon.o  
r - ddtvar3.o  
r - ddtvar3v.o  
r - getdate.o  
r - getdfile.o  
r - getefile.o  
r - getffile.o  
r - initlog3.o  
r - interp3.o  
r - isdstime.o  
r - jstep3.o  
r - julian.o  
r - junit.o  
r - m3err.o  
r - m3exit.o  
r - m3msg2.o  
r - mmddyy.o  
r - nextime.o  
r - read3.o  
r - read4d.o  
r - secsdiff.o  
r - wkday.o  
r - write3.o  
r - write4d.o  
r - yr2day.o  
r - close3.o  
r - crtfil3.o  
r - desc3.o  
r - init3.o  
r - inqatt3.o  
r - kfread.o  
r - kfwrite.o  
r - open3.o  
r - opnfil3.o  
r - opnkf.o  
r - opnlog3.o  
r - pn\_crtfil3.o  
r - pn\_opnfil3.o  
r - pn\_wrvars.o  
r - rdatt3.o  
r - rdgrnest.o  
r - rdprofil.o  
r - rdtflag.o  
r - rdvars.o  
r - shut3.o  
r - syncfid.o  
r - wratt3.o  
r - wrgrnest.o  
r - wrmpigrd.o  
r - wrpatch.o  
r - wrprofil.o  
r - wrtflag.o  
r - wrvars.o  
cd /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort; ar rsv libioapi.a bufint3.o check3c.o close3c.o currstepc.o daymonc.o ddtvar3c.o desc3c.o dscgridc.o dt2strc.o envgets.o filchk3c.o findsc.o get\_endian.o getdfilec.o getdttime.o getefilec.o hhmmssc.o init3c.o inqatt3c.o interp3c.o iobin3.o julianc.o locatsc.o m3errc.o m3exitc.o m3mesgc.o m3warnc.o mmddyyc.o nameval.o nextimec.o open3c.o rdatt3c.o read3c.o read4dc.o rmfile.o sec2timec.o secsdiffc.o shut3c.o sleep3.o sortic.o sortir.o sortis.o sync3c.o systemf.o time2secc.o wkdayc.o wratt3c.o write3c.o write4dc.o xtract3c.o iocpl.o iocplf2c.o  
/bin/sh: 1: cd: can’t cd to /home/catalyst/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort  
r - bufint3.o  
r - check3c.o  
r - close3c.o  
r - currstepc.o  
r - daymonc.o  
r - ddtvar3c.o  
r - desc3c.o  
r - dscgridc.o  
r - dt2strc.o  
r - envgets.o  
r - filchk3c.o  
r - findsc.o  
r - get\_endian.o  
r - getdfilec.o  
r - getdttime.o  
r - getefilec.o  
r - hhmmssc.o  
r - init3c.o  
r - inqatt3c.o  
r - interp3c.o  
r - iobin3.o  
r - julianc.o  
r - locatsc.o  
r - m3errc.o  
r - m3exitc.o  
r - m3mesgc.o  
r - m3warnc.o  
r - mmddyyc.o  
r - nameval.o  
r - nextimec.o  
r - open3c.o  
r - rdatt3c.o  
r - read3c.o  
r - read4dc.o  
r - rmfile.o  
r - sec2timec.o  
r - secsdiffc.o  
r - shut3c.o  
r - sleep3.o  
r - sortic.o  
r - sortir.o  
r - sortis.o  
r - sync3c.o  
r - systemf.o  
r - time2secc.o  
r - wkdayc.o  
r - wratt3c.o  
r - write3c.o  
r - write4dc.o  
r - xtract3c.o  
r - iocpl.o  
r - iocplf2c.o  
catalyst-Precision-Tower-3620:~/Desktop/Build\_WRF/LIBRARIES/ioapi-3.2/ioapi%

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [April 30, 2019, 2:40pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/10 "2019-04-30T14:40:50Z")

</div>

> [@Catalyst2682](#):
>
> Linux2\_x86\_64gfort

In the README.txt that comes with the ioapi version 3.2, is step 4 to make the directory where the executable files will be created.

```auto
mkdir $BASEDIR/$BIN

```

I believe that you missed this step, and that is why you are getting the following message:

```auto
/bin/sh: 1: cd: can’t cd to /home/catalyst/Desktop/Build_WRF/LIBRARIES/ioapi-3.2/Linux2_x86_64gfort

```

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [April 30, 2019, 2:46pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/11 "2019-04-30T14:46:15Z")

</div>

Thanks for your response. The whole procedure is confusing. Can you please summarize the steps for me? Thanks a lot.

---

<div class="post-metadata">

**Author:** ![Catalyst2682](https://avatars.discourse-cdn.com/v4/letter/c/a6a055/32.png) [@Catalyst2682](https://forum.cmascenter.org/u/Catalyst2682)\
**Post date:** [April 30, 2019, 6:33pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/12 "2019-04-30T18:33:01Z")

</div>

Hello lizadams,  
Thanks a lot, I’ve been able to install ioapi and CMAQ as well. However, I’m still having issues with MCIP compilation. Below is what I got:

make[1]: Entering directory ‘/home/catalyst/Desktop/Build\_WRF/CMAQ-5.2/PREP/mcip/src’  
make[1]: ‘const\_mod.o’ is up to date.  
make[1]: ‘const\_pbl\_mod.o’ is up to date.  
make[1]: ‘coord\_mod.o’ is up to date.  
make[1]: ‘date\_time\_mod.o’ is up to date.  
make[1]: ‘date\_pack\_mod.o’ is up to date.  
make[1]: ‘files\_mod.o’ is up to date.  
make[1]: ‘groutcom\_mod.o’ is up to date.  
make[1]: ‘luvars\_mod.o’ is up to date.  
gfortran -ffree-form -ffree-line-length-none -funroll-loops -finit-character=32 -I/home/catalyst/Desktop/Build\_WRF/CMAQ-5.2/lib/x86\_64/gcc7.3.0/netcdf/include -I/home/catalyst/Desktop/Build\_WRF/CMAQ-5.2/lib/x86\_64/gcc7.3.0/ioapi/include -c mcipparm\_mod.f90  
mcipparm\_mod.f90:126:6:

USE m3utilio, ONLY: mxdesc3  
1  
Fatal Error: Can’t open module file ‘m3utilio.mod’ for reading at (1): No such file or directory  
compilation terminated.  
Makefile:136: recipe for target ‘mcipparm\_mod.o’ failed  
make[1]: \*\*\* [mcipparm\_mod.o] Error 1  
make[1]: Leaving directory ‘/home/catalyst/Desktop/Build\_WRF/CMAQ-5.2/PREP/mcip/src’  
Makefile:127: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

Kindly help me out. Thanks.

Catalyst

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [April 30, 2019, 7:07pm UTC](https://forum.cmascenter.org/t/bcon-compilation/494/14 "2019-04-30T19:07:05Z")

</div>

Please verify the location of the m3utilio.mod file. Once you have found it’s location use that path in your Makefile, after the -I  
for instance, my version is available here:

```auto
ls /proj/ie/proj/staff/lizadams/ioapi-3.2/Linux3_x86_64_openmpi_3.0.0_gcc_6.3.0/*.mod
/proj/ie/proj/staff/lizadams/ioapi-3.2/Linux3_x86_64_openmpi_3.0.0_gcc_6.3.0/m3utilio.mod

```

for example I used the following setting in my Makefile

```auto
NETCDF = /proj/ie/proj/staff/lizadams/netcdf-c-4.6.2-rc2/openmpi_3.0.0_gcc_6.3.0
IOAPI_ROOT = /proj/ie/proj/staff/lizadams/ioapi-3.2/Linux3_x86_64_openmpi_3.0.0_gcc_6.3.0
FFLAGS = -m64 -O3 -I$(NETCDF)/include -I$(IOAPI_ROOT)

```
