Rewrote instructions for compiling Cantera

These instructions reflect the adoption of SCons as the build system
for Cantera on all platforms.
This commit is contained in:
Ray Speth 2012-02-13 23:24:29 +00:00
parent 3ca1eb819e
commit 76c54f4546
8 changed files with 557 additions and 413 deletions

View file

@ -1,27 +1,22 @@
/**
\mainpage Cantera Reference
\mainpage Cantera Reference
Choose one of the links below for an introduction to %Cantera, or use
the menu at the top to view detailed documentation of the code.
-
- \subpage languages
- Building and Installing %Cantera
- \subpage cantera-build
- \subpage cantera-winbuild
- Working with %Cantera in MATLAB
- \subpage matlab-tutorial
- Working with %Cantera in C++
- \subpage start
- \subpage cxx-ctnew
- Computing Properties of Matter
- \subpage thermopage
- \subpage transportpage
<p>Choose one of the links below for an introduction to %Cantera, or use
the menu at the top to view detailed documentation of the code.
</p>
<ul>
<li>\subpage languages</li>
<li>\subpage cantera-build</li>
<li>Working with %Cantera in MATLAB</li>
<ul><li>\subpage matlab-tutorial</li></ul>
<li>Working with %Cantera in C++</li>
<ul><li>\subpage start</li>
<li> \subpage cxx-ctnew</li>
</ul>
<li>Computing Properties of Matter</li>
<ul><li>\subpage thermopage</li>
<li>\subpage transportpage</li>
</ul>
</ul>
*/

View file

@ -623,7 +623,7 @@ INPUT_ENCODING = UTF-8
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
FILE_PATTERNS = *.h *.cpp
FILE_PATTERNS = *.h *.cpp *.txt
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.

View file

@ -1,105 +1,187 @@
/**
\page cantera-build Building Cantera on a Unix, Linux, or Mac OS X Platform
\page cantera-build Cantera Compilation Guide
\section ctbuild-sysreq System Requirements
This guide contains instructions for compiling Cantera on the following operating systems:
Cantera can be built on most unix or unix-like platforms. Before you start, you'll need:
- Linux
- Ubuntu 10.04 LTS (Lucid Lynx) or newer
- Debian 5.0 (Lenny) or newer
- Windows Vista or Windows 7 (32-bit or 64-bit versions)
- [planned] OS X 10.6 (Snow Leopard) or newer
- \b Python. Most systems already have some version of Python
installed. (Try typing "python" in a shell window.) If you don't
have it, or your version is older than Python 2.0, you can get the
latest version at http://www.python.org. Python is used in the build
process, and to process input files, so it is needed even if you
plan to use Cantera only from C++, MATLAB, or Fortran.
\section prereqs Installation Prerequisites
- \b numarray. If you \e do want to use Cantera from Python, or if you
want to run the graphical MixMaster application, you'll also need to
install the numarray package, which may be obtained at
http://sourceforge.net/projects/numpy .
Note that numarray is now superceded by "numpy", but Cantera hasn't yet been
updated to use numpy. Be sure to get the "old" numarray. Once you have
downloaded it, upack the tar file. In most cases, all that is required to
build numarray is to type "python setup.py install" from within the directory
where you have unpacked the numarray source code
\see \ref installnumarray .
- <b>The GNU "make" program</b>. Most systems have this, but on some it might
be called "gmake" instead of "make". (On these systems "make" may refer to a
similar but non-compatible program.)
- <b>A C/C++ compiler</b>. Virtually any reasonably recent compiler
should work. The GNU gcc/g++ compiler, available free for many
platforms, works fine.
- Optional software:
- <b>Sundials</b>. Sundials is a numerical software package for solving complex
non-linear systems of differential and/or algebraic equations. If you have it,
%Cantera will use it; if not, it will use an older, pre-sundials version of the
ODE solver, and some other capabilities will not be supported (e.g.
sensitivity analysis). It is recommended that you install sundials if
possible. All you need to do is go to the sundials web site
(www.llnl.gov/casc/sundials), download the software, and build it. To build
it, just go into the directory where you have unpacked the source, type
"./configure", "make", then "make install".
- <b>MATLAB</b>. Only needed to if you plan to use Cantera from MATLAB.
To build the Cantera MATLAB Toolbox, your C/C++ compiler must be
compatible with the one used to compile MATLAB. In most cases this means
you need to use gcc/g++ version 3.x if you have MATLAB 7 (R14) and gcc/g++ 2.95 if you have MATLAB 6 (R13).
- <b>a Fortran 90/95 compiler</b>. Only needed if you plan to use Cantera
from Fortran 90/95.
.
- Note: On a Mac, you'll need to download the "XCode Tools" from Apple,
which includes the gcc/g++ compiler and other GNU tools.
.
\section ctbuild-proc Build Procedure
To build Cantera, follow these steps:
- Get the source code. Go to http://sourceforge.net/projects/cantera,
and download the latest source distribution, or check the source code out
using anonymous CVS. Using CVS is recommended, since this makes it much
easier to keep current.
- Unpack it, and go into the top-level directory named "cantera".
- Edit the file "configure" to set site-specific options. If you are
installing on a linux or Mac OS X platform using the GNU compilers,
you may not need to edit "configure" at all. Most of the options
also may be set by defining a suitable environment variable. This is
useful if you want to always use non-standard options, since you can
define the appropriate environment variables in your login script.
- Now run "configure" by typing:
\subsection Linux
- For Ubuntu or Debian users, the following packages should be
installed using your choice of package manager:
\verbatim
./configure
\endverbatim
or
g++ python scons libboost-all-dev libsundials-serial-dev subversion \endverbatim
- Building the python module also requires:
\verbatim
./configure --prefix=<installation_directory>
\endverbatim
This will generate the Makefiles that will be used to build Cantera.
By default, Cantera will be installed in /usr/local/cantera. If you
want to install it somewhere else, run the configure script with the
'prefix' option.
For example, to install Cantera in a directory called "cantera" in your
home directory, run the configure script like this:
python-dev python-numpy python-numpy-dev \endverbatim
- Building the Fortran interface also requires gfortran or another
supported Fortran compiler.
- Users of other distributions should install the equivalent
packages, which may have slightly different names.
\subsection Windows
There are a number of requirements for the versions of software to
install depending on which interfaces (Python, Matlab) you want to
build and what architecture (32-bit or 64-bit) you want to use.
- If you want to build the Python module, you must use the same
version of the Microsoft compiler as was used to compile Python. For
current versions of Python (2.6 and 2.7) this means that you must
use Visual Studio 2008 or the equivalent version of the Windows SDK
(see link below).
- The build process will produce a Python module compatible with the
version of Python used for the compilation. To generate different
modules for other versions of Python, you will need to install those
versions of Python and recompile.
- If you want to build the Matlab toolbox and you have a 64-bit copy
of Windows, by default you will be using a 64-bit copy of Matlab,
and therefore you need to compile Cantera in 64-bit mode. For
simplicity, it is highly recommended that you use a 64-bit version
of Python to handle this automatically.
- There is no 64-bit installer for SCons under Windows, so you will
need to download the ZIP version. After extracting it, start a
command prompt in the unzipped folder and run:
\verbatim
./configure --prefix=$HOME/cantera
\endverbatim
python setup.py install \endverbatim
- It is generally helpful to have SCons and Python in your PATH. This
can usually be accomplished by adding the top-level Python directory
(e.g. C:\Python27) to your PATH. This is acccessible from:
\verbatim
Control Panel > System and Security > System > Advanced System Settings > Environment Variables \endverbatim
- Type 'make' to compile Cantera.
\subsection osx OS X
Cantera's build system has not yet been tested on OS X.
- Type 'make install' to install it. You will need write access to the install directory for this step, which may require you to preface the command with "sudo".
\section download-cantera Download the Cantera source code
- To test the installation, type "make test".
\subsection download-posix Linux / OS X
- At this point, you should have a functional Cantera installation. To
try it out, go to the "demos" directory within the Cantera
installation directory, and try out some of the Python or MATLAB
demos.
- Option 1: Check out the code using Subversion:
\verbatim
svn checkout http://cantera.googlecode.com/svn/cantera/trunk/ cantera \endverbatim
- Option 2: Check out the code using Git:
\verbatim
git svn clone --std-layout http://cantera.googlecode.com/svn/cantera cantera \endverbatim
\subsection download-win Windows
Use your Subversion client to check out the code from:
\verbatim
http://cantera.googlecode.com/svn/cantera/trunk/ \endverbatim
\section cantera-config Determine configuration options
\subsection config-general General
- run \verbatim scons help \endverbatim to see a list all
configuration options for Cantera.
- If the prerequisites are installed in standard locations, the
default values should work.
- If you installed Sundials to a non-standard location (e.g. the
libraries arent in /usr/lib), you will need to specify the options:
\verbatim
sundials_include=/path/to/sundials/include
sundials_libdir=/path/to/sundials/lib \endverbatim
- If you want to build the Matlab toolbox and the Matlab executable is
not on your PATH, you should specify:
\verbatim
matlab_toolbox=y
matlab_cmd=/path/to/matlab \endverbatim
\see \ref configCantera
\subsection Windows
- In Windows there arent any proper default locations for many of the
packages that Cantera depends on, so you will need to specify these
paths explicitly.
- Remember to put double quotes around any paths with spaces in them,
e.g. "C:\Program Files".
- By default, SCons attempts to use the same architecture and version
of the Microsoft compiler as was used to compile Python, typically
Visual Studio 2008 or the equivalent version of the Windows SDK. If
you arent building the Python module, you can override this with
the configuration options target_arch and msvc_version.
- If youre building the Matlab toolbox, you need to specify the path
to the architecture-dependent Matlab executable. For example, if
youre building the 64-bit toolbox, the correct option will be
something like:
\verbatim
matlab_cmd="C:/Program Files/MATLAB/R2009a/bin/win64/MATLAB.exe" \endverbatim
\section compile-test Compile Cantera & Test
- Run scons with the list of desired configuration options, e.g.:
\verbatim
scons build debug=y optimize=n prefix=/opt/cantera \endverbatim
- If Cantera compiles successfully, you should see the message:
\verbatim
**************************************************************
Compiliation complete. Type '[sudo] scons install' to install.
************************************************************** \endverbatim
- If you do not see this message, check the output for errors to see
what went wrong.
- Cantera has a series of regression tests that can be run with the
command
\verbatim
scons test \endverbatim
- When the tests finish, you should see a summary indicating the
number of tests that passed and failed.
- If you have tests that fail, try looking at the following to
determine the source of the error:
- Messages printed to the console while running scons test
- Output files generated by the tests
\section software-sources Sources and versions of software used by Cantera:
You must have one of the following C++ compilers installed on your
system. A Fortran compiler is required only if you plan to use Cantera
from a Fortran program.
- GNU compilers (C/C++/Fortran)
- Known to work with version 4.6; Expected to work with version >= 4.3
- Intel compilers (C/C++/Fortran)
- Known to work with version 11.0; Expected to work with versions >= 11.0
- Microsoft compilers (C/C++)
- Windows SDK: http://www.microsoft.com/download/en/details.aspx?id=3138
This is equivalent to Visual Studio 2008. It is a free download.
- Known to work with version 9.0 (Visual Studio 2008) and version 10.0 (Visual Studio 2010).
- MinGW (C/C++/Fortran)
- Supported versions of MinGW be the same as the supported versions of GCC
Other Required software:
- Subversion
- For Windows: http://tortoisesvn.net/downloads.html
- Known to work with versions >= 1.6
- SCons:
- http://www.scons.org/download.php
- Known to work with SCons 2.1.0; Expected to work with versions >= 1.0.0
- Python: http://python.org/download/
- Known to work with 2.6 and 2.7; Expected to work with versions >= 2.5
- Does not yet work with 3.x
- Boost
- http://www.boost.org/users/download/
- Known to work with version 1.46; Expected to work with versions >= 1.40
Optional Programs
- Numpy
- Required to build the Cantera Python module.
- http://sourceforge.net/projects/numpy/
- Known to work with versions 1.3 and 1.5; Expected to work with version >= 1.1
- Matlab
- Required to build the Cantera Matlab toolbox.
- Known to work with 2009a, 2010a, and 2011b. Expected to work with versions >= 2009a.
- Sundials
- Required to enable some features such as sensitivity analysis.
- https://computation.llnl.gov/casc/sundials/download/download.html
- Known to work with version 2.4; Support for versions 2.3 and 2.2 is deprecated.
\see \ref cxx-ctnew

View file

@ -1,288 +1,14 @@
namespace cantera {
/**
\page configCantera Configuring Cantera
This document lists the options available for compiling Cantera with SCons.
Before you build %Cantera, it is necessary to configure it for your system.
This is done by running the 'preconfig' script.
In many cases, running the preconfig script as it comes "out of the box"
will do what you want. The default settings are set so that as much of
%Cantera will be built and installed as possible. For example, if
MATLAB is found on your system, then the MATLAB toolbox will be built,
if a working Fortran 90/95 compiler is found, then the Fortran 90/95
interface will be built, and so on.
But if you want to customize the build, you can do so. All you need to
do is edit the 'preconfig' script. Here we'll go over some of the options you can set.
\section installCantera Where to install Cantera
By default, %Cantera will be installed in /usr/local/cantera. All
Cantera-related files will be put here. If you want to install it somewhere
else (perhaps because you don't have write access to /usr/local/cantera),
all you need to do is run the preconfig script with the --prefix option:
These options may be seen by running the command
\verbatim
./preconfig --prefix=$HOME/cantera
\endverbatim
scons help \endverbatim
from the command prompt.
If preconfig is run as shown here, then %Cantera will be installed in a
directory named 'cantera' within your home directory.
If you'd rather not have to specify the prefix on the command line,
you can set it within the preconfig script itself, by setting the
value of <tt> CANTERA_CONFIG_PREFIX </tt>:
\verbatim
CANTERA_CONFIG_PREFIX=$HOME/cantera
\endverbatim
This is useful if you want to be able to build several different
versions of %Cantera -- perhaps a version with no optimization for debugging,
and another one with optimization turned on for speed. All you need to
do is to make 2 copies of the 'preconfig' script, say 'preconfig_debug'
and 'preconfig_opt'. In file 'preconfig_debug', you might set
\verbatim
CANTERA_CONFIG_PREFIX=$HOME/cantera_debug
\endverbatim
and in 'preconfig_opt' you might set
\verbatim
CANTERA_CONFIG_PREFIX=$HOME/cantera_optimized
\endverbatim
This way you can use one source distribution to build several different installations,
and keep them separate. But note that if you do this, be sure to run 'make clean'
before 'make' each time you have run a new 'preconfig' script, to force
everything to be built from scratch again.
\section langConfigure Language Interfaces
%Cantera has several programming language interfaces. Select the ones you want to build. The default is to try to build all language interfaces.
Python, in addition to being one of the supported language interfaces, is used internally
by Cantera, both in the build process and at run time (to process .cti input files).
Therefore, you need to have Python on your system; if you don't, first install it
from http://www.python.org before proceeding with the installation of %Cantera.
\verbatim
PYTHON_PACKAGE=${PYTHON_PACKAGE:="default"}
\endverbatim
If you plan to work in Python, or you want to use the graphical MixMaster application,
then you need the full %Cantera Python Package. If, on the other hand, you will only
use Cantera from some other language (e.g. MATLAB or Fortran 90/95) and only need
Python to process .cti files, then you only need a minimal subset of the
package (actually, only one file).
- PYTHON_PACKAGE Set PYTHON_PACKAGE to one of these three strings:
- full. Install everything needed to use Cantera from Python
- minimal Install only enough to process .cti files
- none Don't install or run any Python scripts during the build process
- default try to do a full installation, but fall back to a minimal one in case of errors
.
\verbatim
PYTHON_CMD=${PYTHON_CMD:="default"}
\endverbatim
%Cantera needs to know where to find the Python interpreter.
If PYTHON_CMD is set to "default", then the configuration process will look
for the Python Interpreter somewhere on your PATH, either as 'python2' or as 'python'.
If it is not on the PATH, or has a different name, set this to the full path to the
Python interpreter.
\verbatim
USE_NUMERIC=${USE_NUMERIC:="default"}
\endverbatim
The %Cantera Python full interface can be built with either the numarray
or Numeric packages. Set this to "y" to use Numeric, or anything else to use
numarray. Using numarray is preferred.
\verbatim
NUMARRAY_HOME=${NUMARRAY_HOME:="$HOME/python_modules"}
\endverbatim
If numarray was installed using the --home option, set this to the home
directory for numarray.
\verbatim
CANTERA_PYTHON_HOME=${CANTERA_PYTHON_HOME:="$HOME/python_modules"}
\endverbatim
If you want to install the %Cantera Python package somewhere other than
the default 'site-packages' directory within the Python library directory,
then set <tt> CANTERA_PYTHON_HOME </tt> to the desired directory.
This is useful when you do not have
write access to the Python library directory.
\verbatim
SET_PYTHON_SITE_PACKAGE_TOPDIR=${SET_PYTHON_SITE_PACKAGE_TOPDIR:="n"}
PYTHON_SITE_PACKAGE_TOPDIR=${PYTHON_SITE_PACKAGE_TOPDIR:="/usr/local"}
\endverbatim
Set <tt> SET_PYTHON_SITE_PACKAGE_TOPDIR </tt> to 'y'
when site packages must be put in system directories
but %Cantera tutorials must be put in the user space. An alternative to doing
this is to put everything in the user space by running this script with
the 'prefix' option, and defining the environment variable <tt>PYTHONPATH</tt>
to tell Python where to find the %Cantera package.
\subsection configMatlab MATLAB Configuration
\verbatim
BUILD_MATLAB_TOOLBOX=${BUILD_MATLAB_TOOLBOX:="default"}
\endverbatim
This variable controls whether the MATLAB toolbox will be built. It should be set to one of these strings:
- "default" the 'preconfig' script will try to build a simple
MATLAB MEX file. If this succeeds, BUILD_MATLAB_TOOLBOX will be
set to "y", otherwise it will be set to "n".
- "y" build the MATLAB toolbox.
- "n" do not build the MATLAB toolbox, even if MATLAB is installed.
Note that you may need to run 'mex -setup' within MATLAB to preconfigure
it for your C++ compiler before running this script.
\subsection configFortran90 Fortran 90/95 Configuration
This variable controls whether the Fortran 90/95 interface will be built. It should be set to one of these strings:
"default" The 'preconfig' script will attempt to compile a small Fortran 90/05 program; if this succeeds, BUILD_F90_INTERFACE will be set to "y", and otherwise to "n". "y" Build the Fortran 90/95 interface. "n" Do not build the Fortran 90/95 interface, even if a Fortran 90/95 compiler is installed.
BUILD_F90_INTERFACE=${BUILD_F90_INTERFACE:="default"}
The Fortran 90/95 compiler. If set to "default", the script will look for a Fortran 90/95 compiler on your system by the name of "f95", "gfortran", or "g95". F90=${F90:="default"}
Compiler option flags for the Fortran 90/95 compiler. If you are using the Absoft or the NAG compiler, additional options specific to these compilers will be added automatically, and you do not need to specify them here. Otherwise, add any required compiler-specific flags here. F90FLAGS=${F90FLAGS:='-O3 -g'}
\subsection custConfig Customizations / Extensions
You can build your own libraries as part of the %Cantera build process. This allows you to derive your own classes from those provided by %Cantera and build them automatically along with the rest of %Cantera. All you need to do is specify the directory where your source code is located. This capability is not yet fully functional, but should work for C++ applications. USER_SRC_DIR="Cantera/user" don't change this
\subsection kernelConfig Kernel Configuration
If you are only planning to use a portion of %Cantera, you may only need a stripped-down kernel. Set those features you want enabled to 'y', and set those you want to skip to 'n' (actually anything but 'y') or comment them out. Some features are dependent on others; for example, enabling 'CK' automatically enables KINETICS and THERMO.
If you only need to use %Cantera to evaluate thermodynamic, kinetic, and transport properties, it is sufficient to enable only KINETICS and TRANSPORT.
Note: if you are building the full Python interface or the MATLAB interface, it is necessary to build the full kernel.
thermodynamic properties ENABLE_THERMO='y'
optional phase types. These may not be needed by all users. Set them to 'n' to omit them from the kernel.
WITH_LATTICE_SOLID='y' WITH_METAL='y' WITH_STOICH_SUBSTANCE='y' WITH_PURE_FLUIDS='y'
if set to 'y', the ck2cti program that converts Chemkin input files to %Cantera format will be built. If you don't use Chemkin format files, or if you run ck2cti on some other machine, you can set this to 'n'. ENABLE_CK='y'
homogeneous and heterogeneous kinetics ENABLE_KINETICS='y'
transport properties ENABLE_TRANSPORT='y'
chemical equilibrium ENABLE_EQUIL='y'
stirred reactor models ENABLE_REACTORS='y'
One-dimensional flows ENABLE_FLOW1D='y'
ODE integrators and DAE solvers ENABLE_SOLVERS='y'
reaction path analysis ENABLE_RXNPATH='y'
non-ideal pure substance models for a few fluids imported from the 'TPX' package. (http://adam.caltech.edu/software/tpx) ENABLE_TPX='y'
----------------------------------------------------------------- BLAS and LAPACK -----------------------------------------------------------------
%Cantera comes with Fortran versions of those parts of BLAS and LAPACK it requires. But performance *may* be better if you use a version of these libraries optimized for your machine hardware. If you want to use your own libraries, set BLAS_LAPACK_LIBS to the string that should be passed to the linker to link to these libraries, and set BLAS_LAPACK_DIR to the directory where these libraries are located. Otherwise, leave these lines commented out.
(The settings shown here are appropriate if you are using the ATLAS libraries.)
BLAS_LAPACK_LIBS='-llapack -lblas' '-llapack -lf77blas -lcblas -latlas' BLAS_LAPACK_DIR='/usr/lib'
The options below do not need to be set if you are using the default libraries.
Set to 'lower' or 'upper', depending on whether the procedure names in the libraries are lowercase or uppercase. If you don't know, run 'nm' on the library file (e.g. 'nm libblas.a') Note that the these options apply to both the BLAS and LAPACK libraries. LAPACK_NAMES='lower' LAPACK_FTN_TRAILING_UNDERSCORE='y'
Currently this must be set to 'y'. LAPACK_FTN_STRING_LEN_AT_END='y'
------------------------------------------------------------------ C++ compiler options ------------------------------------------------------------------
the C++ compiler to use.
CXX=${CXX:=g++}
the C compiler to use. This is only used to compile CVODE and the Python extension module. CC=${CC:=gcc}
C++ compiler flags CXXFLAGS=${CXXFLAGS:="-O3 -g -Wall"}
the C++ flags required for linking. Uncomment if additional flags need to be passed to the linker. LCXX_FLAGS="-framework Accelerate"
Ending libraries to tack onto the linking of all C++ programs LCXX_END_LIBS=${LCXX_END_LIBS:="-lm"}
the compiler flag to use to compile code that will be inserted into shared libraries. PIC=${PIC:=-fPIC}
the compiler option to create a shared library from object files SHARED=${SHARED:="-shared"}
------------------------------------------------------------------- External procedures -------------------------------------------------------------------
%Cantera uses several external software packages, which are all in the 'ext' directory.. These options control how these packages are built.
For external procedures written in Fortran 77, both the original F77 source code and C souce code generated by the 'f2c' program are included. Set this to "y" if you want to build %Cantera using the f2c-generated C sources instead of using the F77 sources in the ext directory.
The default is not to do this on all platforms except vc++. Set this to "n" to never do this on any platform. Note, if set to "y", %Cantera does not need a fortran compiler, and all fortran compiler parameters below are irrelevant.
BUILD_WITH_F2C=${BUILD_WITH_F2C:="y"}
if you are building the external Fortran 77 procedures from the Fortran source code, enter the compiler here. F77=${F77:=g77}
Fortran 77 compiler flags. Note that the Fortran compiler flags must be set to produce object code compatible with the C/C++ compiler you are using. FFLAGS=${FFLAGS:='-O3 -g'}
the additional Fortran flags required for linking, if any. Leave commented out if no additional flags are required. LFORT_FLAGS="-lcc_dynamic"
------------------------------------------------------ other programs ------------------------------------------------------
the command to create a static library. ARCHIVE=${ARCHIVE:="ar ruv"} linux ARCHIVE=${ARCHIVE:="libtool -static -o"} Mac OSX
the command to run 'ranlib' if it is needed. RANLIB=${RANLIB:="ranlib"}
the command to run the 'make' utility. The %Cantera Makefiles are compatible with the GNU make utility, so if your make utility doesn't work, try GNU make. MAKE=${MAKE:=make}
file extensions CXX_EXT=${CXX_EXT:=cpp} F77_EXT=${F77_EXT:=f} F90_EXT=${F90_EXT:=f90}
CT_SHARED_LIB=${CT_SHARED_LIB:=clib}
The font to use in reaction path diagrams. This must be a font name recognized by the 'dot' program. On linux systems, this should be lowercase 'helvetica'. RPFONT=${RPFONT:="Helvetica"}
CANTERA_VERSION=${CANTERA_VERSION:="1.6.0"}
----------------------------------------------------------------------- ------------------- don't change anything below!! --------------------- -----------------------------------------------------------------------
export CANTERA_VERSION export USER_SRC_DIR export ARCHIVE export RANLIB export BLAS_LAPACK_LIBS export BLAS_LAPACK_DIR export BUILD_WITH_F2C export BUILD_F90_INTERFACE export PYTHON_PACKAGE export BUILD_MATLAB_TOOLBOX export MATLAB_CMD export CANTERA_ROOT export CT_SHARED_LIB export CXX export CXX_EXT export CXXFLAGS export CXX_INCLUDES export ENABLE_THERMO export ENABLE_KINETICS export ENABLE_TRANSPORT export ENABLE_CK export ENABLE_EQUIL export ENABLE_REACTORS export ENABLE_SOLVERS export ENABLE_RXNPATH export ENABLE_TPX export ENABLE_FLOW1D export EXE_EXT export F77 export F77_EXT export F90 export F90_EXT export FFLAGS export F77FLAGS export F90FLAGS export LAPACK_NAMES export LCXX_FLAGS export LCXX_END_LIBS export LFORT_FLAGS export LAPACK_FTN_STRING_LEN_AT_END export LAPACK_FTN_TRAILING_UNDERSCORE export LIB_DIR export FORT_MODULE_DIRECTORY export FORT_MODULE_PATH_COMMAND export OBJ_EXT export PYTHON_CMD export SET_PYTHON_SITE_PACKAGE_DIR export PYTHON_SITE_PACKAGE_TOPDIR export PIC export SHARED export SOEXT export MAKE export RPFONT export USE_VISUAL_STUDIO export FORTRAN_LIB_DIR export CANTERA_INSTALL_DIR export USE_NUMERIC export NUMARRAY_HOME export CANTERA_PYTHON_HOME
export WITH_LATTICE_SOLID export WITH_METAL export WITH_STOICH_SUBSTANCE export WITH_PURE_FLUIDS
cd config chmod +x ./preconfig chmod +x ./config.guess chmod +x ./config.sub chmod +x ./install-sh
Decide whether to add a prefix variable to the preconfig line
if (test "x$CANTERA_CONFIG_PREFIX" = "x") then CCPREFIX="" else CCPREFIX="--prefix="$CANTERA_CONFIG_PREFIX fi
run the preconfig command in the config directory
./preconfig $CCPREFIX $1 $2 $3 $4
\include scons-options.txt
*/
}

