Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/workflows/arm-mask.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: arm-mask
# The cpuid route's aarch64 mask on real Arm silicon. ubuntu-24.04-arm runs on
# Neoverse cores, so getauxval, /proc/cpuinfo and gcc -mcpu=native here are the
# real readings the mask rewrites.
on: [push, pull_request]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
arm-mask:
name: arm-mask
runs-on: ubuntu-24.04-arm
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.17.1
- name: Allow the user and mount namespaces the mask runs in
run: |
set -euo pipefail
if [ "$(sysctl -n kernel.apparmor_restrict_unprivileged_userns 2>/dev/null || echo 0)" != "0" ]; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
- name: Which Arm core this runner is
run: |
set -euo pipefail
uname -m
grep -m1 'CPU implementer' /proc/cpuinfo
grep -m1 'CPU part' /proc/cpuinfo
grep -m1 '^Features' /proc/cpuinfo
lscpu | sed -n 's/^Model name: */model name: /p'
- name: release build
run: zig build --release=safe --prefix "$RUNNER_TEMP/eb-local"
- name: doctor reports the cpuid route for aarch64
run: |
set -euo pipefail
"$RUNNER_TEMP/eb-local/bin/eb-local" doctor --cpu-target aarch64/neoverse_n1 || true
- name: getauxval, /proc/cpuinfo and gcc -mcpu=native name the target under the mask
run: tools/mask/check_arm_mask.sh "$RUNNER_TEMP/eb-local/bin/eb-local" aarch64/neoverse_n1 aarch64/generic
# The whole path with EESSI mounted: preflight against EESSI archdetect,
# archspec and gcc, a build of a recipe, the ISA audit and the provenance record.
arm-mask-build:
name: arm-mask-build
runs-on: ubuntu-24.04-arm
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.17.1
- name: Allow the user and mount namespaces the mask runs in
run: |
set -euo pipefail
if [ "$(sysctl -n kernel.apparmor_restrict_unprivileged_userns 2>/dev/null || echo 0)" != "0" ]; then
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
fi
- name: release build
run: zig build --release=safe --prefix "$RUNNER_TEMP/eb-local"
- name: EESSI mount, without initialising EESSI
uses: EESSI/github-action-eessi@834df09f7d60de47f10a7cbf59b470d69b9e2852 # v3.4.0
with:
eessi_stack_version: "2026.06"
mount_cvmfs_only: "true"
- name: build pigz as a Neoverse N1 on a Neoverse N2
run: |
set -euo pipefail
export PATH="$RUNNER_TEMP/eb-local/bin:$PATH"
eb-local --workstation --cpu-target aarch64/neoverse_n1 pigz-2.8-GCCcore-15.2.0.eb --robot 2>&1 | tee build.log
grep -F 'eb-local: --cpu-target aarch64/neoverse_n1, cpuid route' build.log
grep -F 'preflight ok: EESSI archdetect names aarch64/neoverse_n1' build.log
grep -F 'preflight ok: archspec names neoverse_n1' build.log
grep -F 'preflight ok: gcc -mcpu=native is neoverse-n1' build.log
! grep -F 'preflight FAILED' build.log
- name: the install is labelled for the target and the audit passed
run: |
set -euo pipefail
record=$(find "$HOME/eessi/versions" -path '*/aarch64/neoverse_n1/software/pigz/*/easybuild/eb-local-build-mode.json' | head -n 1)
test -n "$record"
cat "$record"
grep -F '"cpu_target": "aarch64/neoverse_n1"' "$record"
grep -F '"route": "cpuid"' "$record"
grep -F '"isa_audit": "pass"' "$record"
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,64 @@

<!-- towncrier release notes start -->

## 3.6.0 (2026-11-27)

### Features

