ablab / spades

SPAdes Genome Assembler
http://ablab.github.io/spades/
Other
745 stars 135 forks source link

SPAdes -- running out of RAM #694

Closed amanpruthi15 closed 3 years ago

amanpruthi15 commented 3 years ago

== Error == system call for: "['/home/apruthi/anaconda3/envs/Spades/bin/spades-hammer', '/lustre/scratch/apruthi/spades/spades_filtered/corrected/configs/config.info']" finished abnormally, OS return value: 12

It stilll says running out of memory even when I am allocating 512G of RAM to SPAdes. I have the same number of reads in the left and right read files. Do you have any suggestions?

asl commented 3 years ago

Please attach the spades.log file as you were instructed in the error message. In the line you posted (as you could easily see) there is nothing about out of memory.

amanpruthi15 commented 3 years ago

spades.log Command line: /home/apruthi/anaconda3/envs/Spades/bin/spades.py --nanopore /lustre/scratch/joh97948/bryum_filtered.fq -1 /lustre/scratch/apruthi/fastp_DNA/Female_R1_paired.fq -2 /lustre/scratch/apruthi/fastp_DNA/Female_R2_paired.fq -t 128 --careful -o /lustre/scratch/apruthi/spades/spades_filtered

System information: SPAdes version: 3.15.2 Python version: 3.7.10 OS: Linux-4.18.0-147.8.1.el8_1.x86_64-x86_64-with-centos-8.1.1911-Core

Output dir: /lustre/scratch/apruthi/spades/spades_filtered Mode: read error correction and assembling Debug mode is turned OFF

Dataset parameters: Standard mode For multi-cell/isolate data we recommend to use '--isolate' option; for single-cell MDA data use '--sc'; for metagenomic data use '--meta'; for RNA-Seq use '--rna'. Reads: Library number: 1, library type: nanopore left reads: not specified right reads: not specified interlaced reads: not specified single reads: ['/lustre/scratch/joh97948/bryum_filtered.fq'] merged reads: not specified Library number: 2, library type: paired-end orientation: fr left reads: ['/lustre/scratch/apruthi/fastp_DNA/Female_R1_paired.fq'] right reads: ['/lustre/scratch/apruthi/fastp_DNA/Female_R2_paired.fq'] interlaced reads: not specified single reads: not specified merged reads: not specified Read error correction parameters: Iterations: 1 PHRED offset will be auto-detected Corrected reads will be compressed Assembly parameters: k: automatic selection based on read length Repeat resolution is enabled Mismatch careful mode is turned ON MismatchCorrector will be used Coverage cutoff is turned OFF Other parameters: Dir for temp files: /lustre/scratch/apruthi/spades/spades_filtered/tmp Threads: 128 Memory limit (in Gb): 250

======= SPAdes pipeline started. Log can be found here: /lustre/scratch/apruthi/spades/spades_filtered/spades.log

/lustre/scratch/apruthi/fastp_DNA/Female_R1_paired.fq: max reads length: 251 /lustre/scratch/apruthi/fastp_DNA/Female_R2_paired.fq: max reads length: 251

Reads length: 251

Default k-mer sizes were set to [21, 33, 55, 77, 99, 127] because estimated read length (251) is equal to or greater than 250

===== Before start started.

===== Read error correction started.

===== Read error correction started.

== Running: /home/apruthi/anaconda3/envs/Spades/bin/spades-hammer /lustre/scratch/apruthi/spades/spades_filtered/corrected/configs/config.info

0:00:00.000 1M / 17M INFO General (main.cpp : 75) Starting BayesHammer, built from N/A, git revision N/A 0:00:00.062 1M / 17M INFO General (main.cpp : 76) Loading config from /lustre/scratch/apruthi/spades/spades_filtered/corrected/configs/config.info 0:00:00.094 1M / 17M INFO General (main.cpp : 78) Maximum # of threads to use (adjusted due to OMP capabilities): 128 0:00:00.105 1M / 17M INFO General (memory_limit.cpp : 48) Memory limit set to 250 Gb 0:00:00.124 1M / 17M INFO General (main.cpp : 86) Trying to determine PHRED offset 0:00:00.133 1M / 17M INFO General (main.cpp : 92) Determined value is 33 0:00:00.143 1M / 17M INFO General (hammer_tools.cpp : 38) Hamming graph threshold tau=1, k=21, subkmer positions = [ 0 10 ] 0:00:00.155 1M / 17M INFO General (main.cpp : 113) Size of aux. kmer data 24 bytes === ITERATION 0 begins === 0:00:00.173 1M / 17M INFO General (kmer_index_builder.hpp : 243) Splitting kmer instances into 16 files using 128 threads. This might take a while. 0:00:00.186 1M / 17M INFO General (file_limit.hpp : 32) Open file limit set to 1024 0:00:00.204 1M / 17M INFO General (kmer_splitter.hpp : 93) Memory available for splitting buffers: 0.651041 Gb 0:00:00.217 1M / 17M INFO General (kmer_splitter.hpp : 101) Using cell size of 4194304 0:00:00.578 73G / 73G INFO K-mer Splitting (kmer_data.cpp : 97) Processing /lustre/scratch/apruthi/fastp_DNA/Female_R1_paired.fq 0:01:59.621 73G / 82G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 12421523 reads 0:04:25.525 73G / 106G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 28449182 reads 0:06:41.746 73G / 106G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 42830597 reads 0:09:04.006 73G / 106G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 58017319 reads 0:11:16.690 73G / 106G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 71903609 reads 0:13:46.480 73G / 106G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 86429001 reads 0:16:08.289 73G / 106G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 100045686 reads 0:18:32.975 73G / 106G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 115348432 reads 0:21:09.635 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 131930003 reads 0:23:12.391 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 144866705 reads 0:25:28.313 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 159596938 reads 0:26:24.812 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 164621232 reads 0:26:24.826 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 97) Processing /lustre/scratch/apruthi/fastp_DNA/Female_R2_paired.fq 0:29:00.709 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 180274337 reads 0:45:45.464 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 107) Processed 273536247 reads 0:55:16.257 73G / 111G INFO K-mer Splitting (kmer_data.cpp : 112) Total 329242464 reads processed 0:55:16.268 1M / 111G INFO General (kmer_index_builder.hpp : 249) Starting k-mer counting. 0:55:16.435 1M / 111G ERROR General (mmapped_reader.hpp : 52) mmap(2) failed. Reason: Cannot allocate memory. Error code: 12 0:55:16.435 1M / 111G ERROR General (mmapped_reader.hpp : 52) mmap(2) failed. Reason: Cannot allocate memory. Error code: 12

== Error == system call for: "['/home/apruthi/anaconda3/envs/Spades/bin/spades-hammer', '/lustre/scratch/apruthi/spades/spades_filtered/corrected/configs/config.info']" finished abnormally, OS return value: 12

In case you have troubles running SPAdes, you can write to spades.support@cab.spbu.ru or report an issue on our GitHub repository github.com/ablab/spades Please provide us with params.txt and spades.log files from the output directory.

SPAdes log can be found here: /lustre/scratch/apruthi/spades/spades_filtered/spades.log

Thank you for using SPAdes!

asl commented 3 years ago

Let us read the log together, shall we? The log says:

0:55:16.435 1M / 111G ERROR General (mmapped_reader.hpp : 52) mmap(2) failed. Reason: Cannot allocate memory. Error code: 12

So, you're running out of RAM. It might be possible that you allocated 512 Gb of RAM for SPAdes, however, you did not inform SPAdes for this – the specified memory limit (-m option) is set to 250 Gb by default