We've moved!
This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!

GenotypeGVCF error: what():  std::bad_alloc

I have run GenotypeGVCF for 1200 samples across 27 chromosomes. I get vcf output for 24 of the chromosomes but 3. See my command and log below. I get this error for 2 chromosomes while the third just stops at the 'initialising engine' stage. I have submitted my job to a linux cluster and have used the same command for all chromosomes. I have tried to re-run this 3 chromosomes by giving additional memory but I get the same error.

Using GATK jar /share/apps/gatk-
    java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -Xmx52g -Xms52g
-jar /share/apps/gatk- GenotypeGVCFs
-V gendb:///GVCF_databases/Chrom4_GVCF_database
-O /VCF_output_by_chrom/Chrom4.vcf.gz
-R Reference_genome.fasta --use-new-qual-calculator --tmp-dir /home/Chrom4
18:22:09.545 INFO  NativeLibraryLoader - Loading libgkl_compression.so from jar:file:/share/apps/gatk-!/com/intel/gkl/native/libgkl_compression.so
Sep 13, 2019 6:22:12 PM shaded.cloud_nio.com.google.auth.oauth2.ComputeEngineCredentials runningOnComputeEngine
INFO: Failed to detect whether we are running on Google Compute Engine.
18:22:12.782 INFO  GenotypeGVCFs - ------------------------------------------------------------
18:22:12.783 INFO  GenotypeGVCFs - The Genome Analysis Toolkit (GATK) v4.1.2.0
18:22:12.783 INFO  GenotypeGVCFs - For support and documentation go to https://software.broadinstitute.org/gatk/
18:22:12.783 INFO  GenotypeGVCFs - Executing as [email protected] on Linux v3.10.0-957.12.2.el7.x86_64 amd64
18:22:12.783 INFO  GenotypeGVCFs - Java runtime: Java HotSpot(TM) 64-Bit Server VM v1.8.0_131-b11
18:22:12.784 INFO  GenotypeGVCFs - Start Date/Time: 13 September 2019 18:22:09 BST
18:22:12.784 INFO  GenotypeGVCFs - ------------------------------------------------------------
18:22:12.784 INFO  GenotypeGVCFs - ------------------------------------------------------------
18:22:12.784 INFO  GenotypeGVCFs - HTSJDK Version: 2.19.0
18:22:12.784 INFO  GenotypeGVCFs - Picard Version: 2.19.0
18:22:12.785 INFO  GenotypeGVCFs - HTSJDK Defaults.COMPRESSION_LEVEL : 2
18:22:12.785 INFO  GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_READ_FOR_SAMTOOLS : false
18:22:12.785 INFO  GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_SAMTOOLS : true
18:22:12.785 INFO  GenotypeGVCFs - HTSJDK Defaults.USE_ASYNC_IO_WRITE_FOR_TRIBBLE : false
18:22:12.785 INFO  GenotypeGVCFs - Deflater: IntelDeflater
18:22:12.785 INFO  GenotypeGVCFs - Inflater: IntelInflater
18:22:12.786 INFO  GenotypeGVCFs - GCS max retries/reopens: 20
18:22:12.786 INFO  GenotypeGVCFs - Requester pays: disabled
18:22:12.786 INFO  GenotypeGVCFs - Initializing engine
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc


  • bhanuGandhambhanuGandham Cambridge MAMember, Administrator, Broadie, Moderator admin

    Hi @fmlad

    We think this could be due to memory availability. Here are a couple of things you can try to resolve this error:
    1) reduce the memory allocated. Try 40G, 30G, 20G, 10G.
    2) Try to split the chromosomes that are causing the error and run them separately.
    Let me know if this helps with the error.
    What is the physical memory available on the machine you are using?

Sign In or Register to comment.