diff --git a/CHANGELOG.md b/CHANGELOG.md index b6e4893..f103273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,6 +99,11 @@ Sections commonly used: Features, Bug fixes, Other changes. ### Bug fixes +- `--runThreadN 1` ran on every logical core instead of on one. The + rayon pool was configured only above 1, and skipping it leaves rayon's + default of one worker per core. Output is unchanged; the run now uses + the thread count asked for. + - **STARsolo `Gene` assignment now requires exon concordance**, matching STARsolo: a read counts toward a gene only when every aligned block lies within the gene's exons, rather than merely overlapping one. This diff --git a/src/lib.rs b/src/lib.rs index 6fce173..8a07f5f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -68,11 +68,13 @@ pub fn run(params: &Parameters) -> anyhow::Result<()> { // RSS for nothing. `build_global` errors if called twice; we // ignore the error so the in-process tests that already // initialised the pool still work. - if usize::from(params.run_thread_n) > 1 { - let _ = rayon::ThreadPoolBuilder::new() - .num_threads(params.run_thread_n.into()) - .build_global(); - } + // + // Configured at every value, `1` included. Skipping the build at 1 does not + // yield one thread: it leaves rayon's default of one worker per logical + // core, so `--runThreadN 1` ran on the whole machine. + let _ = rayon::ThreadPoolBuilder::new() + .num_threads(params.run_thread_n.into()) + .build_global(); match params.run_mode { RunMode::GenomeGenerate => genome_generate(params),