# Compiling SMOKE for UNIX

**URL:** <https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854>\
**Category:** SMOKE\
**Created:** [October 21, 2020, 9:50am UTC](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854 "2020-10-21T09:50:04Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![farzad-faghihi](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@farzad-faghihi](https://forum.cmascenter.org/u/farzad-faghihi)\
**Post date:** [November 4, 2020, 1:35pm UTC](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854/22 "2020-11-04T13:35:34Z")

</div>

@cjcoats.  
$ `make`  
cd /home/farzad/SMK\_HOME/subsys/smoke/src/…/Linux2\_x86\_64gfort; mpif90 -I/home/farzad/LIBRARIES/ioapi-3.2/ioapi/fixed\_src -I/home/farzad/SMK\_HOME/subsys/smoke/src/inc -I/home/farzad/LIBRARIES/ioapi-3.2/Linux2\_x86\_64gfort -ffixed-line-length-132 -fno-backslash -O3 -ffast-math -funroll-loops -m64 -DAUTO\_ARRAYS=1 -DF90=1 -DFLDMN=1 -DFSTR\_L=int -DIOAPI\_NO\_STDOUT=1 -c /home/farzad/SMK\_HOME/subsys/smoke/src/lib/alocatbl.f  
PARMS3.EXT:104:80:

Error: Expected an initialization expression at (1)  
make: \*\*\* [Makefile:349: alocatbl.o] Error 1

---

<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:** [November 4, 2020, 1:58pm UTC](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854/23 "2020-11-04T13:58:35Z")

</div>

See [https://cjcoats.github.io/ioapi/AVAIL.html#cmaq](https://cjcoats.github.io/ioapi/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-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.

---

<div class="post-metadata">

**Author:** ![farzad-faghihi](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@farzad-faghihi](https://forum.cmascenter.org/u/farzad-faghihi)\
**Post date:** [November 4, 2020, 2:05pm UTC](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854/24 "2020-11-04T14:05:43Z")

</div>

@cjcoats.  
: ~/LIBRARIES/ioapi-3.2/ioapi$ `make fixed_src`  
make: Nothing to be done for ‘fixed\_src’.

---

<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:** [November 4, 2020, 2:10pm UTC](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854/25 "2020-11-04T14:10:24Z")

</div>

So that says _ioapi/fixed\_src_ is built already: so use the `INCLUDE` files from it.

---

<div class="post-metadata">

**Author:** ![farzad-faghihi](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@farzad-faghihi](https://forum.cmascenter.org/u/farzad-faghihi)\
**Post date:** [November 4, 2020, 2:23pm UTC](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854/26 "2020-11-04T14:23:19Z")

</div>

@cjcoats.  
What do you mean so use the `INCLUDE` files from it.?  
I should not change anythings in makefile or makeinclude?

---

<div class="post-metadata">

**Author:** ![ardastan](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@ardastan](https://forum.cmascenter.org/u/ardastan)\
**Post date:** [November 6, 2020, 7:56pm UTC](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854/27 "2020-11-06T19:56:42Z")

</div>

Hi,  
Thanks for opening up this issue.  
I had also the same problem for compiling SMOKE on ubuntu with gfortran compiler, and after trying many things, I came across something rather unusual.

The problem, as the error suggests, goes to ioapi so-called pre-compiled file PARMS3.EXT in `${IODIR}/fixed_src` which I guess it’s just a typo. Although it was suggested that DO NOT EDIT the file, I edited the file at Line 104, Col 80 which has a “`&`”. I just deleted this ampersand and saved the file and tried to compile SMOKE again, and it magically worked!

@cjcoats, would you please let us know if it is either a typo or another incompatibility of gfortran?!

[Previous page](https://forum.cmascenter.org/t/compiling-smoke-for-unix/1854.md?page=1)
