Update Sundials submodule to Sundials 3.1.0

This commit is contained in:
Ray Speth 2018-02-12 23:02:47 -05:00
parent 82c959d3a3
commit 322b1fc375
4 changed files with 19 additions and 12 deletions

View file

@ -1002,7 +1002,7 @@ env['NEED_LIBM'] = not conf.CheckLibWithHeader(None, 'math.h', 'C',
env['LIBM'] = ['m'] if env['NEED_LIBM'] else []
if env['system_sundials'] == 'y':
for subdir in ('sundials','nvector','cvodes','ida'):
for subdir in ('sundials', 'nvector', 'cvodes', 'ida', 'sunlinsol', 'sunmatrix'):
removeDirectory('include/cantera/ext/'+subdir)
# Determine Sundials version
@ -1040,8 +1040,8 @@ if env['system_sundials'] == 'y':
print('WARNING: External BLAS/LAPACK has been specified for Cantera '
'but Sundials was built without this support.')
else: # env['system_sundials'] == 'n'
print("""INFO: Using private installation of Sundials version 2.6.""")
env['sundials_version'] = '2.6'
print("""INFO: Using private installation of Sundials version 3.1.""")
env['sundials_version'] = '3.1'
env['has_sundials_lapack'] = int(env['use_lapack'])

View file

@ -69,20 +69,22 @@ if env['system_sundials'] == 'n':
ConfigBuilder(sundials_configh)))
# Copy sundials header files into common include directory
for subdir in ('sundials', 'nvector', 'cvodes', 'ida'):
for subdir in ('sundials', 'nvector', 'cvodes', 'ida', 'sunmatrix', 'sunlinsol'):
for header in mglob(env, 'sundials/include/'+subdir, 'h'):
build(copyenv.Command('#include/cantera/ext/%s/%s' % (subdir, header.name),
'#ext/sundials/include/%s/%s' % (subdir, header.name),
Copy('$TARGET', '$SOURCE')))
# Compile Sundials source files
exclude = ['_klu', '_superlumt']
if not env['use_lapack']:
exclude.append('_lapack')
for subdir in ('sundials', 'nvec_ser', 'cvodes', 'ida'):
subdirs = ['sundials', 'nvec_ser', 'cvodes', 'ida', 'sunmat_band',
'sunmat_dense', 'sunmat_sparse', 'sunlinsol_dense',
'sunlinsol_band','sunlinsol_spgmr']
if env['use_lapack']:
subdirs.extend(('sunlinsol_lapackdense', 'sunlinsol_lapackband'))
for subdir in subdirs:
libraryTargets.extend(localenv.SharedObject(
[f for f in mglob(localenv, 'sundials/src/'+subdir, 'c')
if not any(pattern in f.name for pattern in exclude)]))
[f for f in mglob(localenv, 'sundials/src/'+subdir, 'c')]))
if not env['system_eigen']:
license_files.append(('Eigen', 'eigen/COPYING.MPL2'))

@ -1 +1 @@
Subproject commit b69354ec776e38e08367fd89880b43459fda3d92
Subproject commit 6f8ea07ef955c60a99a52870c307ef7907db6ff1

View file

@ -1,7 +1,12 @@
/* Minimal set of SUNDIALS configuration variables */
#define SUNDIALS_PACKAGE_VERSION 2.6.2
#define SUNDIALS_VERSION "3.1.0"
#define SUNDIALS_VERSION_MAJOR 3
#define SUNDIALS_VERSION_MINOR 1
#define SUNDIALS_VERSION_PATCH 0
#define SUNDIALS_VERSION_LABEL ""
#define SUNDIALS_F77_FUNC(name,NAME) name ## _
#define SUNDIALS_DOUBLE_PRECISION 1
#define SUNDIALS_INT32_T 1
%(SUNDIALS_USE_GENERIC_MATH)s
%(SUNDIALS_BLAS_LAPACK)s
#define SUNDIALS_EXPORT