No CI job compiles the parapack MPI tutorials, so the MPI exchange workers are untested

Open
#314 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
cmake, cpp, github-actions
Domain
ci-cd, testing

Research direction

Read the mpi job in ci.yml and the tutorial build setup in compatibility.yml:79-95 and tutorials/examples/parapack/CMakeLists.txt:28. Add an MPI-enabled tutorial build and run the requested ising_multiple and exchange cases at the stated rank counts, using regenerated inputs. The issue also asks for a one-line registration fix in tutorials/examples/parapack/exchange/loop.C:23; done means the CI covers these MPI tutorial instantiations and the named runs pass.

Written by the indexing model from the issue text.

Description

area:ci-tests area:parapack area:tutorials

Summary

alps::parapack::parallel_exchange_worker (exchange.h), multiple_parallel_exchange_worker
(exchange_multi.h) and the ring-exchange example multiple/ising.h are template code whose
only instantiations are in tutorials/examples/parapack/{exchange,multiple}. The loop
application registers only single_exchange_worker (src/apps/qmc/looper/path_integral.C:374).
Every CI job that builds the tutorials does so with -DALPS_ENABLE_MPI=OFF
(ci.yml:217,335,402,464; compatibility.yml:34,69,129,202, including the job that installs
and builds the tutorials component at compatibility.yml:79-95), and
tutorials/examples/parapack/CMakeLists.txt:28 adds multiple only when MPI is on. The mpi
CI job builds a fixed list of test targets and never the tutorials.

So #282 (std::filesystem) and #284 (plain MPI) changed these headers and the tutorial without
any build compiling the result. They do compile and run when built by hand against an MPI
SDK (checked at 1-8 ranks on 2026-11-04), but the next change will not be caught either.

What the gap already hid

Building and running the examples with MPI surfaced three pre-existing problems:

  • tutorials/examples/parapack/exchange/loop.C:22-23 registers the parallel worker under
    "loop exchange"; the input exchange.ip and the serial registration use "loop; exchange".
    mpirun -np N exchange --mpi < exchange.ip dies with exit 255 on the loop block
    (Error: unknown algorithm: "loop; exchange"). The message is only visible on stderr
    because alps::mpi::environment is created inside the try in run_sequential_mpi
    (parapack.C:730) and start_mpi (parapack.C:823): its destructor calls MPI_Abort
    during unwinding before the catch prints what(), the same layout #289 reports for the
    DMFT drivers.
  • exchange_multi.h::calc_nrep divides by comm_.size() instead of head_.size()
    (separate issue).
  • multiple/ising.h:98 has an operator-precedence bug in the heat-bath energy difference
    (separate issue).

Proposal

In the mpi CI job (ci.yml "Build MPI integration and representative serial tests"),
after installing the SDK, cmake --install --component tutorials and build
tutorials/examples against it with ALPS_DIR pointing at the MPI install, as the
compatibility job already does for the non-MPI case. Run at least:

  • ising_multiple --mpi at 2 and 4 ranks against regenerated ising.op-2/ising.op-4;
  • exchange --mpi at 4 ranks with exchange.ip (after fixing the "loop exchange" name) and
    with a PROCESS_PER_WORKER = 2 input for the multiple worker.

Also fix the one-line typo in loop.C:23 now; it is independent of the CI work.

Dominant language
C++
Stars
32
Forks
10
Avg merge
4d 6h
Merged PRs (30d)
51

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ALPSim/ALPS

All issues in ALPSim/ALPS

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.