# CMAQ5.2 CCTM compile error

**URL:** <https://forum.cmascenter.org/t/cmaq5-2-cctm-compile-error/970>\
**Category:** Compiling\
**Created:** [September 24, 2019, 2:24pm UTC](https://forum.cmascenter.org/t/cmaq5-2-cctm-compile-error/970 "2019-09-24T14:24:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jliu](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jliu](https://forum.cmascenter.org/u/jliu)\
**Post date:** [September 24, 2019, 2:25pm UTC](https://forum.cmascenter.org/t/cmaq5-2-cctm-compile-error/970/1 "2019-09-24T14:25:00Z")

</div>

Hi All,  
The BCON, ICON and MCIP run ok, but the CCTM still has some problems.  
Below is the errors, please give me the suggestion if you know that or you have met similar errors.  
Thanks!!

"  
mpif90 -c -ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32 -O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -I /kwork/JLIU/Build\_WRF/CMAQ52/lib/x86\_64/gcc/ioapi/modules -I /kwork/JLIU/Build\_WRF/CMAQ52/lib/x86\_64/gcc/ioapi/include\_files/fixed\_src -I /kwork/JLIU/Build\_WRF/CMAQ52/lib/x86\_64/gcc/mpi -I. pinterpb.f  
STATE3.EXT:174.27:  
Included at pinterpb.f:133:

```
    COMMON / BSTATE3 / &
                       1

```

Error: Syntax error in COMMON statement at (1)  
STATE3.EXT:191.27:  
Included at pinterpb.f:133:

```
    COMMON / CSTATE3 / &
                       1

```

Error: Syntax error in COMMON statement at (1)  
make: \*\*\* [pinterpb.o] Error 1  
**ERROR** while running make command

else if ( 0 ) then  
endif  
mv Makefile Makefile.gcc  
if ( -e Makefile.gcc && -e Makefile ) rm Makefile  
ln -s Makefile.gcc Makefile  
if ( 0 != 0 ) then  
if ( -e /kwork/JLIU/Build\_WRF/CMAQ52/CCTM/scripts/BLD\_CCTM\_v52\_gcc/CCTM\_v52.cfg ) then  
mv CCTM\_v52.cfg.bld /kwork/JLIU/Build\_WRF/CMAQ52/CCTM/scripts/BLD\_CCTM\_v52\_gcc/CCTM\_v52.cfg  
exit  
"

---

<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:** [September 24, 2019, 10:04pm UTC](https://forum.cmascenter.org/t/cmaq5-2-cctm-compile-error/970/2 "2019-09-24T22:04:23Z")

</div>

As has been documented in the I/O APUI build-instructiuons [https://cjcoats.github.io/ioapi/AVAIL.html#cmaq](https://cjcoats.github.io/ioapi/AVAIL.html#cmaq) and has been repeated elsewhere on this forum: 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-app[roved “both-form” format for its Fortran `INCLUDE` files.

> Some of the models—in particular, CMAQ and SMOKE however, do not—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.
