Compiling SMOKE for UNIX

@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

See 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.

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

So that says ioapi/fixed_src is built already: so use the INCLUDE files from it.

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

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

1 Like