This is the KPP – The Kinetic PreProcessor with some small modifications as we use it at the Atmospheric Modelling Group at the University of Helsinki.
Along the lines of the original readme
, to build KPP on Ubuntu (I
have Ubuntu 13.10), you need:
-
flex (install Ubuntu package: flex)
-
bison (install Ubuntu package: bison)
-
libfl.a
is located at/usr/lib/x86_64-linux-gnu/libfl.a
(if not, uselocate libfl.a
to find it). I already added this path toMakefile.defs
so you need to do nothing about this. -
Add something like this to your
.bashrc
export KPP_HOME=$HOME/kpp-helsinki PATH=$PATH:$KPP_HOME/bin
-
Then (here in the project main directory) run
make
. Now you should have the KPP executablebin/kpp
.
- This should compile on a recent Ubuntu without any edits needed
- Increase MAX_EQN 400 to 10000, MAX_SPECIES 500 to 2000
- Optimization flags to
Makefile.defs
- Remove some unnecessary files (*.out, *.mod etc.) left by the original developers (by accident, I assume)
(This README.md is written with Markdown syntax.)
Here are step-by-step instructions to install KPP on Ubuntu Linux.
-
Run these commands to install some prerequisities:
sudo apt-get install flex sudo apt-get install bison sudo apt-get install git
You might have some of them already installed, but running the install command again is not harmful, it will just tell you that the package is already installed, and then do nothing.
-
Next,
mkdir kpp-helsinki cd kpp-helsinki git clone https://github.com/samposm/kpp-helsinki.git .
Note the dot at the end of the third line. At the first and second line, you can also create a new directory with some other name, if you like.
-
Next,
make
This will produce a lot of output. If the last line is something like
make[1]: Leaving directory ...
then this is a success. If it contains some kind of error messages, then something is wrong. -
Edit the file
.bashrc
in your home directory, and add the linesexport KPP_HOME=$HOME/kpp-helsinki PATH=$PATH:$KPP_HOME/bin
(Assuming you used the name
kpp-helsinki
for the directory in step 2, and assuming you created thekpp-helsinki
directly under your home directory. Otherwise, modify the first line accordingly.) -
Finally, close the shell, and open a new one. Now you can try to run
kpp
but without any input files, you will just get an error message:
Fatal error : Usage : kpp <equations file> [output file] Program aborted
Increase buffer sizes for longer reaction rate strings, and longer
chemical names.
Ref. http://www.cs.helsinki.fi/u/ssmoland/physics/michael/ditte/1/
But the char str[80];
could be fixed in scan.y
not in y.tab.*
.