Validate MPI reduction of Enzyme gradients#48
Open
krystophny wants to merge 22 commits into
Open
Conversation
Member
Author
|
Added the AD-14 MPI reduction validation slice. The fix adds a two-rank MPI-C validation target where Enzyme differentiates only a rank-local flat-kernel energy contribution. The scalar energy and full gradient are reduced with MPI outside The PR intentionally avoids Fortran MPI modules in the Enzyme path because the local LLVM flang toolchain cannot consume the installed Fortran MPI modules. Full |
758a3ec to
761c44d
Compare
761c44d to
00d866e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #47.
Refs #15.
Summary
__enzyme_autodiffmpiexecare availableScope
This validates the AD contract needed for MPI: Enzyme sees only rank-local energy work, and MPI collectives happen outside the differentiated region.
It does not claim full
USE_MPI=ONsupport for the installed LLVM flang stack. On this machine,flang-newcannot configure a Fortran MPI build because the available MPI Fortran modules are not LLVM-flang modules.Verification
Test fails on main
Before this PR, the MPI Enzyme reduction target is absent on the stacked parent:
The full
USE_MPI=ONflang route is also blocked by the local MPI Fortran toolchain, and this PR does not hide that:Test passes after fix