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

Fatal error : kppfile.tmp: Can't read file #108

Open
lmc5474 opened this issue Jul 18, 2024 · 2 comments
Open

Fatal error : kppfile.tmp: Can't read file #108

lmc5474 opened this issue Jul 18, 2024 · 2 comments
Labels
bug Something isn't working mechanisms Related to chemical mechanisms

Comments

@lmc5474
Copy link

lmc5474 commented Jul 18, 2024

Bug Report
Description
When using the example provided with kpp for testing, running cd example followed by the kpp ros.kpp command results in the error Fatal error: kppfile.tmp: Can't read file. This error is caused by the missing kppfile.tmp file. Creating a new kppfile.tmp file in the folder allows the command to run, but the result is incorrect. For example, the generated small_strato_Integrator.f90 file does not contain any code.

Steps to Reproduce
Steps to reproduce the behavior:

Clone or download the kpp repository.
Navigate to the example directory: cd example.
Run the command: kpp ros.kpp.
Observe the error message: Fatal error: kppfile.tmp: Can't read file.
Expected Behavior
kpp should run normally and generate the correct output files.

Actual Behavior
The missing kppfile.tmp file causes an error. Creating a new kppfile.tmp file in the folder allows kpp to run, but the generated small_strato_Integrator.f90 file does not contain any code, resulting in an incorrect output.

Screenshots
image

Environment

Operating System:Centos7
kpp Version: 3.1.1
Additional Information
Creating a new kppfile.tmp file allows kpp to run, but the generated small_strato_Integrator.f90 file does not contain any code, resulting in incorrect output.

@lmc5474 lmc5474 added the question Further information is requested label Jul 18, 2024
@yantosca
Copy link
Contributor

Thanks for writing @lmc5474. I did the same steps on an Ubuntu instance but I didn't run into this problem.

[EAS-RYANTOSCA2A examples]$ cd ../src
[EAS-RYANTOSCA2A src]$ make distclean
[EAS-RYANTOSCA2A src]$ 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
flex -olex.yy.c scan.l
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/usr/lib/x86_64-linux-gnu -lfl -o kpp
[EAS-RYANTOSCA2A src]$ cd ../examples/
[EAS-RYANTOSCA2A examples]$ kpp ros.kpp

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:
    - ros_Monitor
KPP is generating the utility data:
    - ros_Util
KPP is generating the global declarations:
    - ros_Main
KPP is generating the ODE function:
    - ros_Function
KPP is generating the ODE Jacobian:
    - ros_Jacobian
    - ros_JacobianSP
KPP is generating the linear algebra routines:
    - ros_LinearAlgebra
KPP is generating the Hessian:
    - ros_Hessian
    - ros_HessianSP
KPP is generating the utility functions:
    - ros_Util
KPP is generating the rate laws:
    - ros_Rates
KPP is generating the parameters:
    - ros_Parameters
KPP is generating the global data:
    - ros_Global
    - ros_Global
KPP is generating the stoichiometric description files:
    - ros_Stoichiom
    - ros_StoichiomSP
KPP is generating the driver from general.f90:
    - ros_Main
KPP is starting the code post-processing.

KPP has successfully created the model "ros".

