summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2016-01-15 18:07:41 -0800
committerPeter Scheibel <scheibel1@llnl.gov>2016-01-15 18:07:41 -0800
commitd22cf1aed1d033610481cb451909c93916848ccc (patch)
tree5f0ff9a0c301555047564df1588948a427c72054 /var
parent50727527bc69a1b8ed26aa84a40039086db33827 (diff)
downloadspack-d22cf1aed1d033610481cb451909c93916848ccc.tar.gz
spack-d22cf1aed1d033610481cb451909c93916848ccc.tar.bz2
spack-d22cf1aed1d033610481cb451909c93916848ccc.tar.xz
spack-d22cf1aed1d033610481cb451909c93916848ccc.zip
1. raise an exception if the multithreaded and singlethreaded options are both
disabled 2. invoke the b2 installation once for each enabled threading option (apparently the install fails if a single call has both options enabled for mpi)
Diffstat (limited to 'var')
-rw-r--r--var/spack/packages/boost/package.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/var/spack/packages/boost/package.py b/var/spack/packages/boost/package.py
index 5fb6c9dc04..1992d4d39a 100644
--- a/var/spack/packages/boost/package.py
+++ b/var/spack/packages/boost/package.py
@@ -138,18 +138,20 @@ class Boost(Package):
if '+shared' in spec:
linkTypes.append('shared')
- #TODO: at least one of these two options must be active
threadingOpts = []
if '+multithreaded' in spec:
threadingOpts.append('multi')
if '+singlethreaded' in spec:
threadingOpts.append('single')
+ if not threadingOpts:
+ raise RuntimeError("At least one of {singlethreaded, multithreaded} must be enabled")
options.extend([
'toolset=%s' % self.determine_toolset(spec),
'link=%s' % ','.join(linkTypes),
- 'threading=%s' % ','.join(threadingOpts),
'--layout=tagged'])
+
+ return threadingOpts
def install(self, spec, prefix):
withLibs = list()
@@ -181,6 +183,10 @@ class Boost(Package):
b2 = Executable(b2name)
b2_options = ['-j', '%s' % make_jobs]
- self.determine_b2_options(spec, b2_options)
+ threadingOpts = self.determine_b2_options(spec, b2_options)
- b2('install', *b2_options)
+ # In theory it could be done on one call but it fails on
+ # Boost.MPI if the threading options are not separated.
+ for threadingOpt in threadingOpts:
+ b2('install', 'threading=%s' % threadingOpt, *b2_options)
+