eblerjana / pangenie

Pangenome-based genome inference
MIT License
115 stars 10 forks source link

Failed to allocate 17333333368 bytes of memory #52

Closed YiBenqiu closed 1 year ago

YiBenqiu commented 1 year ago

Description:

I'm encountering an issue when running the Pangenie:

Files and parameters used:
-a      0
-c      0
-d      0
-e      3000000000
-g      0
-i      /BIGDATA2/scau_jyang_1/software/EVG-main/test/genotype/PanGenie/test1/test1.fq
-j      10
-k      31
-o      test1
-p      0
-r      /BIGDATA2/scau_jyang_1/software/EVG-main/test/convert/convert.test.fa
-s      test1
-t      10
-u      0
-v      /BIGDATA2/scau_jyang_1/software/EVG-main/test/genotype/PanGenie/test1/test1.vcf
Determine allele sequences ...
Found 1 chromosome(s) from the reference file.
Identified 769 variants in total from VCF-file.
#### Memory usage until now: 0.008824 GB ####
Write path segments to file: test1_path_segments.fasta ...
Found 1 chromosome(s) in the VCF.
#### Memory usage until now: 0.008824 GB ####
Count kmers in reads ...
Histogram peak: 1 (3323)
Computed kmer abundance peak: 1
Count kmers in genome ...
terminate called after throwing an instance of 'jellyfish::large_hash::array_base<jellyfish::mer_dna_ns::mer_base_static<unsigned long, 0>, unsigned long, atomic::gcc, jellyfish::large_hash::unbounded_array<jellyfish::mer_dna_ns::mer_base_static<unsigned long, 0>, unsigned long, atomic::gcc, allocators::mmap> >::ErrorAllocation'
  what():  Failed to allocate 17333333368 bytes of memory.

I am confused by this issue and would appreciate any guidance on how to resolve it.

eblerjana commented 1 year ago

Hi,

the problem is that there is not enough memory on your machine. Per default, PanGenie tries to allocate enough memory needed to efficiently store k-mer counts of a whole human genome. If you just want to run it on a small test sample, parameter -ecan be used to reduce the hash size (see README: https://github.com/eblerjana/pangenie/tree/master#demo).

YiBenqiu commented 1 year ago

Thank you for your advice.