diff options
-rw-r--r-- | var/spack/repos/builtin/packages/suite-sparse/package.py | 6 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/suite-sparse/pgi.patch | 12 |
2 files changed, 17 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index ae2a99e737..7884e540ba 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -53,6 +53,9 @@ class SuiteSparse(Package): patch('tbb_453.patch', when='@4.5.3:+tbb') + # This patch removes unsupported flags for pgi compiler + patch('pgi.patch', when='%pgi') + def install(self, spec, prefix): # The build system of SuiteSparse is quite old-fashioned. # It's basically a plain Makefile which include an header @@ -74,7 +77,8 @@ class SuiteSparse(Package): 'CUDA=no', 'CUDA_PATH={0}'.format( spec['cuda'].prefix if '+cuda' in spec else '' - ) + ), + 'CFOPENMP={0}'.format(self.compiler.openmp_flag) ]) if '+pic' in spec: diff --git a/var/spack/repos/builtin/packages/suite-sparse/pgi.patch b/var/spack/repos/builtin/packages/suite-sparse/pgi.patch new file mode 100644 index 0000000000..f615a57674 --- /dev/null +++ b/var/spack/repos/builtin/packages/suite-sparse/pgi.patch @@ -0,0 +1,12 @@ +--- a/SuiteSparse_config/SuiteSparse_config.mk ++++ b/SuiteSparse_config/SuiteSparse_config.mk +@@ -89,7 +89,8 @@ + + # The CF macro is used by SuiteSparse Makefiles as a combination of + # CFLAGS, CPPFLAGS, TARGET_ARCH, and system-dependent settings. +- CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fexceptions -fPIC ++ #CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fexceptions -fPIC ++ CF ?= $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(OPTIMIZATION) -fPIC + + #--------------------------------------------------------------------------- + # OpenMP is used in CHOLMOD |