Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

wrf-chem compilation error with kpp

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

fipoucat

Member
Hi there,

I am facing, since weeks now, a problem compiling wrf-chem with kpp on osx with gfortran and gcc. I can compile with success without kpp but with kpp many warning are generated with error as shown below.

25 warnings generated.
flex scan.l
make[1]: *** [lex.yy.c] Error 1


Can someone give a hint/solution to solve this URGENT problem?
 
All warnings:
compile kpp
/Users/fipou/work/Build_WRF/LIBS/ycc/bin/yacc -d scan.y
gcc -O -c y.tab.c
scan.y:96:4: warning: implicit declaration of function 'CmdJacobian' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdJacobian( yystack.l_mark[0].str );
^
scan.y:99:4: warning: implicit declaration of function 'CmdHessian' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdHessian( yystack.l_mark[0].str );
^
scan.y:102:4: warning: implicit declaration of function 'CmdStoicmat' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdStoicmat( yystack.l_mark[0].str );
^
scan.y:105:4: warning: implicit declaration of function 'CmdDouble' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdDouble( yystack.l_mark[0].str );
^
scan.y:108:4: warning: implicit declaration of function 'CmdReorder' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdReorder( yystack.l_mark[0].str );
^
scan.y:111:4: warning: implicit declaration of function 'CmdMex' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdMex( yystack.l_mark[0].str );
^
scan.y:114:4: warning: implicit declaration of function 'CmdDummyindex' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdDummyindex( yystack.l_mark[0].str );
^
scan.y:117:4: warning: implicit declaration of function 'CmdEqntags' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdEqntags( yystack.l_mark[0].str );
^
scan.y:120:4: warning: implicit declaration of function 'CmdFunction' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdFunction( yystack.l_mark[0].str );
^
scan.y:123:4: warning: implicit declaration of function 'CmdStochastic' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdStochastic( yystack.l_mark[0].str );
^
scan.y:154:4: warning: implicit declaration of function 'CheckAll' is invalid in C99
[-Wimplicit-function-declaration]
{ CheckAll(); }
^
scan.y:156:4: warning: implicit declaration of function 'LookAtAll' is invalid in C99
[-Wimplicit-function-declaration]
{ LookAtAll(); }
^
scan.y:158:4: warning: implicit declaration of function 'TransportAll' is invalid in C99
[-Wimplicit-function-declaration]
{ TransportAll(); }
^
scan.y:168:4: warning: implicit declaration of function 'CmdUse' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdUse( yystack.l_mark[0].str ); }
^
scan.y:170:4: warning: implicit declaration of function 'CmdLanguage' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdLanguage( yystack.l_mark[0].str ); }
^
scan.y:172:4: warning: implicit declaration of function 'DefineInitializeNbr' is invalid in C99
[-Wimplicit-function-declaration]
{ DefineInitializeNbr( yystack.l_mark[0].str ); }
^
scan.y:174:4: warning: implicit declaration of function 'DefineXGrid' is invalid in C99
[-Wimplicit-function-declaration]
{ DefineXGrid( yystack.l_mark[0].str ); }
^
scan.y:176:4: warning: implicit declaration of function 'DefineYGrid' is invalid in C99
[-Wimplicit-function-declaration]
{ DefineYGrid( yystack.l_mark[0].str ); }
^
scan.y:178:4: warning: implicit declaration of function 'DefineZGrid' is invalid in C99
[-Wimplicit-function-declaration]
{ DefineZGrid( yystack.l_mark[0].str ); }
^
scan.y:187:4: warning: implicit declaration of function 'CmdIntegrator' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdIntegrator( yystack.l_mark[0].str ); }
^
scan.y:189:4: warning: implicit declaration of function 'CmdDriver' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdDriver( yystack.l_mark[0].str ); }
^
scan.y:191:4: warning: implicit declaration of function 'CmdRun' is invalid in C99
[-Wimplicit-function-declaration]
{ CmdRun( yystack.l_mark[0].str ); }
^
scan.y:195:4: warning: implicit declaration of function 'SparseData' is invalid in C99
[-Wimplicit-function-declaration]
{ SparseData( yystack.l_mark[0].str );
^
scan.y:198:4: warning: implicit declaration of function 'WRFConform' is invalid in C99
[-Wimplicit-function-declaration]
{ WRFConform();
^
scan.y:251:4: warning: implicit declaration of function 'AddUseFile' is invalid in C99
[-Wimplicit-function-declaration]
{ AddUseFile( yystack.l_mark[0].str );
^
25 warnings generated.
flex scan.l
make[1]: *** [lex.yy.c] Error 1
 
Any chance you are using old compilers and an old version of WRF-CHEM?

There have been others using GFORTRAN that have gotten errors compiling parts of WRF.
 
I am also facing the same kind of problem when trying to compile WRF chem with fortran and gcc compiler supported with netcdf with several warnings and errors such as the above. in addition to that I am also getting the below makefile error.

make -i -r comp
make[1]: Entering directory '/home/ganesh/WRF/WRFV4/chem/KPP/util/write_decomp'
Makefile:50: warning: overriding recipe for target '.F.o'
../../../../configure.wrf:342: warning: ignoring old recipe for target '.F.o'
Makefile:58: warning: overriding recipe for target '.c.o'
../../../../configure.wrf:371: warning: ignoring old recipe for target '.c.o'
make[1]: Leaving directory '/home/ganesh/WRF/WRFV4/chem/KPP/util/write_decomp'
Makefile:21: recipe for target 'all' failed
make: *** [all] Error 2
tuv_kpp: Argument = LAST

ERROR: variable name for third body in KPP species file is expected to be M, but was not found in cbm4 species file.

I am attaching my compile log here.

Kindly help me in this regard
 

Attachments

  • compile.log
    2.2 MB · Views: 68
Hi, have you solved this problem yet?
I have met the same problem: I got many warnings though i could get the *.exe.
 
Top