summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreklee15 <eunkyung.lee@us.ibm.com>2017-05-27 07:49:21 -0400
committerAdam J. Stewart <ajstewart426@gmail.com>2017-05-27 06:49:21 -0500
commit1b07d949aeb88c31f7618eaed391a27839f4abb4 (patch)
tree6eafa35276c5ffd6c01fe804d6d852db9048dc1b
parent1d80a879960191ad82cb8d78b58ef58d04537b2b (diff)
downloadspack-1b07d949aeb88c31f7618eaed391a27839f4abb4.tar.gz
spack-1b07d949aeb88c31f7618eaed391a27839f4abb4.tar.bz2
spack-1b07d949aeb88c31f7618eaed391a27839f4abb4.tar.xz
spack-1b07d949aeb88c31f7618eaed391a27839f4abb4.zip
Added pgi support for suite-sparse package (#4340)
* Added pgi support for suite-sparse package * Patch modified * added 'CFOPENMP={0}'.format(self.compiler.openmp_flag) for -mp flag
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py6
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/pgi.patch12
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