Open fangly opened 9 years ago
This patch is working for me, but I am not 100% sure of its correctness:
/srv/sw/papara/2.4$ diff pvec.h.ori pvec.h
549c549,551
< float v = float(v1 / (v1 + v2));
---
> float v;
> if (v1 != 0) {
> v = float(v1 / (v1 + v2));
551,552c553,554
< if( v != v ) {
< std::cerr << "meeeeep: " << v1 << " " << v2 << "\n";
---
> if( v != v ) {
> std::cerr << "meeeeep: " << v1 << " " << v2 << "\n";
554,555c556,560
< throw std::runtime_error("bailing out.");
< }
---
> throw std::runtime_error("bailing out.");
> }
> } else {
> v = v1;
> }
Hi,
I am using Papara 2.4, trying to align a few sequences into Greengenes. I get a "bailing out" error / core dump:
This seems to refer to the function gap_posterior, in which both v1 and v2 are 0, which means that there would be a division/0 problem when calculating v:
Any idea what is going on? I could provide some data if necessary.