Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when compile kpp with ./build_mechanism.sh fullchem (already installed kpp) #2343

Open
LiHui94 opened this issue Jun 21, 2024 · 4 comments
Assignees
Labels
category: Debug Help Request for assistance debugging GEOS-Chem topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms

Comments

@LiHui94
Copy link

LiHui94 commented Jun 21, 2024

Your name

Hui Li

Your affiliation

Tsinghua University

Please provide a clear and concise description of your question or discussion topic.

Hi, I am working on the kpp compiling in Fullchem (GEOS-Chem v1.4.1.1), while encountering the error below.

$ ./build_mechanism.sh fullchem

This is KPP-3.1.0.

KPP is parsing the equation file.fullchem.kpp
KPP is computing Jacobian sparsity structure.
KPP is starting the code generation.
KPP is initializing the code generation.
KPP is generating the monitor data:
    - gckpp_Monitor
KPP is generating the utility data:
    - gckpp_Util
KPP is generating the global declarations:
    - gckpp_Main
KPP is generating the ODE function:
    - gckpp_Function
KPP is generating the ODE Jacobian:
    - gckpp_Jacobian
    - gckpp_JacobianSP
KPP is generating the linear algebra routines:
    - gckpp_LinearAlgebra
KPP is generating the Hessian:
    - gckpp_Hessian
    - gckpp_HessianSP
KPP is generating the utility functions:
    - gckpp_Util
KPP is generating the rate laws:
    - gckpp_Rates
KPP is generating the parameters:
    - gckpp_Parameters
KPP is generating the global data:
    - gckpp_Global
KPP is generating the sparsity data:
    - gckpp_JacobianSP
    - gckpp_HessianSP
KPP is generating the stoichiometric description files:
    - gckpp_Stoichiom
    - gckpp_StoichiomSP
KPP is generating the driver from none.f90:
    - gckpp_Main
Fatal error : /public/home/lihui/GCClassic-14.1.1/kpp/int/none.f: Can't read file
Program aborted
KPP failed to build 'gckpp_Rates.F90'! Aborting.

I have already installed kpp (v3.1), as shown below:

$ make
gcc -g -Wall -Wno-unused-function -I/usr/include -c code.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c code_c.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c code_f77.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c code_f90.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c code_matlab.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c debug.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c gen.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c kpp.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c lex.yy.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c scanner.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c scanutil.c
gcc -g -Wall -Wno-unused-function -I/usr/include -c y.tab.c
gcc -g -Wall -Wno-unused-function code.o code_c.o code_f77.o code_f90.o code_matlab.o debug.o gen.o kpp.o lex.yy.o scanner.o scanutil.o y.tab.o -L/home/lihui/GCClassic-14.1.1/kpp/lib/ -lfl -o kpp
@LiHui94 LiHui94 added the category: Question Further information is requested label Jun 21, 2024
@LiHui94
Copy link
Author

LiHui94 commented Jun 21, 2024

Sorry, the version of GEOS-Chem is v14.1.1

@yantosca yantosca self-assigned this Jun 24, 2024
@yantosca yantosca added the topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms label Jun 24, 2024
@yantosca
Copy link
Contributor

Hi @LiHui94, thanks for writing and thanks for your patience. Most of us were at the IGC11 meeting earlier this month.

It looks like you may have installed the KPP 3.1.0 code into the GEOS-Chem/KPP/ folder. This may be causing some conflicts. Try cloning the KPP code into a separate folder from your GEOS-Chem source code. Then you can define the KPP_HOME environment variable to point to the KPP folder as described in the KPP installation instructions. I think by keeping the KPP source code out of the GEOS-Chem source code you should not run into this issue. Please let me know if this works.

@yantosca yantosca added category: Debug Help Request for assistance debugging GEOS-Chem and removed category: Question Further information is requested labels Jun 24, 2024
@LiHui94
Copy link
Author

LiHui94 commented Jun 25, 2024

Thanks for your reply, I have recompiled kpp out of GC14.1.1, but the same error still exists. Details are shown below.

recompile kpp out of GC
error

@yantosca
Copy link
Contributor

@LiHui94: It looks like the KPP code is looking for the int/none.f file. This was removed in KPP 3.1.0. Also check to see if there are any #INTEGRATOR none statements in your KPP files. There shouldn't be but perhaps there are some older files in your KPP path.

You might want to try again with a fresh GEOS-Chem source code folder, in case there is anything left behind from when you had the KPP code in the GEOS-Chem/KPP folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Debug Help Request for assistance debugging GEOS-Chem topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms
Projects
None yet
Development

No branches or pull requests

2 participants