- The internal helper `eb-local __vm-run --mode kvm|tcg --cpu-target TARGET -- COMMAND` runs COMMAND inside a QEMU virtual CPU that presents an EESSI target, as the caller, in the caller's working directory, and refuses, before COMMAND starts, when EESSI archdetect, archspec, `gcc -march=native`, the CPU vendor or `/dev/fd` do not name the target.
- `--cpu-target TARGET` builds an easyconfig for another CPU target than the build host's, with `--mask auto|cpuid|kvm|tcg` choosing the route. The `cpuid` route runs the build with CPUID faulting and a target `/proc/cpuinfo` in an unprivileged namespace, refuses to build unless EESSI archdetect, archspec, gcc and the CPUID vendor name the target, pins the GROMACS SIMD level to the target, audits the installed tree and records the route in `easybuild/eb-local-build-mode.json`; `doctor --cpu-target` reports what the host can present.
- `--mask kvm` and `--mask tcg` run the build through `eb-local __vm-run`, and report its statuses 2, 125 and 126 as a refused request, a virtual machine that did not run and a guest CPU that did not read as the target. `--mask-allow-archspec-mismatch` passes `--allow-archspec-mismatch` to the helper and lets the build's preflight accept an archspec name other than the target's, which an aarch64 `--mask tcg` build needs because archspec reads `aarch64` under qemu-user.
- `--variant perf` and `--variant debug` build the named easyconfig with debug symbols and frame pointers, or unoptimised with debug symbols, as a module whose version ends in `-perf` or `-debug`; `doctor --profiling` reports whether perf may sample and debuggers attach, and finds perf, valgrind and gdb.
- `eb-local audit-isa PATH --target TARGET` runs `objdump` on the ELF files under PATH. It reports each instruction that needs a CPU feature the EESSI target lacks, per file with counts. It covers x86-64 (AVX-512, AMX) and aarch64 (SVE, SVE2, BF16, I8MM). Packages that choose their instruction set at run time print as dispatch and do not fail the audit; `--allow FILE` replaces that list. Exit 0 means clean, 1 means an instruction exceeds the target, and 2 means a usage or tool error.
- `eb-local dev` prints the Cargo linker lines that `eb-local eb` already runs. They live in `src/cargo-linker.sh`: a host `CARGO_TARGET_*_LINKER`, `RUSTFLAGS` and the rustc wrappers are dropped, and when `rustc -vV` prints a host, `CARGO_TARGET_<target>_LINKER` is `${CC:-gcc}`. The Zig program embeds that file.

### Fixes

- A `--cpu-target aarch64/neoverse_v1` or `aarch64/a64fx` build under `--mask tcg` stopped before `eb` started with `no mask profile`. The preflight in the virtual machine now takes the vendor and compiler names of a target that has no `cpuid` profile from the `__vm-run` target table.
- A failed sync or close while writing `eb-local.lock` leaves the previous lock in place. A new lock is published only after its bytes are durable, and a failed write removes its temporary file.
- A failed sync or close while writing a submit script is an error, and that script is not handed to sbatch.
- A signalled build keeps killing and reaping descendants until none remain or ten seconds pass, and if one remains it reports that, exits 1, and does not clean the logs.
- Avoid reloading the EESSI stack and extension modules when applying a development lock while preserving extension loading for locks written before the install prefix exists.
- Emit `drop_rpath_wrappers` and `rpath-wrappers` after loading locked modules in `eb-local dev --locked`, covering compiler families without a `buildenv` module such as `llvm-compilers` on EESSI 2026.06. Each `rpath-wrappers` command is checked, and `EB_LOCAL_DEV_PREFIX` is exported only after those commands succeed.
- The scheduler read an apostrophe in a `#SBATCH` `--output` or
`--chdir` path as an opening quote, stopped on the unmatched quote
and never submitted the job. `eb-local submit` now double-quotes
such a path.
- `--profile` now selects the profile for `eb-local profiles`. It wins
over `EB_LOCAL_PROFILE` and `default_profile`, and an unknown name is
refused.
- `--variant` now works only with a recipe build or `submit`. Other commands refuse it instead of running as if it were absent.
- `audit-isa` stops with `cannot resolve PATH` when the working directory is gone and PATH is relative, and `__vm-run` reports `cannot resolve the read-only share PATH` and exits 125 in that case, where each reported out of memory or gave no reason.
- `doctor.approved_prefixes` refuses a path with a parent component or a spelling of the root directory, so `eb-local doctor` and a build with `build.clear_foreign_prefixes` do not treat that spelling as an approved prefix.
- `eb-local __vm-run --mode kvm --cpu-target x86_64/amd/zen3` refused with status 126 because the guest read as `x86_64/amd/zen2`: QEMU's EPYC-Milan model has no `vaes`, which EESSI archdetect requires. The zen3 guest now adds `vaes` and `vpclmulqdq`.
- `eb-local submit` keeps every job script, prints the path it submits, and writes the new script beside one whose path is already taken.

### Documentation

- Document in `docs/howto/compile.md` that the European Environment for Scientific Software Installations (EESSI) 2026.06 includes `buildenv/default-foss-2026.1` and has no `default-lfoss` or `default-intel` build environment.
- Document in the command reference that `--variant` is accepted before an easyconfig and before `submit`. `submit` keeps the option and puts it on the batch command. Another command refuses it.
- The README lists the check, rpath-wrappers, lmod-cache, modulerc, overlay and site commands and doctor --cvmfs and --mpi, says clean refuses without rtrash unless --delete is given, and says eb-local builds on a workstation as well as in a Slurm job.

