feat(smp): add MPI-distributed island model#86
Open
evvaletov wants to merge 3 commits intonojhan:masterfrom
Open
feat(smp): add MPI-distributed island model#86evvaletov wants to merge 3 commits intonojhan:masterfrom
evvaletov wants to merge 3 commits intonojhan:masterfrom
Conversation
Owner
|
Seems awesome, I would review that once the history is clean. |
added 3 commits
February 28, 2026 19:55
Add virtual finalize() and hasFinalize() to moeoAlgo/moeoPopAlgo hierarchy. NSGA-II implements finalize() to recompute fitness and diversity assignments after population modifications (e.g. immigrant integration in island model).
Template wrapper making any type T serializable via eoserial::Persistent, required for transferring populations between MPI ranks in the island model.
Add MPI_IslandModel: a distributed island model where each MPI rank runs one island with asynchronous migration via MPI send/receive. Key features: - Single-message MPI protocol: MPI_Isend (data) + MPI_Get_count/ MPI_Recv on receive side. Avoids the two-message (size + data) pattern that can deadlock under oversubscription. - MPI_Iprobe for non-blocking message detection (upstream's communicator lacks iprobe()) - Non-blocking sends with PendingSend tracking and MPI_Test cleanup - Receive-before-send ordering to prevent message accumulation - Post-loop drain with safe shutdown (cancel pending sends) - Configurable poll interval (default 1s) - Thread-safe update method for asynchronous migration - Debug-level migration logging via eo::log Extended Island with: - IslandType enum (HOMOGENEOUS/HETEROGENEOUS) for conditional immigrant re-evaluation - IslandModelKind enum (None/Shared/MPI) replacing string dispatch - algoEOT template parameter for algorithm/individual type mismatch - finalize() call after population integration Extended islandModelWrapper with MPI_IslandModel overloads, initial_values parameter, and algoEOT support.
cf0c0f7 to
2bfd270
Compare
This was referenced Mar 1, 2026
Author
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
Add
MPI_IslandModel: a distributed island model where each MPI rank runsone island with asynchronous migration via MPI send/receive.
MPI_Isend/MPI_Get_count/MPI_Recv,avoiding the two-message pattern in
communicator::recv()that candeadlock under oversubscription
MPI_Iprobefor non-blocking message detectionPendingSendtracking andMPI_TestcleanupExtended
IslandwithIslandType/IslandModelKindenums,algoEOTtemplate parameter, and
finalize()call after population integration.Extended
islandModelWrapperwithMPI_IslandModeloverloads.Dependencies
finalize()lifecycle hookSerializableBasefor MPI serializationOnce those are merged, this branch can be rebased to drop the dependency
commits.
New files
smp/src/MPI_IslandModel.hPendingSendstructsmp/src/MPI_IslandModel.cppModified files
smp/src/abstractIsland.hsetModel()smp/src/island.hIslandType/IslandModelKindenums,algoEOTtemplate paramsmp/src/island.cppsend()/receive()MPI dispatch, heterogeneous re-evaluationsmp/src/islandModelWrapper.hMPI_IslandModelsmp/src/smp.hMPI_IslandModel.hBackward compatibility
Existing code using
Island<EOAlgo, EOT>continues to work —bEOTdefaults to
EOTandalgoEOTdefaults toEOT.