From 322b1fc37572dca61067397d460cc809b9bece46 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 12 Feb 2018 23:02:47 -0500 Subject: [PATCH] Update Sundials submodule to Sundials 3.1.0 --- SConstruct | 6 +++--- ext/SConscript | 16 +++++++++------- ext/sundials | 2 +- ext/sundials_config.h.in | 7 ++++++- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/SConstruct b/SConstruct index 76fb3253f..6fb45ff57 100644 --- a/SConstruct +++ b/SConstruct @@ -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']) diff --git a/ext/SConscript b/ext/SConscript index 1ad28245d..0a143509f 100644 --- a/ext/SConscript +++ b/ext/SConscript @@ -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')) diff --git a/ext/sundials b/ext/sundials index b69354ec7..6f8ea07ef 160000 --- a/ext/sundials +++ b/ext/sundials @@ -1 +1 @@ -Subproject commit b69354ec776e38e08367fd89880b43459fda3d92 +Subproject commit 6f8ea07ef955c60a99a52870c307ef7907db6ff1 diff --git a/ext/sundials_config.h.in b/ext/sundials_config.h.in index cdd40a016..621cd563b 100644 --- a/ext/sundials_config.h.in +++ b/ext/sundials_config.h.in @@ -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