summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreklee15 <eunkyung.lee@us.ibm.com>2017-02-28 14:26:49 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2017-02-28 11:26:49 -0800
commitbce2accb69eea21ba88d7bf768d421b9cd0b023b (patch)
tree19272d4cea25e458036de96069456ff17d949409
parent9be0c06b9866e7ddd580ff5ff5c7c3228962d31d (diff)
downloadspack-bce2accb69eea21ba88d7bf768d421b9cd0b023b.tar.gz
spack-bce2accb69eea21ba88d7bf768d421b9cd0b023b.tar.bz2
spack-bce2accb69eea21ba88d7bf768d421b9cd0b023b.tar.xz
spack-bce2accb69eea21ba88d7bf768d421b9cd0b023b.zip
xl support for suite-sparse (#3226)
* xl support for suite-sparse * make_args.extend([ 'CFLAGS={0}'.format(self.compiler.pic_flag), 'FFLAGS={0}'.format(self.compiler.pic_flag) ])
-rw-r--r--var/spack/repos/builtin/packages/suite-sparse/package.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py
index aa22e1ecce..740e490b5a 100644
--- a/var/spack/repos/builtin/packages/suite-sparse/package.py
+++ b/var/spack/repos/builtin/packages/suite-sparse/package.py
@@ -35,8 +35,8 @@ class SuiteSparse(Package):
version('4.5.3', '8ec57324585df3c6483ad7f556afccbd')
version('4.5.1', 'f0ea9aad8d2d1ffec66a5b6bfeff5319')
- variant('tbb', default=True, description='Build with Intel TBB')
- variant('fpic', default=True, description='Build position independent code (required to link with shared libraries)')
+ variant('tbb', default=False, description='Build with Intel TBB')
+ variant('pic', default=True, description='Build position independent code (required to link with shared libraries)')
depends_on('blas')
depends_on('lapack')
@@ -46,7 +46,7 @@ class SuiteSparse(Package):
# flags does not seem to be used, which leads to linking errors on Linux.
depends_on('tbb', when='@4.5.3:+tbb')
- patch('tbb_453.patch', when='@4.5.3')
+ patch('tbb_453.patch', when='@4.5.3:+tbb')
def install(self, spec, prefix):
# The build system of SuiteSparse is quite old-fashioned.
@@ -60,9 +60,9 @@ class SuiteSparse(Package):
# inject Spack compiler wrappers
make_args.extend([
'AUTOCC=no',
- 'CC=cc',
- 'CXX=c++',
- 'F77=f77',
+ 'CC=%s' % self.compiler.cc,
+ 'CXX=%s' % self.compiler.cxx,
+ 'F77=%s' % self.compiler.f77,
'CUDA_ROOT =',
'GPU_BLAS_PATH =',
'GPU_CONFIG =',
@@ -76,8 +76,14 @@ class SuiteSparse(Package):
'NVCC = echo',
'NVCCFLAGS =',
])
- if '+fpic' in spec:
- make_args.extend(['CFLAGS=-fPIC', 'FFLAGS=-fPIC'])
+ if '+pic' in spec:
+ make_args.extend([
+ 'CFLAGS={0}'.format(self.compiler.pic_flag),
+ 'FFLAGS={0}'.format(self.compiler.pic_flag)
+ ])
+
+ if '%xl' in spec or '%xl_r' in spec:
+ make_args.extend(['CFLAGS+=-DBLAS_NO_UNDERSCORE'])
# use Spack's metis in CHOLMOD/Partition module,
# otherwise internal Metis will be compiled