summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Wittenburg <scott.wittenburg@kitware.com>2020-11-12 11:46:15 -0700
committerGitHub <noreply@github.com>2020-11-12 10:46:15 -0800
commitfbbd71d3d747feeae0199f85f3213a3bb4f5fdc7 (patch)
tree5294f79fbb107855229a1cab05a0c5ef9f69ad4a
parent2a8dba48dad0d133eb7435df6ab318c3722a8d6e (diff)
downloadspack-fbbd71d3d747feeae0199f85f3213a3bb4f5fdc7.tar.gz
spack-fbbd71d3d747feeae0199f85f3213a3bb4f5fdc7.tar.bz2
spack-fbbd71d3d747feeae0199f85f3213a3bb4f5fdc7.tar.xz
spack-fbbd71d3d747feeae0199f85f3213a3bb4f5fdc7.zip
Pipelines: Compare target family instead of architecture (#19884)
In compiler bootstrapping pipelines, we add an artificial dependency between jobs for packages to be built with a bootstrapped compiler and the job building the compiler. To find the right bootstrapped compiler for each spec, we compared not only the compiler spec to that required by the package spec, but also the architectures of the compiler and package spec. But this prevented us from finding the bootstrapped compiler for a spec in cases where the architecture of the compiler wasn't exactly the same as the spec. For example, a gcc@4.8.5 might have bootstrapped a compiler with haswell as the architecture, while the spec had broadwell. By comparing the families instead of the architecture itself, we know that we can build the zlib for broadwell with the gcc for haswell.
-rw-r--r--lib/spack/spack/ci.py18
-rw-r--r--lib/spack/spack/test/cmd/ci.py1
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py
index 6c7a54a26a..c9054052e6 100644
--- a/lib/spack/spack/ci.py
+++ b/lib/spack/spack/ci.py
@@ -691,12 +691,19 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
# bootstrap spec lists, then we will add more dependencies to
# the job (that compiler and maybe it's dependencies as well).
if is_main_phase(phase_name):
+ spec_arch_family = (release_spec.architecture
+ .target
+ .microarchitecture
+ .family)
compiler_pkg_spec = compilers.pkg_spec_for_compiler(
release_spec.compiler)
for bs in bootstrap_specs:
bs_arch = bs['spec'].architecture
+ bs_arch_family = (bs_arch.target
+ .microarchitecture
+ .family)
if (bs['spec'].satisfies(compiler_pkg_spec) and
- bs_arch == release_spec.architecture):
+ bs_arch_family == spec_arch_family):
# We found the bootstrap compiler this release spec
# should be built with, so for DAG scheduling
# purposes, we will at least add the compiler spec
@@ -716,6 +723,15 @@ def generate_gitlab_ci_yaml(env, print_summary, output_file,
str(bs_arch),
build_group,
enable_artifacts_buildcache))
+ else:
+ debug_msg = ''.join([
+ 'Considered compiler {0} for spec ',
+ '{1}, but rejected it either because it was ',
+ 'not the compiler required by the spec, or ',
+ 'because the target arch families of the ',
+ 'spec and the compiler did not match'
+ ]).format(bs['spec'], release_spec)
+ tty.debug(debug_msg)
if enable_cdash_reporting:
cdash_build_name = get_cdash_build_name(
diff --git a/lib/spack/spack/test/cmd/ci.py b/lib/spack/spack/test/cmd/ci.py
index 6de4b764ca..4e19cf384d 100644
--- a/lib/spack/spack/test/cmd/ci.py
+++ b/lib/spack/spack/test/cmd/ci.py
@@ -195,6 +195,7 @@ spack:
definitions:
- bootstrap:
- gcc@3.0
+ - gcc@2.0
specs:
- dyninst%gcc@3.0
mirrors: