Conversation
Member
|
Flyby comment: this PR should also add support for spack. Here are some notes to develop with spack: https://awslabs.github.io/palace/dev/developer/spack/ |
laylagi
force-pushed
the
lgh/mms
branch
7 times, most recently
from
August 31, 2026 15:34
b3b7958 to
72b43b1
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.
Adds the Method of Manufactured Solutions (MMS) for the electrostatic solver, with an optional Enzyme-AD (Automatic Differentiation) backend.
The tests exercise the production solve path and verify:
Enzyme support
Enzyme support is disabled by default with
PALACE_WITH_ENZYME=OFF. When enabled, the build requires matching upstream Clang and LLVM versions and can either build Enzyme or use an existing installation throughENZYME_DIR.Enzyme-specific sources are compiled separately so the compiler plugin is not applied to unrelated Palace sources. CI enables Enzyme in the Clang sanitizer configuration while the remaining configurations continue to test the default Enzyme-disabled path.
Building and testing with Enzyme
Enzyme requires upstream Clang and a matching LLVM development package. Apple Clang is not supported because it does not provide a matching upstream LLVM package.
On Linux, configure from the repository root with:
On macOS with Homebrew LLVM:
The superbuild builds Enzyme automatically. To use an existing compatible installation, also pass
-DENZYME_DIR=<path-to-EnzymeConfig.cmake-directory>.Run the analytic and Enzyme-backed MMS tests with:
macOS build note
The Homebrew LLVM workflow also requires passing the macOS SDK sysroot to LIBXSMM. LIBXSMM is a libCEED backend, not an Enzyme dependency; this is a general Darwin/Homebrew-Clang superbuild fix encountered while validating the Enzyme workflow.
Documentation
Adds a numerical-verification guide, reproducible convergence data and plots, and make targets for regenerating the documentation artifacts.