Follow-ups from #284 (plain MPI instead of Boost.MPI)
Maintainers usually reply within 3 days
Assessment
This issue has not been assessed yet.
Description
Follow-up items noticed while reviewing #284 (Use plain MPI instead of Boost.MPI). None of these block the PR; they are suggestions for later.
1. Generic MPI helpers live in a parapack header
src/alps/parapack/include/alps/parapack/mpi.h adds alps::mpi::send, recv, probe, iprobe, split, broadcast_object and gather, which replace the Boost.MPI calls ALPS used. Nothing in it is specific to parapack: it is plain MPI plus Boost.Serialization for non-arithmetic values.
Code outside parapack now includes it:
src/alps/alea/tests/observableset_mpi.Csrc/alps/legacy_parameters/tests/parameters_mpi.Ctests/cli/citation_runtime.cpptutorials/examples/parapack/multiple/ising.h(a parapack tutorial, so this one is fine)
This builds only because these targets link the monolithic ALPS::alps. It makes lower-level components (alea, legacy_parameters) depend on a header in the top-level parapack component.
Suggestion: move the header to src/alps/utilities/include/alps/utilities/ (e.g. mpi_serialization.hpp), next to <alps/utilities/mpi.hpp>, and update the includes above. Keep it separate from mpi.hpp, which does not depend on Boost.
2. ULFM support removed
The PR removes ALPS_NGS_OPENMPI_ULFM and <alps/ngs/ulfm.hpp>. That is fine: no ALPS code can recover from a failed rank, so nothing could use them. The helpers called OMPI_Comm_shrink and OMPI_Comm_revoke from a pre-release Open MPI. Released MPIs with ULFM (Open MPI 5, MPICH) name them MPIX_Comm_shrink and MPIX_Comm_revoke.
Suggestion: nothing to do now. If fault tolerance is ever wanted, start from the released MPIX_ interface and a scheduler that can recover from a failed rank. That is a research project, not a port of the old helpers.
3. tests/cmake/preserved_public_headers.json is no longer read
The PR adds alps/ngs/boost_mpi.hpp and alps/ngs/ulfm.hpp to its retired list. Nothing reads this file anymore. test_sdk_contracts.py used it as a frozen header baseline until a65015e20 ("Check installed headers against the source tree") replaced that with a check against the source include directories. No test, CMake file or document on master refers to it now.
While the old check was active, the list also kept dead code in the tree. alps/ngs/ulfm.hpp and alps/ngs/boost_mpi.hpp are in its frozen headers list (lines 196 and 252), so deleting either one failed CI unless the JSON was edited too. Leaving an unused header cost nothing; deleting it cost a test failure. ULFM had been unused since 2013 and was still here for #284 to remove. The file also shows nobody checks it now: #284 adds both headers under retired but leaves them in headers, so the file lists them as both kept and removed.
Suggestion: delete the file in a separate PR. If a list of removed headers is still wanted, for example for people installing over an old prefix, keep it in the CHANGELOG instead.
4. alps::mpi::status has an unused default constructor
src/alps/parapack/include/alps/parapack/mpi.h:56 declares status() : status_() {}. Nothing default-constructs an alps::mpi::status: every status comes from iprobe, probe or recv, and the std::optional<status> returned by iprobe doesn't need it.
Suggestion: remove the constructor.
5. The new header is named like MPI's own <mpi.h>
alps/parapack/process.h:27 includes the new header as # include "mpi.h". A quoted include looks in the including file's directory first, so this finds alps/parapack/mpi.h. MPI's header has the same name. It works today: every other mpi.h include in the tree uses <mpi.h> and none is in that directory. Nothing adds include/alps/parapack to an include path either. But a quoted "mpi.h" in a future parapack header, or a downstream project that puts that directory on its include path, would silently get the parapack header instead of MPI's.
Suggestion: give the header a name that can't clash. The move in item 1 (to alps/utilities/mpi_serialization.hpp) does that. If the header stays in parapack, rename it, e.g. alps/parapack/parapack_mpi.h, and include it as <alps/parapack/parapack_mpi.h>.
- Dominant language
- C++
- Stars
- 32
- Forks
- 10
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 52
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ALPSim/ALPS
-
Parallel Ising example: operator precedence makes the heat-bath energy difference wrongPossibly taken @skilledwolf claimed this today. Openarea:tutorials bug scientific-correctness
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ALPSim/ALPS#313 · 1 assignee ·
Maintainers usually reply within 3 days
-
area:parapack bug scientific-correctness
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
area:lattice bug
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
Read parameter files straight into the solver input structsPossibly taken @Ooolab claimed this today. Open
ALPSim/ALPS#317 · 1 assignee ·
Maintainers usually reply within 3 days
-
alps/parapack/mpi.h: message sizes are truncated to int without a check; MPI errors are now fatal (CHANGELOG)Possibly taken @skilledwolf claimed this today. Openarea:parapack compatibility-change enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
ALPSim/ALPS#315 · 1 assignee ·
Maintainers usually reply within 3 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
TokisanGames/Terrain3D#1073 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
metasequoiaime/msime#10989 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
KhronosGroup/SPIRV-LLVM-Translator#4151 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
vek-language/vek-lang#1 · 1 comment ·