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
This commit is contained in:
eklee15 2017-05-27 07:49:21 -04:00 committed by Adam J. Stewart
parent 1d80a87996
commit 1b07d949ae
2 changed files with 17 additions and 1 deletions

View File

@ -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 @@ def install(self, spec, prefix):
'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:

View File

@ -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