Skip to content

Add LLVM Flang CI - #5614

Open
muk2 wants to merge 1 commit into
AMReX-Codes:developmentfrom
muk2:add-llvm-flang-ci
Open

Add LLVM Flang CI#5614
muk2 wants to merge 1 commit into
AMReX-Codes:developmentfrom
muk2:add-llvm-flang-ci

Conversation

@muk2

@muk2 muk2 commented Aug 16, 2026

Copy link
Copy Markdown

Summary

Adds a Linux CI workflow that builds libamrex and its Fortran interfaces with LLVM Flang, addressing #5605.

The existing Clang CI compiles C++ with Clang but still uses gfortran for Fortran, so it cannot catch LLVM-Flang-specific Fortran errors — e.g. the duplicate public attribute in AMReX_fillpatch_mod.F90 that was fixed in #5604 (#5603). This new job builds with flang (and matching clang/clang++) with -DAMReX_FORTRAN_INTERFACES=ON, so such regressions are caught going forward.

Changes

  • .github/workflows/flang.yml — new LinuxFlang workflow. Builds/installs libamrex + Fortran interfaces with LLVM Flang 20 (NOMPI, Debug, EB + Fortran interfaces on). Uses the shared check_changes gate to skip docs-only PRs.
  • .github/workflows/dependencies/dependencies_flang.sh — installs flang/clang from apt.llvm.org.

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX (CI coverage for LLVM Flang)
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

Add a Linux CI job that builds libamrex and its Fortran interfaces with
LLVM Flang (and matching Clang). This catches LLVM-Flang-specific Fortran
compile errors such as the duplicate `public` attribute fixed in AMReX-Codes#5604,
which gfortran-based CI does not flag.

Closes AMReX-Codes#5605.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@muk2 muk2 mentioned this pull request Aug 16, 2026
@ax3l ax3l added the test label Aug 17, 2026
@WeiqunZhang

Copy link
Copy Markdown
Member

Just for testing, can we revert the change in #5604 to see if the CI covers it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants