Repository navigation
fix: always pass an explicit mmseqs thread count to abstar.run - #12
Merged
Merged
Conversation
run() passed mmseqs_threads=None for wells with >= 1000 consensus sequences. MMseqs2 then uses every online CPU of the node (ignoring OMP_NUM_THREADS and CPU affinity) and crashes when its thread count exceeds the size of an abstar sub-query batch (seen: 256 threads vs 67 sequences, 32 threads vs a C-region batch of 31). New run() argument mmseqs_threads (default 1, CLI --mmseqs_threads), always passed explicitly. Annotation is not the bottleneck. Results do not depend on the thread count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
correct_barcodes.run annotates the raw input and passed mmseqs_threads=None once the input had >= 1000 reads: the same MMseqs2 all-node-CPUs crash as in run(). Tests: correct-barcodes case added; the large-well test now uses 2 workers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bnemoz
added a commit
that referenced
this pull request
Nov 17, 2026
…e tso_g_max/legacy) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bnemoz
added a commit
that referenced
this pull request
Nov 17, 2026
…alongside barcode_prefer_exact/legacy) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Problem
For wells with at least 1000 consensus sequences,
run()passedmmseqs_threads=Nonetoabstar.run. MMseqs2 then starts one thread per online CPU of the node. It ignoresOMP_NUM_THREADSand CPU affinity, and it crashes whenever its thread count is larger than an abstar sub-query batch. We saw this on the 240-core pod: 256 threads against 67 sequences, and 32 threads against a C-region batch of 31.Fix
run()argumentmmseqs_threads: int = 1, with CLI option--mmseqs_threads(≥1). It is documented in the docstring and is now always passed toabstar.run. The< 1000/Nonebranch is gone.ValueErrorat the start ofrun().pairplex correct-barcodes(correct_barcodes.py) had the same bug, and hits it sooner: it annotates the raw input reads and passedNoneonce a file had ≥1000 reads. It now passesmmseqs_threads=1(second commit).Results unchanged, so no benchmark
The thread count does not change annotation output. The benchmark harness already rewrites
Noneto 1, sov2-basebenchmark numbers were produced with 1 thread anyway. This PR is therefore checked with tests and a smoke run only, without a benchmark. This option is not tied tolegacy: forcingNoneback would only bring the crash back, with no change to output.Tests
pairplex/tests/test_run_annotation.pymocksabstar.run:mmseqs_threads=1. Onv2-basecode this test fails withassert None == 1;correct_barcodes.runon 1212 reads passesmmseqs_threads=1. Onv2-basethis fails withassert None == 1.Smoke run (2 SimPlex wells,
PAIRPLEX_MAX_WORKERS=8)Annotated outputs (sequence_id, V/J genes, junction; paired and unpaired) are identical at 1 and 8 threads. Most of the per-well annotation time is fixed overhead, so 1 thread costs about 2 s per well here.
🤖 Generated with Claude Code