summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2019-08-07 14:43:25 -0700
committerGreg Becker <becker33@llnl.gov>2019-08-07 14:43:25 -0700
commit92ec732f9a321b24ed3f6ceb541cc2051d0c1166 (patch)
treec162e464e56c4838962dc92d1b427a65ddc9c0e5 /lib
parent941eb5d7566bbd12cd0d3ef18f0f8deec0c10333 (diff)
downloadspack-92ec732f9a321b24ed3f6ceb541cc2051d0c1166.tar.gz
spack-92ec732f9a321b24ed3f6ceb541cc2051d0c1166.tar.bz2
spack-92ec732f9a321b24ed3f6ceb541cc2051d0c1166.tar.xz
spack-92ec732f9a321b24ed3f6ceb541cc2051d0c1166.zip
compiler bootstrapping: enable both single-node and multi-node DAGS(#12310)
5f74f22 enabled installing compilers for dependencies but not for the root package (and in particular not for DAGs which consist of one package) this enables bootstrapping compilers for both types of DAGs
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 742d83cb72..58f6c3b2e9 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1534,15 +1534,13 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
dep_kwargs['install_deps'] = False
for dep in self.spec.traverse(order='post', root=False):
if spack.config.get('config:install_missing_compilers', False):
- tty.debug('Bootstrapping {0} compiler for {1}'.format(
- self.spec.compiler, self.name
- ))
- comp_kwargs = kwargs.copy()
- comp_kwargs['explicit'] = False
- comp_kwargs['install_deps'] = True
- dep.package.bootstrap_compiler(**comp_kwargs)
+ Package._install_bootstrap_compiler(dep.package, **kwargs)
dep.package.do_install(**dep_kwargs)
+ # Then, install the compiler if it is not already installed.
+ if install_deps:
+ Package._install_bootstrap_compiler(self, **kwargs)
+
# Then, install the package proper
tty.msg(colorize('@*{Installing} @*g{%s}' % self.name))
@@ -1705,6 +1703,16 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
# check the filesystem for it.
self.stage.created = False
+ @staticmethod
+ def _install_bootstrap_compiler(pkg, **install_kwargs):
+ tty.debug('Bootstrapping {0} compiler for {1}'.format(
+ pkg.spec.compiler, pkg.name
+ ))
+ comp_kwargs = install_kwargs.copy()
+ comp_kwargs['explicit'] = False
+ comp_kwargs['install_deps'] = True
+ pkg.bootstrap_compiler(**comp_kwargs)
+
def unit_test_check(self):
"""Hook for unit tests to assert things about package internals.