-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory set for samtools sort is incorrect, doesn't account for number of threads #39
Comments
The test case that is failing due to this issue is: https://www.ebi.ac.uk/ena/data/view/PRJNA430225 |
Fix in PR: #40 |
@pansapiens not sure if this is correct fix .. this is that relevant part of code
I can see how this will "fix" the issue of memory assignment, but this isn't correct fix, don't you think? |
Ah, I see, you are correct. I'd missed the fact that What this is saying then, is |
right, just picked at the source and found this
bloody hell
|
so I'm thinking even if I don't multi-thread we still going to face that same out of mem problem... I'll scale down more than |
Essentially the same issue as: samtools/samtools#831
The amount of memory passed to
samtools sort -m
is currently incorrect and results insamtools sort: couldn't allocate memory for bam_mem
errors, or SLURM killing the task due to OOM.The amount of memory used by
samtools sort -m
is per thread, so if we have 4 threads and 8 Gb of memory given to SLURM (sik.config:samtoolsSortMem = 8000000000
), then-m
needs to be 8 Gb / 4 threads = 2 Gb:samtools sort -m 20000000K --threads 4
. If you add the ~85 % overhead fudge factor then it would be (8 / 4) * 0.85 = 17000000K (the fudge factor doesn't seem necessary in this case, based on my quick tests).The text was updated successfully, but these errors were encountered: