Document running MPI simulations with dump/restore#18
Open
VatsalSy wants to merge 1 commit into
Open
Conversation
Add a Tips.md section covering parallel runs that checkpoint with dump() and restart with restore(): the required MPI compile flags (CC99='mpicc -std=c99 -D_GNU_SOURCE=1', -D_MPI=1), matching the compile and run toolchains, dump/restore behaviour across process counts, and the init-once / restart-many sweep pattern.
There was a problem hiding this comment.
Pull request overview
Adds documentation to help users run Basilisk MPI simulations using the common dump()/restore() checkpoint-restart workflow (including the “serial init → MPI main” pattern used in CoMPhy Lab codes), with practical HPC-oriented guidance.
Changes:
- Adds a new “Running MPI Simulations with
dump/restore” section toTips.md. - Documents recommended MPI compile flags (including
_GNU_SOURCE) and common failure modes. - Provides an HPC modules example and a suggested parameter-sweep workflow.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+211
to
+216
| Build the MPI executable with: | ||
|
|
||
| ```shell | ||
| CC99='mpicc -std=c99 -D_GNU_SOURCE=1' qcc -Wall -O2 -D_MPI=1 -disable-dimensions solver.c -o solver -lm | ||
| ``` | ||
|
|
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.
Summary
Adds a Tips.md section, Running MPI Simulations with
dump/restore, covering the parallel checkpoint/restart workflow used across CoMPhy Lab drop/bubble codes (the two-phase init → main pattern).Written up from debugging a Snellius parameter sweep. It documents:
CC99='mpicc -std=c99 -D_GNU_SOURCE=1' qcc -Wall -O2 -D_MPI=1 -disable-dimensions.-D_GNU_SOURCE=1is required: recent Basilisk (grid/memindex/virtual.h) usesMAP_ANONYMOUS/MADV_DONTNEEDand the build fails without it. Also notes the serial-only init phase and theqcc../-path crash.2024+OpenMPI/5.0.3-GCC-13.3.0example); a toolchain mismatch can segfault inside the MPI restore path.dump/restoreacross process counts —restore()redistributes the tree over the currentnpe(); a geometry-onlydumpInitis reusable across a parameter sweep;restore_mpi/mpi_boundary_updatestartup segfaults are almost always an environment mismatch.dumpInitasdumpper case → one MPI job per case.Doc-only change; placed between "Installing Basilisk" and "Patches".