Miscellaneous cleanup
This commit is contained in:
parent
2806907060
commit
5a2e2567f5
4 changed files with 79 additions and 11403 deletions
5
AUTHORS
5
AUTHORS
|
|
@ -1,5 +1,6 @@
|
||||||
cantera developers:
|
Cantera developers:
|
||||||
|
|
||||||
|
Dave Goodwin
|
||||||
Nicholas Malaya
|
Nicholas Malaya
|
||||||
Harry Moffat
|
Harry Moffat
|
||||||
Ray Speth
|
Raymond Speth
|
||||||
|
|
|
||||||
181
SConstruct
181
SConstruct
|
|
@ -152,8 +152,6 @@ class defaults: pass
|
||||||
|
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
defaults.prefix = '/usr/local'
|
defaults.prefix = '/usr/local'
|
||||||
# defaults.boostIncDir = '/usr/include'
|
|
||||||
# defaults.boostLibDir = '/usr/lib'
|
|
||||||
defaults.boostIncDir = ''
|
defaults.boostIncDir = ''
|
||||||
defaults.boostLibDir = ''
|
defaults.boostLibDir = ''
|
||||||
env['INSTALL_MANPAGES'] = True
|
env['INSTALL_MANPAGES'] = True
|
||||||
|
|
@ -259,17 +257,16 @@ opts.AddVariables(
|
||||||
'default', ('full', 'minimal', 'none','default')),
|
'default', ('full', 'minimal', 'none','default')),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'python_cmd',
|
'python_cmd',
|
||||||
"""Cantera needs to know where to find the Python
|
"""Cantera needs to know where to find the Python interpreter. If
|
||||||
interpreter. If PYTHON_CMD is not set, then the
|
PYTHON_CMD is not set, then the configuration process will use the
|
||||||
configuration process will use the same Python interpreter
|
same Python interpreter being used by SCons.""",
|
||||||
being used by SCons.""",
|
|
||||||
sys.executable),
|
sys.executable),
|
||||||
EnumVariable(
|
EnumVariable(
|
||||||
'python_array',
|
'python_array',
|
||||||
"""The Cantera Python interface requires one of the Python
|
"""The Cantera Python interface requires one of the Python array
|
||||||
array packages listed. Support for the legacy 'numeric' and
|
packages listed. Support for the legacy 'numeric' and 'numarray'
|
||||||
'numarray' packages is deprecated, and will be removed in a
|
packages is deprecated, and will be removed in a future version
|
||||||
future version of Cantera.""",
|
of Cantera.""",
|
||||||
'numpy', ('numpy', 'numarray', 'numeric')),
|
'numpy', ('numpy', 'numarray', 'numeric')),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'python_array_home',
|
'python_array_home',
|
||||||
|
|
@ -278,18 +275,17 @@ opts.AddVariables(
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'python_prefix',
|
'python_prefix',
|
||||||
"""If you want to install the Cantera Python package somewhere
|
"""If you want to install the Cantera Python package somewhere other
|
||||||
other than the default 'site-packages' directory within the
|
than the default 'site-packages' directory within the Python library
|
||||||
Python library directory, then set this to the desired
|
directory, then set this to the desired directory. This is useful
|
||||||
directory. This is useful when you do not have write access
|
when you do not have write access to the Python library directory.""",
|
||||||
to the Python library directory.""",
|
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
EnumVariable(
|
EnumVariable(
|
||||||
'matlab_toolbox',
|
'matlab_toolbox',
|
||||||
"""This variable controls whether the Matlab toolbox will be
|
"""This variable controls whether the Matlab toolbox will be built. If
|
||||||
built. If set to 'y', you will also need to set the value
|
set to 'y', you will also need to set the value of the 'matlab_path'
|
||||||
of the 'matlab_path' variable. If set to 'default', the Matlab
|
variable. If set to 'default', the Matlab toolbox will be built if
|
||||||
toolbox will be built if 'matlab_path' is set.""",
|
'matlab_path' is set.""",
|
||||||
'default', ('y', 'n', 'default')),
|
'default', ('y', 'n', 'default')),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'matlab_path',
|
'matlab_path',
|
||||||
|
|
@ -301,16 +297,15 @@ opts.AddVariables(
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
EnumVariable(
|
EnumVariable(
|
||||||
'f90_interface',
|
'f90_interface',
|
||||||
"""This variable controls whether the Fortran 90/95 interface
|
"""This variable controls whether the Fortran 90/95 interface will be
|
||||||
will be built. If set to 'default', the builder will look
|
built. If set to 'default', the builder will look for a compatible
|
||||||
for a compatible Fortran compiler in the $PATH, and compile
|
Fortran compiler in the $PATH, and compile the Fortran 90 interface
|
||||||
the Fortran 90 interface if one is found.""",
|
if one is found.""",
|
||||||
'default', ('y', 'n', 'default')),
|
'default', ('y', 'n', 'default')),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'F90',
|
'F90',
|
||||||
"""The Fortran 90 compiler. If unspecified, the builder will
|
"""The Fortran 90 compiler. If unspecified, the builder will look for a
|
||||||
look for a compatible compiler (gfortran, ifort, g95) in
|
compatible compiler (gfortran, ifort, g95) in the $PATH.""",
|
||||||
the $PATH.""",
|
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
('F90FLAGS',
|
('F90FLAGS',
|
||||||
'Compilation options for the Fortran 90 compiler.',
|
'Compilation options for the Fortran 90 compiler.',
|
||||||
|
|
@ -340,60 +335,54 @@ opts.AddVariables(
|
||||||
False),
|
False),
|
||||||
BoolVariable(
|
BoolVariable(
|
||||||
'with_html_log_files',
|
'with_html_log_files',
|
||||||
"""write HTML log files. Some multiphase equilibrium
|
"""write HTML log files. Some multiphase equilibrium procedures can
|
||||||
procedures can write copious diagnostic log messages. Set
|
write copious diagnostic log messages. Set this to 'n' to disable
|
||||||
this to 'n' to disable this capability. (results in
|
this capability. (results in slightly faster equilibrium calculations)""",
|
||||||
slightly faster equilibrium calculations)""",
|
|
||||||
True),
|
True),
|
||||||
EnumVariable(
|
EnumVariable(
|
||||||
'use_sundials',
|
'use_sundials',
|
||||||
"""Cantera uses the CVODE or CVODES ODE integrator to
|
"""Cantera uses the CVODE or CVODES ODE integrator to time-integrate
|
||||||
time-integrate reactor network ODE's and for various other
|
reactor network ODE's and for various other purposes. An older
|
||||||
purposes. An older version of CVODE comes with Cantera, but
|
version of CVODE comes with Cantera, but it is possible to use the
|
||||||
it is possible to use the latest version as well, which now
|
latest version as well, which now supports sensitivity analysis
|
||||||
supports sensitivity analysis (CVODES). CVODES is a part of
|
(CVODES). CVODES is a part of the 'sundials' package from Lawrence
|
||||||
the 'sundials' package from Lawrence Livermore National
|
Livermore National Laboratory. Sundials is not distributed with
|
||||||
Laboratory. Sundials is not distributed with Cantera, but
|
Cantera, but it is free software that may be downloaded and
|
||||||
it is free software that may be downloaded and installed
|
installed separately. If you leave USE_SUNDIALS = 'default', then it
|
||||||
separately. If you leave USE_SUNDIALS = 'default', then it
|
will be used if you have it, and if not the older CVODE will be
|
||||||
will be used if you have it, and if not the older CVODE
|
used. Or set USE_SUNDIALS to 'y' or 'n' to force using it or not.
|
||||||
will be used. Or set USE_SUNDIALS to 'y' or 'n' to force
|
Note that sensitivity analysis with Cantera requires use of
|
||||||
using it or not. Note that sensitivity analysis with
|
sundials. See: http://www.llnl.gov/CASC/sundials""",
|
||||||
Cantera requires use of sundials. See:
|
|
||||||
http://www.llnl.gov/CASC/sundials""",
|
|
||||||
'default', ('default', 'y', 'n')),
|
'default', ('default', 'y', 'n')),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'sundials_include',
|
'sundials_include',
|
||||||
"""The directory where the Sundials header files are
|
"""The directory where the Sundials header files are installed. This
|
||||||
installed. This should be the directory that contains the
|
should be the directory that contains the "cvodes", "nvector", etc.
|
||||||
"cvodes", "nvector", etc. subdirectories. Not needed if the
|
subdirectories. Not needed if the headers are installed in a
|
||||||
headers are installed in a standard location,
|
standard location, e.g. /usr/include.""",
|
||||||
e.g. /usr/include.""",
|
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'sundials_libdir',
|
'sundials_libdir',
|
||||||
"""The directory where the sundials static libraries are
|
"""The directory where the sundials static libraries are installed.
|
||||||
installed. Not needed if the libraries are installed in a
|
Not needed if the libraries are installed in a standard location,
|
||||||
standard location, e.g. /usr/lib.""",
|
e.g. /usr/lib.""",
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
('blas_lapack_libs',
|
('blas_lapack_libs',
|
||||||
"""Cantera comes with Fortran (or C) versions of those parts of
|
"""Cantera comes with Fortran (or C) versions of those parts of BLAS and
|
||||||
BLAS and LAPACK it requires. But performance may be better if
|
LAPACK it requires. But performance may be better if you use a version
|
||||||
you use a version of these libraries optimized for your
|
of these libraries optimized for your machine hardware. If you want to
|
||||||
machine hardware. If you want to use your own libraries, set
|
use your own libraries, set blas_lapack_libs to the the list of
|
||||||
blas_lapack_libs to the the list of libraries that should be
|
libraries that should be passed to the linker, separated by commas,
|
||||||
passed to the linker, separated by commas, e.g. "lapack,blas"
|
e.g. "lapack,blas" or "lapack,f77blas,cblas,atlas". """,
|
||||||
or "lapack,f77blas,cblas,atlas". """,
|
|
||||||
''),
|
''),
|
||||||
PathVariable('blas_lapack_dir',
|
PathVariable('blas_lapack_dir',
|
||||||
"""Directory containing the libraries specified by 'blas_lapack_libs'.""",
|
"""Directory containing the libraries specified by 'blas_lapack_libs'.""",
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
EnumVariable(
|
EnumVariable(
|
||||||
'lapack_names',
|
'lapack_names',
|
||||||
"""Set depending on whether the procedure names in the
|
"""Set depending on whether the procedure names in the specified
|
||||||
specified libraries are lowercase or uppercase. If you
|
libraries are lowercase or uppercase. If you don't know, run 'nm' on
|
||||||
don't know, run 'nm' on the library file (e.g. 'nm
|
the library file (e.g. 'nm libblas.a').""",
|
||||||
libblas.a').""",
|
|
||||||
'lower', ('lower','upper')),
|
'lower', ('lower','upper')),
|
||||||
BoolVariable(
|
BoolVariable(
|
||||||
'lapack_ftn_trailing_underscore', '', True),
|
'lapack_ftn_trailing_underscore', '', True),
|
||||||
|
|
@ -415,8 +404,9 @@ opts.AddVariables(
|
||||||
defaults.threadFlags),
|
defaults.threadFlags),
|
||||||
BoolVariable(
|
BoolVariable(
|
||||||
'optimize',
|
'optimize',
|
||||||
"""Enable extra compiler optimizations specified by the "optimize_flags" variable,
|
"""Enable extra compiler optimizations specified by the
|
||||||
instead of the flags specified by the "debug_flags" variable""",
|
"optimize_flags" variable, instead of the flags specified by the
|
||||||
|
"debug_flags" variable""",
|
||||||
True),
|
True),
|
||||||
('optimize_flags',
|
('optimize_flags',
|
||||||
'Additional compiler flags passed to the C/C++ compiler when optimize=yes.',
|
'Additional compiler flags passed to the C/C++ compiler when optimize=yes.',
|
||||||
|
|
@ -442,12 +432,11 @@ opts.AddVariables(
|
||||||
defaults.noDebugLinkFlags),
|
defaults.noDebugLinkFlags),
|
||||||
BoolVariable(
|
BoolVariable(
|
||||||
'build_thread_safe',
|
'build_thread_safe',
|
||||||
"""Cantera can be built so that it is thread safe. Doing so
|
"""Cantera can be built so that it is thread safe. Doing so requires
|
||||||
requires using procedures from the Boost library, so if you
|
using procedures from the Boost library, so if you want thread
|
||||||
want thread safety then you need to get and install Boost
|
safety then you need to get and install Boost (http://www.boost.org)
|
||||||
(http://www.boost.org) if you don't have it. This is
|
if you don't have it. This is turned off by default, in which case
|
||||||
turned off by default, in which case Boost is not required
|
Boost is not required to build Cantera.""",
|
||||||
to build Cantera.""",
|
|
||||||
False),
|
False),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'boost_inc_dir',
|
'boost_inc_dir',
|
||||||
|
|
@ -492,7 +481,7 @@ opts.AddVariables(
|
||||||
False),
|
False),
|
||||||
BoolVariable(
|
BoolVariable(
|
||||||
'renamed_shared_libraries',
|
'renamed_shared_libraries',
|
||||||
"""If this option is turned on, which is the default, the shared libraries that are created
|
"""If this option is turned on, the shared libraries that are created
|
||||||
will be renamed to have a "_shared" extension added to their base name.
|
will be renamed to have a "_shared" extension added to their base name.
|
||||||
If not, the base names will be the same as the static libraries.
|
If not, the base names will be the same as the static libraries.
|
||||||
In some cases this simplifies subsequent linking environments with
|
In some cases this simplifies subsequent linking environments with
|
||||||
|
|
@ -513,19 +502,18 @@ opts.AddVariables(
|
||||||
'standard', ('standard','debian')),
|
'standard', ('standard','debian')),
|
||||||
PathVariable(
|
PathVariable(
|
||||||
'graphvizdir',
|
'graphvizdir',
|
||||||
"""The directory location of the graphviz program, "dot". dot is
|
"""The directory location of the graphviz program, "dot". dot is used
|
||||||
used for creating the documentation, and for making
|
for creating the documentation, and for making reaction path
|
||||||
reaction path diagrams. If "dot" is in your path, you can
|
diagrams. If "dot" is in your path, you can leave this unspecified.
|
||||||
leave this unspecified. NOTE: Matlab comes with a
|
NOTE: Matlab comes with a stripped-down version of 'dot'. If 'dot'
|
||||||
stripped-down version of 'dot'. If 'dot' is on your path,
|
is on your path, make sure it is not the Matlab version!""",
|
||||||
make sure it is not the Matlab version!""",
|
|
||||||
'', PathVariable.PathAccept),
|
'', PathVariable.PathAccept),
|
||||||
('rpfont',
|
('rpfont',
|
||||||
"""The font to use in reaction path diagrams. This must be a font
|
"""The font to use in reaction path diagrams. This must be a font
|
||||||
name recognized by the 'dot' program. On linux systems, this
|
name recognized by the 'dot' program. On linux systems, this
|
||||||
should be lowercase 'helvetica'.""",
|
should be lowercase 'helvetica'.""",
|
||||||
'Helvetica'),
|
'Helvetica'),
|
||||||
('cantera_version', '', '2.0.0b3')
|
('cantera_version', '', '2.0.0b4')
|
||||||
)
|
)
|
||||||
|
|
||||||
opts.Update(env)
|
opts.Update(env)
|
||||||
|
|
@ -544,11 +532,10 @@ build process. They should be given in the form:
|
||||||
|
|
||||||
scons build option1=value1 option2=value2
|
scons build option1=value1 option2=value2
|
||||||
|
|
||||||
Variables set in this way will be stored in the 'cantera.conf' file
|
Variables set in this way will be stored in the 'cantera.conf' file and reused
|
||||||
and reused automatically on subsequent invocations of
|
automatically on subsequent invocations of scons. Alternatively, the
|
||||||
scons. Alternatively, the configuration options can be entered
|
configuration options can be entered directly into 'cantera.conf' before
|
||||||
directly into 'cantera.conf' before running 'scons build'. The format
|
running 'scons build'. The format of this file is:
|
||||||
of this file is:
|
|
||||||
|
|
||||||
option1 = 'value1'
|
option1 = 'value1'
|
||||||
option2 = 'value2'
|
option2 = 'value2'
|
||||||
|
|
@ -675,7 +662,6 @@ if env['coverage']:
|
||||||
if env['CC'] == 'gcc':
|
if env['CC'] == 'gcc':
|
||||||
env.Append(CCFLAGS=['-fprofile-arcs', '-ftest-coverage'])
|
env.Append(CCFLAGS=['-fprofile-arcs', '-ftest-coverage'])
|
||||||
env.Append(LINKFLAGS=['-fprofile-arcs', '-ftest-coverage'])
|
env.Append(LINKFLAGS=['-fprofile-arcs', '-ftest-coverage'])
|
||||||
# ipdb()
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
print 'Error: coverage testing is only available with GCC'
|
print 'Error: coverage testing is only available with GCC'
|
||||||
|
|
@ -704,10 +690,7 @@ ret = SCons.Conftest.CheckLib(SCons.SConf.CheckContext(conf),
|
||||||
env['HAS_SUNDIALS'] = not ret # CheckLib returns False to indicate success
|
env['HAS_SUNDIALS'] = not ret # CheckLib returns False to indicate success
|
||||||
env['NEED_LIBM'] = not conf.CheckLibWithHeader(None, 'math.h', 'C',
|
env['NEED_LIBM'] = not conf.CheckLibWithHeader(None, 'math.h', 'C',
|
||||||
'double x; log(x);', False)
|
'double x; log(x);', False)
|
||||||
if env['NEED_LIBM']:
|
env['LIBM'] = ['m'] if env['NEED_LIBM'] else []
|
||||||
env['LIBM'] = ['m']
|
|
||||||
else:
|
|
||||||
env['LIBM'] = []
|
|
||||||
|
|
||||||
if env['HAS_SUNDIALS'] and env['use_sundials'] != 'n':
|
if env['HAS_SUNDIALS'] and env['use_sundials'] != 'n':
|
||||||
# Determine Sundials version
|
# Determine Sundials version
|
||||||
|
|
@ -1061,41 +1044,29 @@ if not env['single_library']:
|
||||||
linkLibs.append('execstream')
|
linkLibs.append('execstream')
|
||||||
linkSharedLibs.append('execstream_shared')
|
linkSharedLibs.append('execstream_shared')
|
||||||
|
|
||||||
#
|
|
||||||
# Add lapack and blas to the link line
|
# Add lapack and blas to the link line
|
||||||
#
|
|
||||||
if env['blas_lapack_libs']:
|
if env['blas_lapack_libs']:
|
||||||
linkLibs.extend(env['blas_lapack_libs'])
|
linkLibs.extend(env['blas_lapack_libs'])
|
||||||
elif not env['single_library']:
|
elif not env['single_library']:
|
||||||
linkLibs.extend(('ctlapack', 'ctblas'))
|
linkLibs.extend(('ctlapack', 'ctblas'))
|
||||||
linkSharedLibs.extend(('ctlapack_shared', 'ctblas_shared'))
|
linkSharedLibs.extend(('ctlapack_shared', 'ctblas_shared'))
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Add the f2c library if it is necessary to link fortran libraries
|
|
||||||
#
|
|
||||||
if not env['build_with_f2c']:
|
if not env['build_with_f2c']:
|
||||||
#
|
# TODO: This is not the correct library to link if the fortran sources
|
||||||
# Early gcc compilers will fail on this line as they use g77 and not gfortran
|
# are compiled with a different fortran compiler.
|
||||||
#
|
|
||||||
linkLibs.append('gfortran')
|
linkLibs.append('gfortran')
|
||||||
linkSharedLibs.append('gfortran')
|
linkSharedLibs.append('gfortran')
|
||||||
elif not env['single_library']:
|
elif not env['single_library']:
|
||||||
# Add the f2c library when f2c is requested
|
# Add the f2c library when f2c is requested
|
||||||
#
|
|
||||||
linkLibs.append('ctf2c')
|
linkLibs.append('ctf2c')
|
||||||
linkSharedLibs.append('ctf2c_shared')
|
linkSharedLibs.append('ctf2c_shared')
|
||||||
|
|
||||||
#
|
|
||||||
# Store the list of needed static link libraries in the environment
|
# Store the list of needed static link libraries in the environment
|
||||||
#
|
|
||||||
env['cantera_libs'] = linkLibs
|
env['cantera_libs'] = linkLibs
|
||||||
env['cantera_shared_libs'] = linkSharedLibs
|
env['cantera_shared_libs'] = linkSharedLibs
|
||||||
if env['renamed_shared_libraries'] == False :
|
if env['renamed_shared_libraries'] == False :
|
||||||
env['cantera_shared_libs'] = linkLibs
|
env['cantera_shared_libs'] = linkLibs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Add targets from the SConscript files in the various subdirectories
|
# Add targets from the SConscript files in the various subdirectories
|
||||||
Export('env', 'build', 'libraryTargets', 'install', 'buildSample')
|
Export('env', 'build', 'libraryTargets', 'install', 'buildSample')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# @PACKAGE_NAME@ installation details
|
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
# Fortran compilation and linking information
|
|
||||||
# Retrieve these using `pkg-config --variable=name @PACKAGE_NAME@`
|
|
||||||
fflags=-I@libdir@
|
|
||||||
flibs=-L@libdir@ -lf@PACKAGE_NAME@ -l@PACKAGE_NAME@
|
|
||||||
|
|
||||||
Name: @PACKAGE_NAME@
|
|
||||||
Description: @PACKAGE_DESCRIPTION@
|
|
||||||
URL: @PACKAGE_URL@
|
|
||||||
Requires:
|
|
||||||
Version: @VERSION@
|
|
||||||
|
|
||||||
LINK = -lctcxx -luser -loneD -lzeroD -lequil -lkinetics -ltransport -lthermo
|
|
||||||
LINK += -lctnumerics -lctmath -ltpx -lctspectra -lconverters -lctbase -lcvode
|
|
||||||
LINK += -lctlapack -lctblas -lctf2c -lm -lstdc++
|
|
||||||
|
|
||||||
Libs: -L${libdir} ${LINK}
|
|
||||||
Cflags: -I${includedir}
|
|
||||||
Loading…
Add table
Reference in a new issue