unlimited virtual memory and still STAR_2.5.2.b exits with std::bad_alloc error.

693 views
Skip to first unread message

Gokhul Krishna Kilaru

unread,
Sep 28, 2016, 3:35:48 PM9/28/16
to rna-star
Here is my STAR command

/work/bin/STAR/bin/Linux_x86_64/STAR 
--runThreadN 12 
--genomeDir /work/bin/GRCm38/index.star
--readFilesIn fastq-filtered/WT_ZT0_R5.fastq.gz                  
--readFilesCommand zcat                 
--outFilterType BySJout                 
--alignSJoverhangMin 8 --alignSJDBoverhangMin 1                 
--outFilterMismatchNmax 999                 
--alignIntronMin 15 --alignIntronMax 1000000                 
--alignMatesGapMax 1000000 --runRNGseed 8809                 
--outSAMtype BAM Unsorted --sysShell /bin/bash                 
--quantMode TranscriptomeSAM                 
--quantTranscriptomeBan Singleend --genomeSAsparseD 5                 
--outTmpDir scratch/STAR-WT_ZT0-single/tmp --outStd BAM_Unsorted                 
--outFileNamePrefix scratch/STAR-WT_ZT0-single/                 
--outSAMunmapped Within KeepPairs --outReadsUnmapped None  
--outMultimapperOrder Random                 
--outSAMmapqUnique 41 > scratch/alignments/WT_ZT0_STAR_single.bam

Someone on Biostar recommended increasing this value "--genomeSAsparseD" to a higher number to decrease RAM limits. That is why I was using a value of 5.

The virtual memory option in my "ulimit -a" output was set to unlimited and I still get this error. I am using STAR_2.5.2.b.

EXITING: fatal error trying to allocate genome arrays, exception thrown: std::bad_alloc
Possible cause 1: not enough RAM. Check if you have enough RAM 28522411536 bytes
Possible cause 2: not enough virtual memory allowed with ulimit. SOLUTION: run ulimit -v 28522411536

Thanks
~G~ 

Alexander Dobin

unread,
Sep 28, 2016, 5:35:02 PM9/28/16
to rna-star
Hi Ghokul,

bad_alloc may be thrown even if you have "unlimited" virtual memory, I believe it typically happens when the requested memory is larger than available physical + swap.
However, even with large swap going beyond the physical RAM will slow mapping to almost 0 speed.

How much physical RAM do you have? Your genome index will require ~30GB.

However, if you use --genomeSAsparseD <N> at the *genome generation step*, you can reduce the require RAM.
E.g., for 16GB of RAM, you would need --genomeSAsparseD 2

Cheer
Alex
Reply all
Reply to author
Forward
0 new messages