diff options
author | Pramod Kumbhar <pramod.s.kumbhar@gmail.com> | 2017-02-22 20:04:14 +0100 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-02-22 11:04:14 -0800 |
commit | f86dcd8b4cff3b49ba5395c9f64e91f066c0a8be (patch) | |
tree | 6fb35ddeee26b078406574db4f774ba4e8867b72 /var | |
parent | 871a94ee41043b8e026f898ab9208f610814b85c (diff) | |
download | spack-f86dcd8b4cff3b49ba5395c9f64e91f066c0a8be.tar.gz spack-f86dcd8b4cff3b49ba5395c9f64e91f066c0a8be.tar.bz2 spack-f86dcd8b4cff3b49ba5395c9f64e91f066c0a8be.tar.xz spack-f86dcd8b4cff3b49ba5395c9f64e91f066c0a8be.zip |
Fix scotch build on bg-q (#3196)
* Fix build issue #3190 on bg-q :
- disable parallel build as it produces weired linker errors
in cross compiling environment
- update ldflags for bg-q as per Makefile provided Makefile.inc.ppca2_ibm_bgq
* Added note about -lpthread vs -pthread
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/scotch/package.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/scotch/package.py b/var/spack/repos/builtin/packages/scotch/package.py index ca8e3e3fa0..f164037efa 100644 --- a/var/spack/repos/builtin/packages/scotch/package.py +++ b/var/spack/repos/builtin/packages/scotch/package.py @@ -56,6 +56,10 @@ class Scotch(Package): depends_on('mpi', when='+mpi') depends_on('zlib', when='+compression') + # NOTE: In cross-compiling environment parallel build + # produces weird linker errors. + parallel = False + # NOTE: Versions of Scotch up to version 6.0.0 don't include support for # building with 'esmumps' in their default packages. In order to enable # support for this feature, we must grab the 'esmumps' enabled archives @@ -140,9 +144,14 @@ class Scotch(Package): ldflags.append('-L%s -lz' % (self.spec['zlib'].prefix.lib)) cflags.append('-DCOMMON_PTHREAD') + + # NOTE: bg-q platform needs -lpthread (and not -pthread) + # otherwise we get illegal instruction error during runtime if self.spec.satisfies('platform=darwin'): cflags.append('-DCOMMON_PTHREAD_BARRIER') ldflags.append('-lm -pthread') + elif self.spec.satisfies('platform=bgq'): + ldflags.append('-lm -lrt -lpthread') else: ldflags.append('-lm -lrt -pthread') |