[EAS-RYANTOSCA2A examples]$
[EAS-RYANTOSCA2A examples]$  ./ros.exe
   0.0%. T=0.432E+05  O1D= 0.9906E+02; O= 0.6624E+09; O3= 0.5326E+12; NO= 0.8725E+09; NO2= 0.2240E+09; O2= 0.1697E+17;
   0.3%. T=0.441E+05  O1D= 0.9965E+02; O= 0.6715E+09; O3= 0.5377E+12; NO= 0.9433E+09; NO2= 0.1532E+09; O2= 0.1697E+17;
   0.7%. T=0.450E+05  O1D= 0.1006E+03; O= 0.6776E+09; O3= 0.5427E+12; NO= 0.9425E+09; NO2= 0.1540E+09; O2= 0.1697E+17;
   1.0%. T=0.459E+05  O1D= 0.1015E+03; O= 0.6836E+09; O3= 0.5477E+12; NO= 0.9417E+09; NO2= 0.1548E+09; O2= 0.1697E+17;
   1.4%. T=0.468E+05  O1D= 0.1023E+03; O= 0.6890E+09; O3= 0.5526E+12; NO= 0.9409E+09; NO2= 0.1556E+09; O2= 0.1697E+17;
   1.7%. T=0.477E+05  O1D= 0.1029E+03; O= 0.6937E+09; O3= 0.5575E+12; NO= 0.9399E+09; NO2= 0.1566E+09; O2= 0.1697E+17;
   2.1%. T=0.486E+05  O1D= 0.1034E+03; O= 0.6973E+09; O3= 0.5623E+12; NO= 0.9389E+09; NO2= 0.1576E+09; O2= 0.1697E+17;
   2.4%. T=0.495E+05  O1D= 0.1035E+03; O= 0.6991E+09; O3= 0.5669E+12; NO= 0.9376E+09; NO2= 0.1589E+09; O2= 0.1697E+17;
   2.8%. T=0.504E+05  O1D= 0.1033E+03; O= 0.6987E+09; O3= 0.5715E+12; NO= 0.9360E+09; NO2= 0.1605E+09; O2= 0.1697E+17;
   3.1%. T=0.513E+05  O1D= 0.1025E+03; O= 0.6953E+09; O3= 0.5759E+12; NO= 0.9341E+09; NO2= 0.1624E+09; O2= 0.1697E+17;
   3.5%. T=0.522E+05  O1D= 0.1011E+03; O= 0.6883E+09; O3= 0.5800E+12; NO= 0.9317E+09; NO2= 0.1648E+09; O2= 0.1697E+17;
   3.8%. T=0.531E+05  O1D= 0.9892E+02; O= 0.6768E+09; O3= 0.5839E+12; NO= 0.9286E+09; NO2= 0.1679E+09; O2= 0.1697E+17;
   4.2%. T=0.540E+05  O1D= 0.9583E+02; O= 0.6602E+09; O3= 0.5875E+12; NO= 0.9248E+09; NO2= 0.1717E+09; O2= 0.1697E+17;
...
  97.9%. T=0.297E+06  O1D= 0.1370E+03; O= 0.9213E+09; O3= 0.7451E+12; NO= 0.9144E+09; NO2= 0.1821E+09; O2= 0.1697E+17;
  98.3%. T=0.298E+06  O1D= 0.1381E+03; O= 0.9278E+09; O3= 0.7479E+12; NO= 0.9145E+09; NO2= 0.1820E+09; O2= 0.1697E+17;
  98.6%. T=0.299E+06  O1D= 0.1389E+03; O= 0.9330E+09; O3= 0.7507E+12; NO= 0.9144E+09; NO2= 0.1821E+09; O2= 0.1697E+17;
  99.0%. T=0.300E+06  O1D= 0.1396E+03; O= 0.9372E+09; O3= 0.7535E+12; NO= 0.9142E+09; NO2= 0.1823E+09; O2= 0.1697E+17;
  99.3%. T=0.301E+06  O1D= 0.1401E+03; O= 0.9409E+09; O3= 0.7562E+12; NO= 0.9139E+09; NO2= 0.1826E+09; O2= 0.1697E+17;
  99.7%. T=0.302E+06  O1D= 0.1406E+03; O= 0.9443E+09; O3= 0.7589E+12; NO= 0.9136E+09; NO2= 0.1829E+09; O2= 0.1697E+17;
 100.0%. T=0.302E+06  O1D= 0.1411E+03; O= 0.9476E+09; O3= 0.7616E+12; NO= 0.9133E+09; NO2= 0.1832E+09; O2= 0.1697E+17;
[EAS-RYANTOSCA2A examples]$

My compiler is:

[EAS-RYANTOSCA2A examples]$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Which compiler version were you using?

@yantosca yantosca added bug Something isn't working mechanisms Related to chemical mechanisms and removed question Further information is requested labels Jul 18, 2024
@RolfSander
Copy link
Contributor

I've seen this error message before on a virtual machine which did not
have enough memory (RAM). I suggest to increase the memory of the VM and
try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mechanisms Related to chemical mechanisms
Projects
None yet
Development

No branches or pull requests

3 participants