Multi-node linclust#1122
Draft
bbuschkaemper wants to merge 1 commit into
Draft
Conversation
Signed-off-by: Björn Buschkämper <bjoern.buschkaemper@gmail.com>
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.
Multi-node Linclust via MPI
Summary
Adds multi-node/multi-rank support to
align2clust, letting the most expensive alignment/candidate-generation stage scale across multiple (slurm) nodes while producing identical clustering results to a single-node run. Reuses theexisting
--mpi-runner/RUNNERmechanism already used bysearch/cluster.Motivation
To make MMseqs2 linclust competitive vs. DIAMOND for large-scale clustering runs (>10B), it needs to support multi-node environments. Our test-run to cluster 8B proteins took 7 days on a single 128-core, 4TB ram machine, which makes MMseqs2 currently unfeasible for our planned 110B clustering.
Changelog
Align2clust.cppcandidate generation and set-cover/greedy reduction into a reusableAlign2ClustReducerclass (order-independent, deterministic). No behavior change on its own.Align2ClustChunking), each generating candidates independently into a local buffer with no shared state. Rank 0 collects all chunks and performs the single deterministic reduction + final DB write.Align2ClustCheckpoint): completed chunks are persisted to disk (atomic write +.donemarker) under<output>_chunks/<fingerprint>/. An interrupted run resumes by only regenerating not-yet-completed chunks. The fingerprint depends only on the clustering-relevant parameters (thresholds, mode, DB identity/size, chunk size) - not on rank or thread count - so a run can be interrupted on N nodes and resumed on M nodes.linclust.shso only MPI-aware sub-stages (kmermatcher,align2clust,rescorediagonal/alignfor the legacy path) are wrapped in$RUNNER; the non-MPI-awareclusthash/cluststages always run as a single process.MMseqsMPI.cpp: a non-MPI build launched under a multi-task runner (srun -n>1,mpirun -np>1, etc.) now exits immediately with a clear error instead of silently running every task as an unaware duplicate that corrupts shared output.sbatchscript, and checkpoint/resume semantics.TestAlign2ClustReducerunit tests covering tie-breaking, ordering, edge cases, and chunking/checkpoint determinism.Constraints
--include-align-filesis not currently supported together with multi-rank/resumed distributed generation (rejected at startup with a clear error); works normally single-rank.linclustas a single top-level process with--mpi-runner/RUNNER; do not wrap the top-levelmmseqs linclustinvocation itself inmpirun/srun(nested MPI launches are rejected by OpenMPI).Testing performed
clu/clu_rep/clu_aln/clu_rep_aln) for SET_COVER, GREEDY, and--include-align-filesruns.align2clustrun directly undermpirun -np 1/2/4against a single-node reference - identical results in all cases.linclustworkflow via--mpi-runner "mpirun -np 4"as a single top-level process - correct rank init, chunked processing, and byte-identical intermediate outputs.-DHAVE_MPIunset) and MPI (-DHAVE_MPI=1) build.