torognes / swarm

A robust and fast clustering method for amplicon-based studies
GNU Affero General Public License v3.0
121 stars 23 forks source link

swarm 3.0 Floating point exception for bloom-bits values 2, 3 and 4 #137

Closed frederic-mahe closed 4 years ago

frederic-mahe commented 4 years ago

These tests pass with swarm 2.2, but not with swarm 3.0:

scripts/test_options.sh: line 574: 19133 Done                    printf ">s1_3\nAA\n>s2_1\nCC\n"
     19134 Floating point exception| "${SWARM}" -f -y ${y} > /dev/null 2>&1
FAIL: swarm aborts when --bloom-bits equals 2
scripts/test_options.sh: line 574: 19137 Done                    printf ">s1_3\nAA\n>s2_1\nCC\n"
     19138 Floating point exception| "${SWARM}" -f -y ${y} > /dev/null 2>&1
FAIL: swarm aborts when --bloom-bits equals 3
scripts/test_options.sh: line 574: 19141 Done                    printf ">s1_3\nAA\n>s2_1\nCC\n"
     19142 Floating point exception| "${SWARM}" -f -y ${y} > /dev/null 2>&1
FAIL: swarm aborts when --bloom-bits equals 4

just try this command line to replicate the issue:

printf ">s1_3\nAA\n>s2_1\nCC\n" | swarm -f -y 2
frederic-mahe commented 4 years ago

Note: these are the only tests that fail with swarm 3.0.

torognes commented 4 years ago

Should be fixed now in commit 90acfc55344e32c376d7db7608f898e844c51ea1.

The problem appeared when the size of the Bloom filter was less than 64 bits in total. Will now be adjusted up to at least 64 bits.

frederic-mahe commented 4 years ago

Perfect, now swarm 3.0 passes all unit tests. Nice work!