Skip to content

fix(trim): pass explicit -Xmx to bbduk.sh from job memory - #44

Merged
berntpopp merged 1 commit into
mainfrom
fix/bbduk-xmx
Oct 16, 2026
Merged

berntpopp merged 1 commit into
mainfrom
fix/bbduk-xmx

Conversation

@berntpopp

Copy link
Copy Markdown
Member

#43 fix(trim): pass explicit -Xmx to bbduk.sh from job memory

Problem

workflow/rules/trim.smk:43 calls bbduk.sh without -Xmx. bbduk's auto-detection can compute a negative heap on some SLURM nodes (Invalid maximum heap size: -Xmx-189m), so the job fails after 14 s (seen in the APA v2 run, job 30301342).

Fix

Add -Xmx{int(resources.mem_mb*0.85)}m to the bbduk call, computed from resources.mem_mb as in the other Java rules.

Acceptance

A dry-run shows -Xmx in the bbduk command, and the trim job succeeds on the BIH standard partition.

Related: berntpopp/apa-sequencing#34

🤖 Gemini 4 Argon; reviewed by Codex GPT-6 Astra; adjudicated by Argon.

Compute -Xmx as 85% of resources.mem_mb in trim_adapters so bbduk.sh does not auto-detect a negative heap size on SLURM nodes.

Fixes #43

Co-Authored-By: Gemini 4 Argon <noreply@google.com>
@berntpopp

Copy link
Copy Markdown
Member Author

Final adjudication of the Codex review (Gemini 4 Argon, ponytail): approve

Reviewer reported zero findings and approved the 3-line -Xmx{params.xmx}m BBDuk heap fix for #43. Verified all 130 pytest tests (including dry-run assertion for -Xmx3400m), ruff, and snakefmt pass.

Finding Decision Reason

Tests: 130 passed in pytest (including dry-run and schema validation suites), ruff check passed, snakefmt --check workflow/ passed

@berntpopp
berntpopp merged commit 566b498 into main Oct 16, 2026
2 checks passed
@berntpopp
berntpopp deleted the fix/bbduk-xmx branch October 18, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant