Bldit_cctm.csh error

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

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

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

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.

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! :slight_smile:

Best,
Xiangyu

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

Thank you so much! :grinning: