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

Warning when running build_mechanism.sh script in KPP #2345

Open
jinlx opened this issue Jun 22, 2024 · 4 comments
Open

Warning when running build_mechanism.sh script in KPP #2345

jinlx opened this issue Jun 22, 2024 · 4 comments
Assignees
Labels
category: Bug Something isn't working topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms

Comments

@jinlx
Copy link

jinlx commented Jun 22, 2024

Your name

Lixu Jin

Your affiliation

University of Montana

What happened? What did you expect to happen?

I was trying to update the chemstry in /KPP/custom/custom.eqn. However, I got an warning when run the build_mechanism.sh script (./build_mechanism.sh custom). I wonder if the warning will influence any model outputs.

This is KPP-3.0.2.

KPP is parsing the equation file.
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 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 driver from none.F90:
    - gckpp_Main
KPP is starting the code post-processing.

KPP has successfully created the model "gckpp".

sed: warning: failed to get security context of gckpp_Rates.F90: Operation not supportedReactivity consists of 195 reactions
Written to gckpp_Util.F90

What are the steps to reproduce the bug?

To reproduce the bug, you need to modifty custom.eqn for ISOP chemsitry. For example, here, I changed the

ISOP + OH = LISOPOH + IHOO1:                      GC_ISO1(1.7d-11, 3.90d2, 9.33d-2, 5.05d15, -1.22d4, 1.79d14, -8.830d3);    

into

ISOP + OH = 0.96LISOPOH + 0.96IHOO1 + 0.04FURA:   GC_ISO1(1.7d-11, 3.90d2, 9.33d-2, 5.05d15, -1.22d4, 1.79d14, -8.830d3);

Please attach any relevant configuration and log files.

No response

What GEOS-Chem version were you using?

14.3.2

What environment were you running GEOS-Chem on?

Local cluster

What compiler and version were you using?

[email protected]

Will you be addressing this bug yourself?

Yes, but I will need some help

@jinlx jinlx added the category: Bug Something isn't working label Jun 22, 2024
@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

Thanks @jinlx, and good to see you at IGC11.

I think the issue may be in the construction of the OH reactivity diagnostic, which is done by the OHreact_parser.py. It looks like it might be a permission issue in trying to overwrite the gckpp_Rates.F90 file.

I made the same modification to the .eqn file as you did, and then used KPP 3.1.1 to build the solver code:

This is KPP-3.1.1.

KPP is parsing the equation file.
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 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 driver from none.F90:
    - gckpp_Main
KPP is starting the code post-processing.

KPP has successfully created the model "gckpp".

Reactivity consists of 188 reactions
Written to gckpp_Util.F90

One thing to do is to make sure the files generated by KPP have write permissions (o+w).

@jinlx
Copy link
Author

jinlx commented Jun 26, 2024

Thanks Bob! You are right that not all KPP generatured files have write permissions for others but only for users. Any way to fix it or would such warning influence the model results except for the OH rectivity?

Just want to bring up another thing I found which might (or not) be helpful. The warning only happens when I changed specific reactions on my side (i.e., isoprene chemistry). When I simply added new reactions, the mechanism is built successfully by KPP. Any potential hints from it to resolve issues?

Here goes my custom chemistry files if it helps narrow down the issue.

Best,
Lixu
custom.zip

-rw-r--rw- 1 lj152920 GeneralUsers  12240 2024-06-26 15:42 gckpp.log
-rw-r--r-- 1 lj152920 GeneralUsers 418441 2024-06-26 15:42 gckpp_Function.F90
-rw-r--r-- 1 lj152920 GeneralUsers   3949 2024-06-26 15:42 gckpp_Global.F90
-rw-r--r-- 1 lj152920 GeneralUsers   1922 2024-06-26 15:42 gckpp_Initialize.F90
-rw-r--r-- 1 lj152920 GeneralUsers  94960 2024-06-26 15:42 gckpp_Integrator.F90
-rw-r--r-- 1 lj152920 GeneralUsers 633866 2024-06-26 15:42 gckpp_Jacobian.F90
-rw-r--r-- 1 lj152920 GeneralUsers  67972 2024-06-26 15:42 gckpp_JacobianSP.F90
-rw-r--r-- 1 lj152920 GeneralUsers 243304 2024-06-26 15:42 gckpp_LinearAlgebra.F90
-rw-r--r-- 1 lj152920 GeneralUsers    439 2024-06-26 15:42 gckpp_Model.F90
-rw-r--r-- 1 lj152920 GeneralUsers 131327 2024-06-26 15:42 gckpp_Monitor.F90
-rw-r--r-- 1 lj152920 GeneralUsers  15358 2024-06-26 15:42 gckpp_Parameters.F90
-rw-r--r-- 1 lj152920 GeneralUsers    421 2024-06-26 15:42 gckpp_Precision.F90
-rw-r--r-- 1 lj152920 GeneralUsers  62427 2024-06-26 15:42 gckpp_Rates.F90
-rw-r--r-- 1 lj152920 GeneralUsers  26625 2024-06-26 15:42 gckpp_Util.F90

@yantosca
Copy link
Contributor

Thanks @jinlx. I think this may be a system issue on your end. The directory seems to be owned by GeneralUsers. I think this is a user group. You can check to see if you are part of that group with

$ groups

which will print a list of user groups.

On my system the directory listing lists the user name and the group, e.g.:

-rw-r--r--. 1 ryantosca jacob_lab   4827 2024-06-25 17:28 CHANGELOG_fullchem.md
-rwxr-xr-x. 1 ryantosca jacob_lab   2193 2024-06-25 17:28 CMakeLists.txt*
-rw-r--r--. 1 ryantosca jacob_lab  10063 2024-06-25 17:28 commonIncludeVars.H
-rw-r--r--. 1 ryantosca jacob_lab  12037 2024-06-25 17:28 fullchem_AutoReduceFuncs.F90
-rw-r--r--. 1 ryantosca jacob_lab 164043 2024-06-25 17:28 fullchem.eqn
-rw-r--r--. 1 ryantosca jacob_lab  26593 2024-06-25 17:28 fullchem_HetStateFuncs.F90
-rw-r--r--. 1 ryantosca jacob_lab   2534 2024-06-25 17:28 fullchem.kpp
-rw-r--r--. 1 ryantosca jacob_lab 134699 2024-06-25 17:28 fullchem_RateLawFuncs.F90
-rw-r--r--. 1 ryantosca jacob_lab 140152 2024-06-25 17:28 fullchem_SulfurChemFuncs.F90
-rw-r--r--. 1 ryantosca jacob_lab 403545 2024-06-25 17:28 gckpp_Function.F90
-rw-r--r--. 1 ryantosca jacob_lab   3949 2024-06-25 17:28 gckpp_Global.F90
-rw-r--r--. 1 ryantosca jacob_lab   1872 2024-06-25 17:28 gckpp_Initialize.F90
-rw-r--r--. 1 ryantosca jacob_lab  94960 2024-06-25 17:28 gckpp_Integrator.F90
-rw-r--r--. 1 ryantosca jacob_lab 609232 2024-06-25 17:28 gckpp_Jacobian.F90
-rw-r--r--. 1 ryantosca jacob_lab  65300 2024-06-25 17:28 gckpp_JacobianSP.F90
lrwxrwxrwx. 1 ryantosca jacob_lab     12 2024-06-25 17:28 gckpp.kpp -> fullchem.kpp
-rw-r--r--. 1 ryantosca jacob_lab 234804 2024-06-25 17:28 gckpp_LinearAlgebra.F90
-rw-r--r--. 1 ryantosca jacob_lab    439 2024-06-25 17:28 gckpp_Model.F90
-rw-r--r--. 1 ryantosca jacob_lab 127470 2024-06-25 17:28 gckpp_Monitor.F90
-rw-r--r--. 1 ryantosca jacob_lab  14482 2024-06-25 17:28 gckpp_Parameters.F90
-rw-r--r--. 1 ryantosca jacob_lab    421 2024-06-25 17:28 gckpp_Precision.F90
-rw-r--r--. 1 ryantosca jacob_lab  61330 2024-06-25 17:28 gckpp_Rates.F90
-rw-r--r--. 1 ryantosca jacob_lab  25602 2024-06-25 17:28 gckpp_Util.F90
-rw-r--r--. 1 ryantosca jacob_lab  18864 2024-06-25 17:28 rateLawUtilFuncs.F90
-rw-r--r--. 1 ryantosca jacob_lab   2017 2024-06-25 17:28 README.md
lrwxrwxrwx. 1 ryantosca jacob_lab     42 2024-06-25 17:28 stub_aciduptake_DustChemFuncs.F90 -> ../stubs/stub_aciduptake_DustChemFuncs.F90
lrwxrwxrwx. 1 ryantosca jacob_lab     30 2024-06-25 17:28 stub_carbon_Funcs.F90 -> ../stubs/stub_carbon_Funcs.F90
lrwxrwxrwx. 1 ryantosca jacob_lab     34 2024-06-25 17:28 stub_Hg_HetStateFuncs.F90 -> ../stubs/stub_Hg_HetStateFuncs.F90

You can ask your sysadmin to be added to GeneralUsers if you are not part of that group.

@jinlx
Copy link
Author

jinlx commented Jun 27, 2024

Hi Bob, I've confirmed that I'm in the GeneralUsers group, but it seems there's still an issue. Could you please quickly check if the mechanism I shared works on your system? I'm trying to see if the error stems from changes in specific reactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: Bug Something isn't working topic: Chemical Mechanisms Related to KPP and/or GEOS-Chem chemistry mechanisms
Projects
None yet
Development

No branches or pull requests

2 participants