'std::bad_alloc'

18 views
Skip to first unread message

Fatallis

unread,
Mar 20, 2011, 7:14:41 PM3/20/11
to gnumap-users
Hello, I am now using your software but I get the foollowing:



fatallis@fatallis-G60J:~/gnumap/bin$ ./gnumap-plain -g '/home/fatallis/
Escritorio/ZmB73_RefGen_v2/chr1.fasta' -o EIChr1 -a .9 -p -v 1 -c 8 -T
1000000 -M 0 --print_all_sam '/home/fatallis/Escritorio/
ZmB73_RefGen_v2/IE-16-30-W3.fasta'
This is GNUMAP, Version 2.2.4, for public and private use.

Command Line Arguments: ./gnumap-plain -g /home/fatallis/Escritorio/
ZmB73_RefGen_v2/chr1.fasta -o EIChr1 -a .9 -p -v 1 -c 8 -T 1000000 -M
0 --print_all_sam /home/fatallis/Escritorio/ZmB73_RefGen_v2/IE-16-30-
W3.fasta
Parameters:
Verbose: 1
Genome file(s): /home/fatallis/Escritorio/ZmB73_RefGen_v2/chr1.fasta
Output file: EIChr1
Printing all SAM records
Sequence file(s): /home/fatallis/Escritorio/ZmB73_RefGen_v2/IE-16-30-
W3.fasta
Align percentage: 90%
Number of threads: 8
Mer size: 10
Using jump size of 5
Using Default Alignment Scores
Gap score: -1
Maximum Gaps: 0

Hashing the genome.
[0/1] gen_size=0, my_start=0, my_end=0
/home/fatallis/Escritorio/ZmB73_RefGen_v2/chr1.fasta
Hashing Genome...
Reading: chromosome:AGPv2:1:1:301354135:1 chromosome 1
...............................................
Size of genome: 301354135
[0/-] Converting to Vector...
[0/-] Trying to create hash of size 1048576
Trying to create entire array of size 2394607504 (299325938 total
positions of size 8)
[0/-] Finished create hash.
[0/-] Stats: Total hashes is 299325938, Longest hash is 41964,
shortest is 2, and average is 285.459459
[0/-] Trying to create a new genome with a size of
301354136...Success!
[0/-] Trying to malloc 37669267 elements for positions
array...Success!
[0/-] Finished Vector Conversion

Time to hash: 64 seconds
Matching 1 file(s):

[-/0] Matching 2147073 sequences of: /home/fatallis/Escritorio/
ZmB73_RefGen_v2/IE-16-30-W3.fasta
Reads per processor: 1024
[0/0] 0% reads complete
[0/0] 1% reads complete
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Abortado
fatallis@fatallis-G60J:~/gnumap/bin$



It creates a 111.9 Mb .sam file with 744560 lines but the last one is
incomplete here I show the last two:

15164-11 16 chromosome:AGPv2:1:1:301354135:1_chromosome_1 300606986 0
22M = 0 0 gaaagagacccggtctttgtga IIIIIIIIIIIIIIIIIIIIII XA:f:22 XP:f:
0.00039093 X0:i:2558
15164-11 16 chromosome:AGPv2:1:1:301354135:1_chromosome_1

of course no .sgr file is created

Can you help me please?? I have no clue what is wrong

Thanks in advance, and best regards,
Fatallis

Nathan Clement

unread,
Mar 21, 2011, 7:48:52 PM3/21/11
to gnumap...@googlegroups.com
This is not something I've seen before. Can you give me a little more information on this? These are all fasta sequences, correct? How long are they (average, min, max)?

I'm wondering if this has to do with a particular sequence that has mapped a huge number of times to the genome. Since you're using multiple processors, there's no way to figure out exactly which sequence caused this to happen. If you'll run it again with only one processor, you can look at the end of the SAM file after it crashes and see which sequence it was having trouble printing (it'll probably be one of the sequences just after the last one that has printed).


Nathan

Fatallis

unread,
Mar 22, 2011, 1:37:34 AM3/22/11
to gnumap-users
Thanks Nathan for your fast answer:

Both the genome and the reads are in fasta format

chr1.fasta is 292.2 Mb (Genome)
IE-16-30-W3.fasta is 68.7 Mb (Reads)

The minimum length of the reads is 16 nt and max is 30 average 24 nt

I ran it with just one processor and finished the task after 13983.8
seconds.

Nathan Clement

unread,
Mar 22, 2011, 4:48:17 PM3/22/11
to gnumap...@googlegroups.com
I can't seem to recreate your issue, but I have a few ideas.

First, do you know if the memory limits on your machine were reached? The error tells me it died "after throwing an instance of 'sgd::bad_alloc'". This generally means the program was unable to allocate more memory for whatever reason. Sometimes this is due to a serious memory leak, but I've run GNUMAP through valgrind several times to search for one and can't find anything.

Do you know how much memory is available when the program dies? If you can find this out, and if the memory used is approaching your machine's limit, this will most likely be at the root of the problem.

If this doesn't solve the problem and it continues to happen, let me know and I can look into it further.

Nathan

Fatallis

unread,
Mar 24, 2011, 12:41:03 PM3/24/11
to gnumap-users
Yes the memory limit was reached, I was using 8Gb RAM, but reducing
the number of processors also reduces the memory used to run the
program
Reply all
Reply to author
Forward
0 new messages