I am running the ReduceReads (GATK version 2.3-9-ge5ebf34) on 14 bam files by chromosome. It runs fine on chr21, chr22, X, Y, and MT. Then it runs out of heap on the others(which is at 32G). Is there a memory leak somewhere? Or should I increase the amount of memory?
java -Xmx32g -Djava.io.tmpdir=/scratch -jar $GATK_PREFIX/GenomeAnalysisTK.jar \ -R $REF \ -T ReduceReads \ -I recal_bams.list \ -L $CHR \ -o reduced/saudi_arabian.$CHR.reduced.bam
INFO 20:49:41,838 ProgressMeter - chr5:44828772 2.54e+08 28.7 h 6.8 m 24.8% 4.8 d 87.0 h
INFO 20:51:22,265 ProgressMeter - chr5:44851724 2.54e+08 28.7 h 6.8 m 24.8% 4.8 d 87.1 h
INFO 20:53:07,958 ProgressMeter - chr5:44851724 2.54e+08 28.7 h 6.8 m 24.8% 4.8 d 87.1 h
INFO 20:56:21,576 ProgressMeter - chr5:44851724 2.54e+08 28.8 h 6.8 m 24.8% 4.8 d 87.3 h
INFO 20:59:56,672 ProgressMeter - chr5:44851724 2.54e+08 28.8 h 6.8 m 24.8% 4.8 d 87.5 h
INFO 21:06:46,367 ProgressMeter - chr5:44851724 2.54e+08 29.0 h 6.8 m 24.8% 4.9 d 87.8 h
INFO 21:20:10,834 ProgressMeter - chr5:44851724 2.54e+08 29.1 h 6.9 m 24.8% 4.9 d 88.3 h
Exception in thread "ProgressMeterDaemon" ##### ERROR ------------------------------------------------------------------------------------------
java.lang.OutOfMemoryError: Java heap space
at java.lang.StringBuilder.toString(StringBuilder.java:405)
at org.broadinstitute.sting.utils.AutoFormattingTime.
**##### ERROR MESSAGE: There was a failure because you did not provide enough memory to run this program. See the -Xmx JVM argument to adjust the maximum heap size provided to Java