broadinstitute / pilon

Pilon is an automated genome assembly improvement and variant detection tool
GNU General Public License v2.0
338 stars 60 forks source link

The error caused by the Xxm**G setting problem, the existence of two types of errors #82

Open Hongchang-Gu opened 5 years ago

Hongchang-Gu commented 5 years ago

hello,excuse me! last week I try to use pilon so as to polish my SMRT assembled contigs.

this is my command: java -jar -Xmx128G pilon-1.23.jar --genome ../pacbio/contigs/sx2.contigs.fasta --frags ../pacbio/contigs/sx_bwa.bam --output sx_pilon_cycle1 --outdir ../pacbio/contigs/sx_pilon --threads 24

and we could find the error as following:

Pilon version 1.23 Mon Nov 26 16:04:05 2018 -0500
Genome: ../pacbio/contigs/sx2.contigs.fasta
Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00002b2cc5080000, 4444389376, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 4444389376 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /vol6/home/quluj/gu/software/hs_err_pid14691.log

I think maybe the memory or the threads that I set is too high , resulting in insufficient server CPU. So I try to reduce my memory and threads, this error always exits until I lowered the parameter to -Xxm48G. Unfortunately, another error occurred at this time.

Pilon version 1.23 Mon Nov 26 16:04:05 2018 -0500
Genome: ../pacbio/contigs/sx2.contigs.fasta
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at org.broadinstitute.pilon.GenomeRegion.<init>(GenomeRegion.scala:45)
    at org.broadinstitute.pilon.GenomeFile.$anonfun$contigRegions$1(GenomeFile.scala:73)
    at org.broadinstitute.pilon.GenomeFile.$anonfun$contigRegions$1$adapted(GenomeFile.scala:73)
    at org.broadinstitute.pilon.GenomeFile$$Lambda$20/1270855946.apply(Unknown Source)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:233)
    at scala.collection.TraversableLike$$Lambda$21/1568059495.apply(Unknown Source)
    at scala.collection.immutable.Range.foreach(Range.scala:155)
    at scala.collection.TraversableLike.map(TraversableLike.scala:233)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:226)
    at scala.collection.AbstractTraversable.map(Traversable.scala:104)
    at org.broadinstitute.pilon.GenomeFile.contigRegions(GenomeFile.scala:73)
    at org.broadinstitute.pilon.GenomeFile.$anonfun$regions$1(GenomeFile.scala:53)
    at org.broadinstitute.pilon.GenomeFile$$Lambda$19/1468357786.apply(Unknown Source)
    at scala.collection.immutable.List.map(List.scala:286)
    at org.broadinstitute.pilon.GenomeFile.<init>(GenomeFile.scala:53)
    at org.broadinstitute.pilon.Pilon$.main(Pilon.scala:102)
    at org.broadinstitute.pilon.Pilon.main(Pilon.scala)

I am helpless with this mistake. HOW SHOULD I DO? What caused this error?

So I hope someone can help me. I will appreciate it if someone can help me solve this problem!

THX A LOT!

Hongchang-Gu commented 5 years ago

I urgently need to solve this problem, I hope I can get help, thank you.

alartin commented 5 years ago

Issue 1: You tried to allocate more mem than physical mem, check your physical mem and reserve some for usage beyond heap Issue 2: The mem you allocated is too small, just increase it, if you don't have enough physical mem, you have to use a more powerful server.