Skip to content

CI/CD: GitHub Actions, Codecov and CSCS GH200 CI, plus fixes for aarch64 and Julia 1.13 - #232

Merged
luraess merged 10 commits into
mainfrom
lr/cscs-ci-1
Oct 22, 2026
Merged

luraess merged 10 commits into
mainfrom
lr/cscs-ci-1

Conversation

@luraess

@luraess luraess commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

The CI on main fails for Julia 1.13, and no coverage has ever reached Codecov. This PR fixes the test runner and GitHub Actions, uploads coverage, adds CSCS CI on Daint GH200, and fixes the failures found when running the suite on GH200 (aarch64, Julia 1.13) and on the native Apple-silicon runners (Metal, tested for the first time).

CI/CD

  • Test runner (test/runtests.jl):
    • Test files run with Base.julia_cmd(), so --code-coverage (and --check-bounds) of Pkg.test reach the test processes. Before, coverage was only collected from the runner process.
    • Test files can be selected by name or relative path through test_args.
    • PS_TEST_BACKEND=CUDA|AMDGPU|Metal makes the run fail instead of silently skipping a non-functional GPU backend.
  • GitHub Actions:
    • Runs on pushes to main, tags and PRs, with concurrency cancelling.
    • Julia min and 1 on Ubuntu and macOS, plus pre (allowed to fail: the test dependencies cannot currently be resolved together on pre).
    • macOS uses native aarch64 instead of x64 under Rosetta, which makes Metal functional and tested.
    • julia-actions/cache, and Codecov upload with flag cpu.
    • This supersedes the stale dependabot PR.
  • codecov.yml: informational statuses and carryforward flags.
  • CSCS CI on Daint GH200 (ci/cscs-gh200.yml): one job runs the full suite in the julia/26.3:v1 uenv, with the GPU backends on the GH200 GPUs and the CPU backends on Grace, then uploads coverage with flag gh200.
  • Project.toml: CUDA_Runtime_jll is now a test dependency. Without it, Pkg.test ignores the uenv's local CUDA runtime preference.
  • Docs: the Testing page documents test selection, PS_TEST_BACKEND and the CI setup.

Fixes

  • Polyester on aarch64: @sharedMem on CPU expanded to MArray{..., eltype(A), ...}(undef).
    • Polyester's @batch does not lift variables used in a callee expression into its closure arguments, so A was captured.
    • A capturing closure @cfunction is not supported on aarch64 (Grace, Apple Silicon): cfunction: closures are not supported on this platform.
    • The MArray type is now passed to a small alloc_undef helper. The type is constructed exactly as before.
  • memopt: among the offsets with maximal loop span, the default point optranges were chosen by Dict iteration order, which changed in Julia 1.13. The choice is now deterministic, preferring the offset closest to the stencil centre. This reproduces the result of Julia ≤ 1.12.
  • @hide_communication / @overlap on GPUs: the expansions now synchronize the task's default stream before launching on the ParallelStencil streams. With Metal's batched default queue, a preceding array initialization was otherwise executed after the computations (all-zero results in the macOS CI); on CUDA/AMDGPU this closes the same latent race. The design question behind it (per-task streams vs. manually scheduled streams, also in ImplicitGlobalGrid) is GPU streams: work on the task's default stream is not ordered before @hide_communication / @overlap (wrong results with Metal) #233.

Tests

  • Per-package testsets: the package loop of each test file now runs at run time inside a file testset. The tests of the remaining packages run even if one package fails. Before, the first failing package hid the results of all later ones.
  • Julia 1.13 prints end in indexing expressions as var"end": the padding expansion tests now build their expected strings with the running version's printing.
  • Numerical AD with Threads is skipped on Julia ≥ 1.13: Enzyme 0.13.216 segfaults on Julia 1.13 when differentiating any code containing Threads.@threads, even with one thread (reported upstream).
  • Polyester closure captures: the @parallel_indices (I...) tests captured the global one, which fails on aarch64 like @sharedMem above.
  • memopt metadata on GPUs: the expected default optranges now depend on the compute capability (full ranges only below 8.0), so the test also passes on GH200 (9.0).
  • Metal: Float64 literals and allocations replaced by the test's number type; the KernelAbstractions hardware-switching loops use Float32 on :gpu_metal and always restore :cpu (an error previously left the hardware on Metal for the rest of the file); CellArray type checks under KernelAbstractions use isa with the blocklength that KernelAbstractions actually defaults to (the MtlCellArray alias leaves the storage type open).

Validation

  • GitHub Actions: Ubuntu and macOS (Apple silicon, Metal) green for Julia min and 1.
  • CSCS CI: full suite on one Daint GH200 node (Julia 1.13, CUDA, Grace CPU) green, ~17 minutes.
  • Coverage on Codecov: flags cpu and gh200.

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@luraess

luraess commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

cscs-ci run

1 similar comment
@luraess

luraess commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator Author

cscs-ci run

luraess and others added 3 commits October 21, 2026 21:51
…are loops, CellArray type checks)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hide_communication and @Overlap

Metal batches the work on the default queue and submits it lazily, so without this e.g. a preceding zero-initialization was executed after the computations (wrong results); on CUDA and AMDGPU it closes the same latent race.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@luraess

luraess commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

Closes #190

@luraess
luraess merged commit a730360 into main Oct 22, 2026
7 of 8 checks passed
@luraess
luraess deleted the lr/cscs-ci-1 branch October 22, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants