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:
parent
1d80a87996
commit
1b07d949ae
@ -53,6 +53,9 @@ class SuiteSparse(Package):
|
|||||||
|
|
||||||
patch('tbb_453.patch', when='@4.5.3:+tbb')
|
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):
|
def install(self, spec, prefix):
|
||||||
# The build system of SuiteSparse is quite old-fashioned.
|
# The build system of SuiteSparse is quite old-fashioned.
|
||||||
# It's basically a plain Makefile which include an header
|
# It's basically a plain Makefile which include an header
|
||||||
@ -74,7 +77,8 @@ def install(self, spec, prefix):
|
|||||||
'CUDA=no',
|
'CUDA=no',
|
||||||
'CUDA_PATH={0}'.format(
|
'CUDA_PATH={0}'.format(
|
||||||
spec['cuda'].prefix if '+cuda' in spec else ''
|
spec['cuda'].prefix if '+cuda' in spec else ''
|
||||||
)
|
),
|
||||||
|
'CFOPENMP={0}'.format(self.compiler.openmp_flag)
|
||||||
])
|
])
|
||||||
|
|
||||||
if '+pic' in spec:
|
if '+pic' in spec:
|
||||||
|
12
var/spack/repos/builtin/packages/suite-sparse/pgi.patch
Normal file
12
var/spack/repos/builtin/packages/suite-sparse/pgi.patch
Normal 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
|
Loading…
Reference in New Issue
Block a user