Page tree
Skip to end of metadata
Go to start of metadata

For collaborators and new members


Our models are mostly based on standard Linux tools, so if you use Ubuntu (or other Linux) you should have most of the tools by default. In some cases you need to install extra packages using package manager (or Ubuntu Software Central, whichever you prefer to use).

Ubuntu is the easiest option for beginners.



INstall gfortran compiler and make


Windows

Windows is the most complicated option, and needs some extra work.

Cygwin

Installing the Cygwin shell gives most of the Linux tools for Windows, and with a careful setup it is possible to run our models on Windows, too. A real Windows expert might be able to set up our models even without the Cygwin environment, but this has not been tried so far.

1. Download the resource file for 32-bit (setup-x86.exe) or 64-bit (setup-x86_64.exe) Windows in: http://www.cygwin.com/install.html

2. Double click setup-x86.exe or setup-x86_64.exe.

3. Install cygwin:
--> (1) Install from Internet
--> (2) select a root directory, I recommend to use the default one; All Users.
--> (3) Select where to store the installation files, which is not the root directory. I recommend to use the default one. If the directory does not exist, click 'yes' to create it.
--> (4) Direct Connection
--> (5) Select a site, the speed depends on your location. Using the first one is a good option.
--> (6) Select packages to install, leave it as default now and click 'Next'.
--> (7) 'Next'
--> (8) Wait installation.
--> (9) At least select 'Create icon on Desktop' to make life easier.
--> (10) Finish.

4. Install Fortran compiler:
--> (1) Click the setup file again.
--> (2) Follow the steps shown in 3 until (5).
--> (3) In 'Select package' window, search gcc-fortran, click 'Devel', then click 'Skip' before 'gcc-fortran: GNU Compiler Collection (Fortran).
--> (4) Next --> Next --> Finish.

5. Install make.
--> (1) Similar to 4, now search 'make', and 'Devel', then click 'Skip' before "make: The GNU version of the 'make' utility".
--> (2) Next --> Next --> Finish.

6. Install other packages you need. For example, the text editor 'vim'.

7. Double click 'Cygwin.bat' in the root directory, you will get a command line window. Try to type 'gfortran.exe' and return to make sure the command is installed. You should know that here you are in the directory of 'root directory/home/Administrator/'. Put all the Fortran files here to compile and run.


Eclipse

Go to here to download current version of Eclipse for Fortran: http://www.eclipse.org/downloads/packages/eclipse-parallel-application-developers/neon2


Mac

If you use Mac, we recommend first installing the Homebrew package manager. After that things will mostly be almost as easy as with Ubuntu. (Ubuntu package selection is wider, so in some cases Homebrew may not have a package, so a manual install is then the only option.)

Usually 'make' is already installed as a default.

Gfortran binaries

Download the Apple-style installer (https://gcc.gnu.org/wiki/GFortranBinaries) and follow the instructions in read-me file.

Eclipse

Go to here to download current version of Eclipse for Fortran: http://www.eclipse.org/downloads/packages/eclipse-parallel-application-developers/neon2


Linux

Usually you already have everything.


TIPs to debug kpp


1. All the lines read in from input files to KPP can be checked by printing out yyvsp before switch (yyn) in src/y.tab.c. Then you can know which line has problem.

2. If you want to deal with very long reaction coefficient rate, change in src/scan.y:

%union{
   char str[80];
};

to:

%union{
   char str[500];
};

or other numbers you want instead of 500.

Then

$ make distclean

$ make

This will define YYTYPE as a union with str[500] in the generated file src/y.tab.c.

3. Always check if those kpp files contain illegal special characters, e.g. '^M'. 





  • No labels