From a656bc300a4f98f73a54105a0cc9546c59d207cb Mon Sep 17 00:00:00 2001 From: David Gardner Date: Wed, 8 Nov 2017 21:06:34 -0800 Subject: add patch for building sundials (#6161) * add patch for building sundials on mac * add upper limit on the patch --- var/spack/repos/builtin/packages/sundials/package.py | 7 +++++++ .../packages/sundials/test_nvector_parhyp.patch | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/sundials/test_nvector_parhyp.patch diff --git a/var/spack/repos/builtin/packages/sundials/package.py b/var/spack/repos/builtin/packages/sundials/package.py index 1c2fa177f2..2dd05bf127 100644 --- a/var/spack/repos/builtin/packages/sundials/package.py +++ b/var/spack/repos/builtin/packages/sundials/package.py @@ -196,6 +196,13 @@ class Sundials(CMakePackage): # Require that SuperLU_MT built with external blas depends_on('superlu-mt+blas', when='+superlu-mt') + # ========================================================================== + # Patches + # ========================================================================== + + # remove OpenMP header file and function from hypre vector test code + patch('test_nvector_parhyp.patch', when='@2.7.0:3.0.0') + # ========================================================================== # SUNDIALS Settings # ========================================================================== diff --git a/var/spack/repos/builtin/packages/sundials/test_nvector_parhyp.patch b/var/spack/repos/builtin/packages/sundials/test_nvector_parhyp.patch new file mode 100644 index 0000000000..ecb71d4a5f --- /dev/null +++ b/var/spack/repos/builtin/packages/sundials/test_nvector_parhyp.patch @@ -0,0 +1,18 @@ +--- a/examples/nvector/parhyp/test_nvector_parhyp.c ++++ b/examples/nvector/parhyp/test_nvector_parhyp.c +@@ -24,7 +24,6 @@ + #include "test_nvector.h" + + #include +-#include + + #if defined( SUNDIALS_HAVE_POSIX_TIMERS) && defined(_POSIX_TIMERS) + #include +@@ -74,7 +73,6 @@ int main(int argc, char *argv[]) + /* printf("\nRunning with vector length %ld \n \n", veclen); */ + /* Get processor number and total number of processes */ + MPI_Init(&argc, &argv); +- /* omp_set_num_threads(4); */ + comm = MPI_COMM_WORLD; + MPI_Comm_size(comm, &nprocs); + MPI_Comm_rank(comm, &myid); -- cgit v1.2.3-70-g09d2