kdm9 / kWIP

De novo estimates of genetic relatedness from next-gen sequencing data
https://kwip.readthedocs.org
GNU General Public License v3.0
45 stars 3 forks source link

Runtime error, memory allocation, segmentation foult #16

Closed jregalad closed 8 years ago

jregalad commented 8 years ago

Hi Kevin, I'm trying to run kwip on metgenomic datasets. These are Illumina 2 X 150 paired end reads. I have a total of 90 samples with an average number of 1.5 million read pairs.

Unfortunately I've only been able to run kwip successfully once. I am stumbling with two errors:

kwip version 0.2.0-rc1-6-gd109a13 Calculating entropy weighting vector:

By setting the -t to only 2, I get kwip to start logging the loading of hashes, unfortunately eventually the script dies with segfault.

kwip version 0.2.0-rc1-6-gd109a13 Calculating entropy weighting vector:

I'm running kwip on a cluster with SGE version GE 6.2u5. On 1TB 64 core nodes.

If I run kwip directly on the server, I obtain the same errors.

kdm9 commented 8 years ago

Hi Julian,

Sorry you've encountered this error. I'm still traveling at the moment, so I may be a little slow in debugging this, but lets have a go anyway.

First bit of information I need is the parameters to load-into-counting.py you used to hash reads. This is what determines the amount of memory before. I've seen the std::bad_alloc issue before only when there is insufficient memory (which there may be, 1024GB/64 threads = 16GB/thread isn't super high).

The segfault is a bug. If you're comfortable doing so, could you please post a gdb backtrace? Otherwise, I'll do my best to replicate it. Others have reported similar issues, and I've never been successful in tracing them down. I believe it is an issue with handling an edge case where a bad_alloc happens while reading in the khmer files (a part of khmer's code that we use, not within our code).

One possible test would be to run load-into-counting.py with parameters -N 1 -x 5e9 -k 20 and see if kwip runs successfully. There should be plenty of RAM to deal with this size of dataset. If you get a warning or error about a high false positive rate from khmer, ignore it for now by adding the -f flag to force writing.

Thanks, and sorry you've not had better luck with the software.

Kevin

kdm9 commented 8 years ago

Hi Julian,

Sorry to bug you, but I'm back in Canberra now and was wondering if you resolved this issue? We plan on making the publication release of the software fairly soon and hope to fix any remaining bugs this coming fortnight.

Cheers, Kevin

jregalad commented 8 years ago

Hi Kevin,

Sorry for taking o long to answer. After your last set of instructions kwip ran perfectly. Didn't get any error again. I can still recreate the memory isues if that can help you debug the program. Also, I ran kwip on metagenomic data and it return some very nice results. Let me know if you want to know more about kwip on metagenomes.

best, Julian

kdm9 commented 8 years ago

Good to hear, closing the issue