View file

@ -2,8 +2,6 @@
\page cxx-ctnew Compiling and Linking your C++ Program
\subpage cxx-setup
\section cxx-demo Building the C++ demo program
When you installed Cantera, a script named "ctnew" was added to the

View file

@ -1,7 +0,0 @@
/**
\page cxx-setup C++ setup
Coming soon
*/

View file

@ -0,0 +1,362 @@
scons: Reading SConscript files ...
**************************************************
* Configuration options for building Cantera *
**************************************************
The following options can be passed to SCons to customize the Cantera
build process. They should be given in the form:
scons build option1=value1 option2=value2
Variables set in this way will be stored in the 'cantera.conf' file
and reused automatically on subsequent invocations of
scons. Alternatively, the configuration options can be entered
directly into 'cantera.conf' before running 'scons build'. The format
of this file is:
option1 = 'value1'
option2 = 'value2'
**************************************************
* CXX: [ string ]
The C++ compiler to use.
- default: 'g++'
* CC: [ string ]
The C compiler to use. This is only used to compile CVODE and the
Python extension module.
- default: 'gcc'
* prefix: [ /path/to/prefix ]
Set this to the directory where Cantera should be installed.
- default: '/usr/local'
- actual: '/opt/cantera-dev'
* python_package: [ full | minimal | none | default ]
If you plan to work in Python, or you want to use the graphical
MixMaster application, then you need the 'full' Cantera Python
Package. If, on the other hand, you will only use Cantera from some
other language (e.g. MATLAB or Fortran 90/95) and only need Python
to process .cti files, then you only need a 'minimal' subset of the
package (actually, only one file). The default behavior is to build
the Python package if the required prerequsites (numpy) are
installed.
- default: 'default'
* python_cmd: [ /path/to/python_cmd ]
Cantera needs to know where to find the Python interpreter. If
PYTHON_CMD is not set, then the configuration process will use the
same Python interpreter being used by SCons.
- default: '/usr/bin/python'
* python_array: [ numpy | numarray | numeric ]
The Cantera Python interface requires one of the Python array
packages listed. Support for the legacy 'numeric' and 'numarray'
packages is deprecated, and will be removed in a future version of
Cantera.
- default: 'numpy'
* python_array_home: [ /path/to/python_array_home ]
If numpy was installed using the --home option, set this to the home
directory for numpy.
- default: ''
* python_prefix: [ /path/to/python_prefix ]
If you want to install the Cantera Python package somewhere other
than the default 'site-packages' directory within the Python library
directory, then set this to the desired directory. This is useful
when you do not have write access to the Python library directory.
- default: ''
* matlab_toolbox: [ y | n | default ]
This variable controls whether the Matlab toolbox will be built. If
it is set to 'default', the Matlab toolbox will be built if Matlab
can be found in the $PATH. Note that you may need to run 'mex
-setup' within Matlab to configure it for your C++ compiler before
building Cantera.
- default: 'default'
- actual: 'n'
* matlab_cmd: [ /path/to/matlab_cmd ]
Path to the Matlab executable. In Windows, this is probably
something like "C:/Program Files/MATLAB/R2009a/bin/win64/MATLAB.exe"
- default: 'matlab'
* f90_interface: [ y | n | default ]
This variable controls whether the Fortran 90/95 interface will be
built. If set to 'default', the builder will look for a compatible
Fortran compiler in the $PATH, and compile the Fortran 90 interface
if one is found.
- default: 'default'
- actual: 'n'
* F90: [ /path/to/F90 ]
The Fortran 90 compiler. If unspecified, the builder will look for a
compatible compiler (gfortran, ifort, g95) in the $PATH.
- default: ''
* F90FLAGS: [ string ]
Compilation options for the Fortran 90 compiler.
- default: '-O3'
* debug: [ yes | no ]
Enable extra printing code to aid in debugging.
- default: 'no'
* coverage: [ yes | no ]
Enable collection of code coverage information with gcov. Available
only when compiling with gcc.
- default: 'no'
* build_docs: [ yes | no ]
Build HTML documentation using Doxygen
- default: 'no'
- actual: 'yes'
* with_lattice_solid: [ yes | no ]
Include thermodynamic model for lattice solids in the Cantera
kernel.
- default: 'yes'
* with_metal: [ yes | no ]
Include thermodynamic model for metals in the Cantera kernel.
- default: 'yes'
* with_stoich_substance: [ yes | no ]
Include thermodynamic model for stoichiometric substances in the
Cantera kernel.
- default: 'yes'
* with_semiconductor: [ yes | no ]
Include thermodynamic model for semiconductors in the Cantera
kernel.
- default: 'yes'
* with_adsorbate: [ yes | no ]
Include thermodynamic model for adsorbates in the Cantera kernel
- default: 'yes'
* with_spectra: [ yes | no ]
Include spectroscopy capability in the Cantera kernel.
- default: 'yes'
* with_pure_fluids: [ yes | no ]
Include accurate liquid/vapor equations of state for several fluids,
including water, nitrogen, hydrogen, oxygen, methane, and HFC-134a.
- default: 'yes'
* with_ideal_solutions: [ yes | no ]
Include capabilities for working with ideal solutions.
- default: 'yes'
* with_electrolytes: [ yes | no ]
Enable expanded electrochemistry capabilities, including
thermodynamic models for electrolyte solutions.
- default: 'yes'
* with_prime: [ yes | no ]
Enable generating phase models from PrIMe models. For more
information about PrIME, see http://www.primekinetics.org WARNING:
Support for PrIMe is experimental!
- default: 'no'
* with_h298modify_capability: [ yes | no ]
Enable changing the 298K heats of formation directly via the C++
layer.
- default: 'no'
* enable_ck: [ yes | no ]
Build the ck2cti program that converts Chemkin input files to
Cantera format (.cti). If you don't use Chemkin format files, or if
you run ck2cti on some other machine, you can set this to 'n'.
- default: 'yes'
* with_kinetics: [ yes | no ]
Enable homogeneous kinetics.
- default: 'yes'
* with_hetero_kinetics: [ yes | no ]
Enable heterogeneous kinetics (surface chemistry). This also enables
charge transfer reactions for electrochemistry.
- default: 'yes'
* with_reaction_paths: [ yes | no ]
Enable reaction path analysis
- default: 'yes'
* with_vcsnonideal: [ yes | no ]
Enable vcs equilibrium package for nonideal phases
- default: 'yes'
* enable_transport: [ yes | no ]
Enable transport property calculations.
- default: 'yes'
* enable_equil: [ yes | no ]
Enable chemical equilibrium calculations
- default: 'yes'
* enable_reactors: [ yes | no ]
Enable stirred reactor models
- default: 'yes'
* enable_flow1d: [ yes | no ]
Enable one-dimensional flow models
- default: 'yes'
* enable_solvers: [ yes | no ]
Enable ODE integrators and DAE solvers
- default: 'yes'
* with_html_log_files: [ yes | no ]
write HTML log files. Some multiphase equilibrium procedures can
write copious diagnostic log messages. Set this to 'n' to disable
this capability. (results in slightly faster equilibrium
calculations)
- default: 'yes'
* use_sundials: [ default | y | n ]
Cantera uses the CVODE or CVODES ODE integrator to time-integrate
reactor network ODE's and for various other purposes. An older
version of CVODE comes with Cantera, but it is possible to use the
latest version as well, which now supports sensitivity analysis
(CVODES). CVODES is a part of the 'sundials' package from Lawrence
Livermore National Laboratory. Sundials is not distributed with
Cantera, but it is free software that may be downloaded and
installed separately. If you leave USE_SUNDIALS = 'default', then it
will be used if you have it, and if not the older CVODE will be
used. Or set USE_SUNDIALS to 'y' or 'n' to force using it or not.
Note that sensitivity analysis with Cantera requires use of
sundials. See: http://www.llnl.gov/CASC/sundials
- default: 'default'
* sundials_include: [ /path/to/sundials_include ]
The directory where the Sundials header files are installed. This
should be the directory that contains the "cvodes", "nvector", etc.
subdirectories. Not needed if the headers are installed in a
standard location, e.g. /usr/include.
- default: ''
* sundials_libdir: [ /path/to/sundials_libdir ]
The directory where the sundials static libraries are installed. Not
needed if the libraries are installed in a standard location, e.g.
/usr/lib.
- default: ''
* blas_lapack_libs: [ string ]
Cantera comes with Fortran (or C) versions of those parts of BLAS
and LAPACK it requires. But performance may be better if you use a
version of these libraries optimized for your machine hardware. If
you want to use your own libraries, set blas_lapack_libs to the the
list of libraries that should be passed to the linker, separated by
commas, e.g. "lapack,blas" or "lapack,f77blas,cblas,atlas".
- default: ''
* blas_lapack_dir: [ /path/to/blas_lapack_dir ]
Directory containing the libraries specified by 'blas_lapack_libs'.
- default: ''
* lapack_names: [ lower | upper ]
Set depending on whether the procedure names in the specified
libraries are lowercase or uppercase. If you don't know, run 'nm' on
the library file (e.g. 'nm libblas.a').
- default: 'lower'
* lapack_ftn_trailing_underscore: [ yes | no ]
- default: 'yes'
* lapack_ftn_string_len_at_end: [ yes | no ]
- default: 'yes'
* cxx_flags: [ string ]
Compiler flags passed to the C++ compiler only.
- default: '-ftemplate-depth-128'
- actual: '-fbounds-check'
* cc_flags: [ string ]
Compiler flags passed to both the C and C++ compilers, regardless of
optimization level
- default: '-Wall -g'
* optimize: [ yes | no ]
Enable extra compiler optimizations specified by the "release_flags"
variable, instead of the flags specified by the "debug_flags"
variable
- default: 'yes'
- actual: 'no'
* release_flags: [ string ]
Additional compiler flags passed to the C/C++ compiler when
optimize=yes.
- default: '-O3 -finline-functions -Wno-inline -DNDEBUG'
* debug_flags: [ string ]
Additional compiler flags passed to the C/C++ compiler when
optimize=no.
- default: '-O0 -fno-inline'
* build_thread_safe: [ yes | no ]
Cantera can be built so that it is thread safe. Doing so requires
using procedures from the Boost library, so if you want thread
safety then you need to get and install Boost (http://www.boost.org)
if you don't have it. This is turned off by default, in which case
Boost is not required to build Cantera.
- default: 'no'
* boost_inc_dir: [ /path/to/boost_inc_dir ]
Location of the Boost header files
- default: '/usr/include'
* boost_lib_dir: [ /path/to/boost_lib_dir ]
Directory containing the Boost.Thread library
- default: '/usr/lib'
* boost_thread_lib: [ string ]
The name of the Boost.Thread library.
- default: 'boost_thread'
* build_with_f2c: [ yes | no ]
For external procedures written in Fortran 77, both the original F77
source code and C souce code generated by the 'f2c' program are
included. Set this to "n" if you want to build Cantera using the F77
sources in the ext directory.
- default: 'yes'
* F77: [ string ]
Compiler used to build the external Fortran 77 procedures from the
Fortran source code
- default: 'gfortran'
* F77FLAGS: [ string ]
Fortran 77 Compiler flags. Note that the Fortran compiler flags must
be set to produce object code compatible with the C/C++ compiler you
are using.
- default: '-O3'
* stage_dir: [ /path/to/stage_dir ]
Directory relative to the Cantera source directory to be used as a
staging area for building e.g. a Debian package. If specified,
'scons install' will install files to 'stage_dir/prefix/...' instead
of installing into the local filesystem.
- default: ''
- actual: 'stage'
* graphvisdir: [ /path/to/graphvisdir ]
The directory location of the graphviz program, dot. dot is used for
creating the documentation, and for making reaction path diagrams.
If "dot" is in your path, you can leave this unspecified. NOTE:
Matlab comes with a stripped-down version of 'dot'. If 'dot' is on
your path, make sure it is not the Matlab version!
- default: ''
* rpfont: [ string ]
The font to use in reaction path diagrams. This must be a font name
recognized by the 'dot' program. On linux systems, this should be
lowercase 'helvetica'.
- default: 'Helvetica'
* cantera_version: [ string ]
- default: '2.0.0b1'

View file

@ -1,12 +0,0 @@
/**
\page cantera-winbuild Building Cantera using Visual Studio .NET
This document describes how to build %Cantera 1.7 using Visual Studio .Net
2003.
http://downloads.sourceforge.net/cantera/cantera17-vc7.pdf?use_mirror=easynews
\section ctbuild-sysreq System Requirements
*/