View Single Post
Old 05-08-2014, 08:29 AM   #39
WhatsOEver
Senior Member
 
Location: Germany

Join Date: Apr 2012
Posts: 215
Default

Quote:
Originally Posted by Brian Bushnell View Post
WhatsOEver,

Normally, "Reducing threads from 16 to 15 due to low system memory." only occurs if you are right at the edge of the memory limits. It would be helpful to know:
1) The amount of physical memory available (it looks like 64GB, is that correct?)
2) The size of the reference you are using.
3) Whether you are mapping with bbmap.sh or mapPacBio8k.sh
4) The complete stack trace that comes after the error message "java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space". Actually, the entire standard error output would be helpful.

You can reduce the amount of memory BBMap needs by reducing the number of threads (e.g. "t=8" to drop it to 8 threads). But that normally will only help with pacbio modes which need much more memory per thread (100s of megs), not with standard bbmap which only uses around 25MB per thread.

Assuming you do have 64GB, I would try with the flag -Xmx58g and see if that works. But regardless, it would help if you could post the above details.

Thanks,
Brian
Hi Brian,

it was indeed increasing Xmx to 58g which did the trick. The threads (t) parameter, however, didn't help at all. So, when I run with -Xmx58g everything works fine (independent of t=8 or t=16 or leaving t=auto). When I run with -Xmx30g and t=auto the prog quits with the following error:

concerning your questions:
1) The amount of physical memory available (it looks like 64GB, is that correct?)
yes
2) The size of the reference you are using.
its the human genome assembly 19 from UCSC (~3.1Gb)
3) Whether you are mapping with bbmap.sh or mapPacBio8k.sh
mapPacBio8k.sh
4) The complete stack trace that comes after the error message "java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap
see quotes below

Quote:
java -ea -Xmx30g -cp /projects/bbmap/current/ align2.BBMapPacBio build=1 overwrite=true minratio=0.40 fastareadlen=6000 ambiguous=best minscaf=100 startpad=10000 stoppad=10000 midpad=6000 k=14 in=./121128_1.fastq out=/projects/testData/bbmap_121128_1_mapped.sam xstag=unstranded xmtag=t ambig=all maxindel=200000 qin=33 -Xmx30g
Executing align2.BBMapPacBio [build=1, overwrite=true, minratio=0.40, fastareadlen=6000, ambiguous=best, minscaf=100, startpad=10000, stoppad=10000, midpad=6000, k=14, in=./121128_1.fastq, out=/projects/testData/bbmap_121128_1_mapped.sam, xstag=unstranded, xmtag=t, ambig=all, maxindel=200000, qin=33, maxindel=150000, -Xmx30g]

BBMap version 32.14
Set overwrite to true
Set MINIMUM_ALIGNMENT_SCORE_RATIO to 0.400
Set fastq input ASCII offset to 33
Retaining all best sites for ambiguous mappings.
Set genome to 1

Loaded Reference: 6.143 seconds.
Loading index for chunk 1-7, build 1
Generated Index: 9.693 seconds.
Analyzed Index: 24.885 seconds.
Started output stream: 0.038 seconds.
Cleared Memory: 0.530 seconds.

Max Memory = 28633 MB
Available Memory = 10826 MB
Reducing threads from 16 to 15 due to low system memory.
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at align2.MultiStateAligner9PacBio.<init>(MultiStateAligner9PacBio.java:73)
at align2.MSA.makeMSA(MSA.java:43)
at align2.AbstractMapThread.<init>(AbstractMapThread.java:130)
at align2.BBMapThreadPacBio.<init>(BBMapThreadPacBio.java:100)
at align2.BBMapPacBio.testSpeed(BBMapPacBio.java:378)
at align2.BBMapPacBio.main(BBMapPacBio.java:33)
Detecting finished threads: 0, 1, 2, 3, 4, 5, 6

**************************************************************************

Warning! 15 mapping threads did not terminate normally.
Please check the error log; the output may be corrupt or incomplete.

**************************************************************************


Exception in thread "main" java.lang.RuntimeException: Aborting due to prior error.
at align2.AbstractMapper.abort(AbstractMapper.java:69)
at align2.BBMapPacBio.testSpeed(BBMapPacBio.java:381)
at align2.BBMapPacBio.main(BBMapPacBio.java:33)
When I run it with -Xmx30g and t=8 I get the same heap space error, although its not complaining that there is not enough memory available

Quote:
java -ea -Xmx30g -cp /projects/bbmap/current/ align2.BBMapPacBio build=1 overwrite=true minratio=0.40 fastareadlen=6000 ambiguous=best minscaf=100 startpad=10000 stoppad=10000 midpad=6000 k=14 t=8 in=./121128_1.fastq out=/projects/testData/bbmap_121128_1_mapped.sam xstag=unstranded xmtag=t ambig=all maxindel=200000 qin=33 -Xmx30g
Executing align2.BBMapPacBio [build=1, overwrite=true, minratio=0.40, fastareadlen=6000, ambiguous=best, minscaf=100, startpad=10000, stoppad=10000, midpad=6000, k=14, t=8, in=./121128_1.fastq, out=/projects/testData/bbmap_121128_1_mapped.sam, xstag=unstranded, xmtag=t, ambig=all, maxindel=200000, qin=33, maxindel=150000, -Xmx30g]

BBMap version 32.14
Set overwrite to true
Set MINIMUM_ALIGNMENT_SCORE_RATIO to 0.400
Set threads to 8
Set fastq input ASCII offset to 33
Retaining all best sites for ambiguous mappings.
Set genome to 1

Loaded Reference: 5.773 seconds.
Loading index for chunk 1-7, build 1
Generated Index: 9.148 seconds.
Analyzed Index: 27.428 seconds.
Started output stream: 0.015 seconds.
Cleared Memory: 0.511 seconds.
java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space
at align2.MultiStateAligner9PacBio.<init>(MultiStateAligner9PacBio.java:73)
at align2.MSA.makeMSA(MSA.java:43)
at align2.AbstractMapThread.<init>(AbstractMapThread.java:130)
at align2.BBMapThreadPacBio.<init>(BBMapThreadPacBio.java:100)
at align2.BBMapPacBio.testSpeed(BBMapPacBio.java:378)
at align2.BBMapPacBio.main(BBMapPacBio.java:33)
Detecting finished threads: 0, 1, 2, 3, 4, 5

**************************************************************************

Warning! 8 mapping threads did not terminate normally.
Please check the error log; the output may be corrupt or incomplete.

**************************************************************************


Exception in thread "main" java.lang.RuntimeException: Aborting due to prior error.
at align2.AbstractMapper.abort(AbstractMapper.java:69)
at align2.BBMapPacBio.testSpeed(BBMapPacBio.java:381)
at align2.BBMapPacBio.main(BBMapPacBio.java:33)
WhatsOEver is offline   Reply With Quote