Hello,
I have
GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) compiler. Using this compiler, I successfully installed and compiled Netcdf4.7.4 and IOPAI3.2.
When I am trying to use ‘gfortran’ compiler for the SMOKE installation by following section12.4 of UserGuide,
I get the following error:
0=1 -DFLDMN=1 -DFSTR_L=int -DIOAPI_NO_STDOUT=1 -DNEED_ARGS=1 -DIOAPI_NCF4=1 -c /home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/emmod/modgrdlib.f
cd /home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/…/Linux2_x86_64gfort; ar rv libemmod.a modar2pt.o modbeis3.o modbiog.o modcntrl.o moddayhr.o modelev.o modemfac.o modgrid.o modinfo.o modlists.o modmbset.o modmerge.o modmet.o modmobil.o modmvsmrg.o modrepbn.o modreprt.o modsourc.o modspro.o modstcy.o modsurg.o modtag.o modtmprl.o modxref.o modgrdlib.o
ar: creating libemmod.a
a - modar2pt.o
a - modbeis3.o
a - modbiog.o
a - modcntrl.o
a - moddayhr.o
a - modelev.o
a - modemfac.o
a - modgrid.o
a - modinfo.o
a - modlists.o
a - modmbset.o
a - modmerge.o
a - modmet.o
a - modmobil.o
a - modmvsmrg.o
a - modrepbn.o
a - modreprt.o
a - modsourc.o
a - modspro.o
a - modstcy.o
a - modsurg.o
a - modtag.o
a - modtmprl.o
a - modxref.o
a - modgrdlib.o
cd /home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/…/Linux2_x86_64gfort; gfortran -I/home/IqbalHossan/Documents/soft/SMOKE/subsys/ioapi/ioapi/fixed_src -I/home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/inc -I/home/IqbalHossan/Documents/soft/SMOKE/subsys/ioapi/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 -DNEED_ARGS=1 -DIOAPI_NCF4=1 -c /home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/emmod/modxref.f
cd /home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/…/Linux2_x86_64gfort; gfortran -I/home/IqbalHossan/Documents/soft/SMOKE/subsys/ioapi/ioapi/fixed_src -I/home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/inc -I/home/IqbalHossan/Documents/soft/SMOKE/subsys/ioapi/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 -DNEED_ARGS=1 -DIOAPI_NCF4=1 -c /home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/lib/alocatbl.f
PARMS3.EXT:104.80:
Included at /home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/lib/alocatbl.f:49:
There was a typo that crept into one of the released “fixed_src/PARMS3.EXT” versions (this should be fixed on any of the current releases); remove that trailing ampersand at the end of line 104 to fix it.
[The ISO Fortran Standard specifies two source formats (informally called “fixed” or .f and "free or .f90), together with a spec for how to write codes legal for both versions. The I/O API does this; unfortunately, both CMAQ and SMOKE use a non-Standard “fixed-132” format which cannot be made compatible with the two Standard-specified formats. The ioapi/fixed_src/ directory contains hacked INCLUDE-files for this non-Standard format, and in this case, an accident happened during the hacking.]
Error: Return type mismatch of function ‘is_ag’ at (1) (INTEGER(4)/LOGICAL(4))
/home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/biog/normbeis361.f:693.36:
IF (IS_AG( M, MODIS12 , MODIS14, NLCD81,
1
Error: IF clause at (1) requires a scalar LOGICAL expression
/home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/biog/normbeis361.f:163.30:
INTEGER :: IS_AG, IS_TAG
1
Error: Return type mismatch of function ‘is_tag’ at (1) (INTEGER(4)/LOGICAL(4))
/home/IqbalHossan/Documents/soft/SMOKE/subsys/smoke/src/biog/normbeis361.f:719.40:
IF( IS_TAG (M,MODIS14) ) THEN
1
Error: IF clause at (1) requires a scalar LOGICAL expression
make: *** [normbeis361.o] Error 1
I thought this one was fixed, too: IS_AG and IS_TAG should be declared of type LOGICAL.
The gfortran compiler catches this; the PGI and Intel compilers let you get away with it (and “do the right thing” anyway).
Then I removed ‘&’ sign from line 104, and then installation was successful, But when I tried to run test case , I got the error https://forum.cmascenter.org/t/error-smoke-v-4-7-installation-using-pgi-compiler/2184/8:
[IqbalHossan@adeq logs]$ grep ERROR *
elevpoint.point.nctox.log: ERROR: input file not found: PNTS
elevpoint.point.nctox.log: *** ERROR ABORT in subroutine ELEVPOINT
grdmat.area.nctox.us12-nc.log: ERROR: input file not found: AREA
So, I couldn’t solve the problem. That’s why I am trying with gfortran compiler.
Here, it’s gfortran not accepting something that is Standard-conforming Fortran. Replace the double parentheses by single parentheses, e.g., & (',', PROF_MON( S,NP ), NP = 1,12 )
I have installed it successfully. No Error messages this time while compiling:
Then I ran test cases, and the LOG files errors are below:
[IqbalHossan@adeq logs]$ grep ERROR *
smkinven.area.nctox.log: Value for SMK_MAXERROR: 100
smkinven.nonroad.nctox.log: Value for SMK_MAXERROR: 100
smkinven.point.nctox.log: Value for SMK_MAXERROR: 100
smkinven.rateperdistance.nctox.log: Value for SMK_MAXERROR: 900000
smkinven.rateperhour.nctox.log: Value for SMK_MAXERROR: 900000
smkinven.rateperprofile.nctox.log: Value for SMK_MAXERROR: 900000
smkinven.ratepervehicle.nctox.log: Value for SMK_MAXERROR: 900000
spcmat.area.nctox.cmaq_cb05_soa.log: Value for SMK_MAXERROR: 100
spcmat.area.nctox.cmaq_cb05_soa.log: Value for DEFAULT_CONV_FAC_ERROR not defined;returning default: FALSE
spcmat.nonroad.nctox.cmaq_cb05_soa.log: Value for SMK_MAXERROR: 100
spcmat.nonroad.nctox.cmaq_cb05_soa.log: Value for DEFAULT_CONV_FAC_ERROR not defined;returning default: FALSE
spcmat.nonroad.nctox.cmaq_cb05_soa.log: Value for SMK_MAXERROR: 100
spcmat.point.nctox.cmaq_cb05_soa.log: Value for SMK_MAXERROR: 100
spcmat.point.nctox.cmaq_cb05_soa.log: Value for DEFAULT_CONV_FAC_ERROR not defined;returning default: FALSE
temporal.area.nctox.20050710.log: Value for SMK_MAXERROR: 100
temporal.nonroad.nctox.20050710.log: Value for SMK_MAXERROR: 100
temporal.point.nctox.20050710.log: Value for SMK_MAXERROR: 100
temporal.rateperdistance.nctox.20050710.us12-nc.log: Value for SMK_MAXERROR: 900000
temporal.rateperhour.nctox.20050710.us12-nc.log: Value for SMK_MAXERROR: 900000
When I check following script:
[IqbalHossan@adeq install]$ ./check_smk_install
Differences between your installation and correct answers exist!
Please refer to file $SMKROOT/doc/install_diffs.txt for details.
Does it mean that SMOKE has successfully compiled using GCC?
One more question:
My other tools (CAMx, AMET, COMBINE, hr2day, etc.) were compiled , ran, and produced results using PGI compiler. Now, If I modify emissions using SMOKE with GCC compiler, and use the output of SMOKE as input to CAMx for a modified run (and subsequent tools), would that be an issue?