From 4d37db02daa93f43f00a2899098b49469c0c8247 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Wed, 13 Nov 2019 15:03:24 -0600 Subject: superlu_dist: fix build with xl compilers (#13702) * superlu_dist: fix build with xl compilers * fix link error ../SRC/libsuperlu_dist.so.6.1.1: undefined reference to `ztrtri_' * Fixed the ordering of the spec on the xl-611 patch. * fix flake8 error --- .../repos/builtin/packages/superlu-dist/package.py | 7 ++++++ .../builtin/packages/superlu-dist/xl-611.patch | 26 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 var/spack/repos/builtin/packages/superlu-dist/xl-611.patch diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index c49a624b17..59337824e5 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -40,6 +40,9 @@ class SuperluDist(CMakePackage): depends_on('parmetis') depends_on('metis@5:') + patch('xl-611.patch', when='@:6.1.1 %xl') + patch('xl-611.patch', when='@:6.1.1 %xl_r') + def cmake_args(self): spec = self.spec args = [ @@ -54,6 +57,10 @@ class SuperluDist(CMakePackage): '-DTPL_PARMETIS_INCLUDE_DIRS=%s' % spec['parmetis'].prefix.include ] + if (spec.satisfies('%xl') or spec.satisfies('%xl_r')) and \ + spec.satisfies('@:6.1.1'): + args.append('-DCMAKE_C_FLAGS=-DNoChange') + if '+int64' in spec: args.append('-DXSDK_INDEX_SIZE=64') else: diff --git a/var/spack/repos/builtin/packages/superlu-dist/xl-611.patch b/var/spack/repos/builtin/packages/superlu-dist/xl-611.patch new file mode 100644 index 0000000000..92b6a3c730 --- /dev/null +++ b/var/spack/repos/builtin/packages/superlu-dist/xl-611.patch @@ -0,0 +1,26 @@ +commit e51132dbd022139933678b3a751a9b3148fafd19 +Author: Satish Balay +Date: Tue Nov 12 16:07:08 2019 -0600 + + add ztrtri_ mapping for xlf + +diff --git a/SRC/Cnames.h b/SRC/Cnames.h +index 792f514..ebef619 100644 +--- a/SRC/Cnames.h ++++ b/SRC/Cnames.h +@@ -179,6 +179,7 @@ at the top-level directory. + #define zher2_ ZHER2 + #define zgeru_ ZGERU + ++#define ztrtri_ ZTRTRI + /* + #define mc64id_dist MC64ID_DIST + #define mc64ad_dist MC64AD_DIST +@@ -307,6 +308,7 @@ at the top-level directory. + #define zher2_ zher2 + #define zgeru_ zgeru + ++#define ztrtri_ ztrtri + /* + #define mc64id_dist mc64id_dist + #define mc64ad_dist mc64ad_dist -- cgit v1.2.3-70-g09d2