### Miscellaneous

- CI builds a recipe on a GitHub-hosted runner with the EESSI mount and no Slurm, the path a user without a cluster takes.
- Discover `eb-stack` 0.8.0 or newer from `PATH` when `EB_STACK_BIN` is
unset, isolate host `/etc/profile.d/lmod.sh` and `/etc/eb-local` site
files in a mount namespace with a user-namespace probe and bounded
timeouts, and run the full Python suite with zero skips in the `zig` CI
job.
- Extract the compiler family detection snippet used by `buildenvLines` into a shared helper with no behavior change.
- Guard the remaining doctor tests that require no site file from host
configuration, and cover them in the zero-skip isolation check.
- Require `zsh`, `eb-stack`, and `unshare` in `ZeroPythonSkips` when `EB_LOCAL_REQUIRE_TOOLS` is set, and skip with a reason otherwise.
- Run the live EESSI 2026.06 checks in `tests/site/test_dev_locked_eessi.py`
outside `python3 -m unittest discover -s tests`. `tests/site` is not a
package, so the zero-skip `zig` job does not collect them. Running the
file fails when the Zig build or the EESSI init file is absent.
- The `arm-mask` workflow runs the aarch64 mask on a real Neoverse core (`ubuntu-24.04-arm`): `getauxval`, `/proc/cpuinfo` and `gcc -mcpu=native` name the target under `__mask-run`, and a recipe builds for `aarch64/neoverse_n1` with EESSI mounted, the preflight and the ISA audit on.
- The `live-eessi` job in the `zig` workflow runs `tests/site/test_dev_locked_eessi.py` on an EESSI 2026.06 mount.


## 3.5.0 (2026-11-26)

### Features
Expand Down
6 changes: 3 additions & 3 deletions build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.{
.name = .eb_local,
.version = "3.5.0",
.version = "3.6.0",
.fingerprint = 0x512ce9ad65023f55,
.minimum_zig_version = "0.17.1",
.dependencies = .{
.zig_common = .{
.url = "git+https://github.com/stackhands/zig-common#a45142ad410c099d901241ab7aeba5aa2fd17321",
.hash = "zig_common-0.13.0-kBaPeac6CQA9othDLZWEw-nshWseJI2Q74IcjWL4ek7d",
.url = "git+https://github.com/stackhands/zig-common?ref=v0.14.0#831c49ec6662e1f6b146e2aad2aab05d7e89b17c",
.hash = "zig_common-0.14.0-kBaPeU0jCgAcDv5ha1TEwkzIXsM_17chRRIlZ7zbLWle",
},
},
.paths = .{
Expand Down
1 change: 0 additions & 1 deletion changelog.d/+approved-prefix-parent.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+audit-isa.feature.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+build-variants.feature.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+ci-workstation-build.misc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+compile-llvm-fallback-note.doc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+cpu-target-vm.feature.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+cpu-target.feature.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+dev-cargo-linker.feature.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+dev-family-detect-helper.misc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+dev-lock-durable-publish.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+dev-locked-no-duplicate-reloads.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+dev-locked-rpath-wrappers.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+live-eessi-ci.misc.md

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.d/+live-eessi-zero-skips.misc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+mask-vm-routes.feature.md

This file was deleted.

3 changes: 0 additions & 3 deletions changelog.d/+profiles-option.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+readme-matches-code.doc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+reap-group-after-kill.bugfix.md

This file was deleted.

2 changes: 0 additions & 2 deletions changelog.d/+remaining-doctor-no-site-file.misc.md

This file was deleted.

4 changes: 0 additions & 4 deletions changelog.d/+submit-sbatch-apostrophe.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+submit-script-collision.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+submit-script-sync-close.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+variant-other-command.bugfix.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+variant-submit-carveout.doc.md

This file was deleted.

5 changes: 0 additions & 5 deletions changelog.d/+zero-python-skips.misc.md

This file was deleted.

1 change: 0 additions & 1 deletion changelog.d/+zero-skips-strict-env.misc.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/howto/build-for-another-cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Each directory the build installed has `easybuild/eb-local-build-mode.json`:
"profile": "x86_64/amd/zen4",
"host_cpu": "AMD Ryzen 9 9950X 16-Core Processor",
"kernel": "7.0.13-arch1-1-rg",
"eb_local_version": "3.5.0",
"eb_local_version": "3.6.0",
"isa_audit": "pass"
}
```
Expand Down
Loading
Loading