# Bldit\_cctm.csh error

**URL:** <https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660>\
**Category:** Compiling\
**Created:** [July 20, 2020, 5:37pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660 "2020-07-20T17:37:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiangyu](https://avatars.discourse-cdn.com/v4/letter/x/90db22/32.png) [@xiangyu](https://forum.cmascenter.org/u/xiangyu)\
**Post date:** [July 20, 2020, 5:37pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660/1 "2020-07-20T17:37:16Z")

</div>

Hi CMAQ users,

I met a problem when tried to compile the CCTM by runing “./bldit\_cctm.csh intel |& tee bldit.log”. The error message is as follows:

/CMAQv5.3.1/lib/x86\_64/intel/ioapi/include\_files/STATE3.EXT(174): **error #5082:** Syntax error, found ‘&’ when expecting one of:   
COMMON / BSTATE3 /  
CMAQv5.3.1/lib/x86\_64/intel/ioapi/include\_files/STATE3.EXT(175): error #5082: Syntax error, found ‘&’ when expecting one of: // /   
& P\_ALP3, P\_BET3, P\_GAM3,  
/CMAQv5.3.1/lib/x86\_64/intel/ioapi/include\_files/STATE3.EXT(176): error #5082: Syntax error, found ‘&’ when expecting one of: // /   
& XCENT3, YCENT3, XORIG3, YORIG3, XCELL3, YCELL3, &  
…  
compilation aborted for pshut3.F (code 1)  
make: \*\*\* [pshut3.o] Error 1  
**ERROR** while running make command

I am not allowed to upload my log file since I am a new user. But I can provide more detailed information if needed. I would appreciate if you can provide suggestions on this issue!

Thank you in advance,  
Best,  
Xiangyu

---

<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:** [July 20, 2020, 5:43pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660/2 "2020-07-20T17:43:37Z")

</div>

See [https://www.cmascenter.org/ioapi/documentation/all\_versions/html/AVAIL.html#cmaq](https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#cmaq):

> According to the ISO Fortran Standard, there are two “source formats” for Fortran source code – the older ( `f77` ) “fixed” format with code in columns 7-72 and continuation markers in column 6, and the ( `f90` ) “free” format, with source in columns 1-132 and ampersand (“&”) for trailing continuation markers, as well as a specification for code which is acceptable to both forms.
> 
> Since it is used by various models that use “free” format, the I/O API carefully follows the Standard in this regard, and uses the ISO-approved “both-form” format for its Fortran `INCLUDE` files.
> 
> Some of the models—in particular, CMAQ and SMOKE however, do not conform to the Standar—instead using a “fixed-132” format. The I/O API Makefile has a way of dealing with this; the commands
> 
> > _cd /ioapi_  
> > _make fixed\_src_
> 
> will create a new directory _ioapi/fixed\_src_ and populate it with copies of the `INCLUDE` files that have been edited to work with the non-Standard “fixed-132” format. You will need to use these `INCLUDE` files with CMAQ and SMOKE.

---

<div class="post-metadata">

**Author:** ![xiangyu](https://avatars.discourse-cdn.com/v4/letter/x/90db22/32.png) [@xiangyu](https://forum.cmascenter.org/u/xiangyu)\
**Post date:** [July 20, 2020, 6:36pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660/3 "2020-07-20T18:36:49Z")

</div>

Great! Thanks very much for your help! For those who had similar problem as I had, Here is what I did:

copy all the \ ***EXT** files from **[ioapi\_installation\_directory]/ioapi/fixed\_scr** to directory **[ioapi\_installation\_directory]/ioapi**, then re-compile CCTM, then the error is gone.

Best,  
Xiangyu

---

<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:** [July 20, 2020, 6:46pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660/4 "2020-07-20T18:46:14Z")

</div>

That will have the effect of breaking any attempt at re-building _libioapi.a_, e.g., after an update (e.g., after _git pull -a_). What you should instead do is to change the build-system (edit the _Makefile_, if nothing else) to put _[ioapi\_installation\_directory]/ioapi/fixed\_src_ on the INCLUDE-path in your compiler-flags.

---

<div class="post-metadata">

**Author:** ![xiangyu](https://avatars.discourse-cdn.com/v4/letter/x/90db22/32.png) [@xiangyu](https://forum.cmascenter.org/u/xiangyu)\
**Post date:** [July 20, 2020, 8:21pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660/5 "2020-07-20T20:21:33Z")

</div>

Thanks very much for the suggestions! I am not sure if I understand you correctly, but here is what I did.

Instead of copying \*EXT file to **[ioapi\_installation\_directory]/ioapi**, I edited the “ **config\_cmaq.csh** ” file by changing the INCLUDE path from “ **setenv IOAPI\_INCL\_DIR /ioapi-3.2/ioapi** ” to “ **setenv IOAPI\_INCL\_DIR /ioapi-3.2/ioapi/fixed\_src** ”.

This also works. But please correct me if I am wrong again. Thank you! 🙂

Best,  
Xiangyu

---

<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:** [July 20, 2020, 8:58pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660/6 "2020-07-20T20:58:57Z")

</div>

That’s exactly it! You’ve got it.

---

<div class="post-metadata">

**Author:** ![xiangyu](https://avatars.discourse-cdn.com/v4/letter/x/90db22/32.png) [@xiangyu](https://forum.cmascenter.org/u/xiangyu)\
**Post date:** [July 20, 2020, 9:07pm UTC](https://forum.cmascenter.org/t/bldit-cctm-csh-error/1660/7 "2020-07-20T21:07:17Z")

</div>

Thank you so much! 😀
