ekg / seqwish

alignment to variation graph inducer
MIT License
143 stars 18 forks source link

seqwish is not threadsafe #5

Closed ekg closed 5 years ago

ekg commented 5 years ago

As of 9f75de580c, parallel induction is broken. To reproduce, use this file: chrI.all.fa.txt

minimap2 -x asm20 -m 200 -X -c chrI.all.fa chrI.all.fa >chrI.all.fa.paf
# this is fine
seqwish -s chrI.all.fa -a chrI.all.fa.paf -b chrI.all.fa.paf -t 1 | vg view -Fv - | vg mod -U 10 - >1.vg
# this breaks
seqwish -s chrI.all.fa -a chrI.all.fa.paf -b chrI.all.fa.paf -t 4 | vg view -Fv - | vg mod -U 10 - >2.vg

The error tends to talk about mismatched links and paths:

terminate called after throwing an instance of 'std::runtime_error'
  what():  error [gfa_to_graph]: path chrI_CBS432 : edge 123 = 123R to 121 = 121L is not present. The GFA file is malformed!
ekg commented 5 years ago

This error is also present in 299130ec4a7d951268fbee77b5eaf88c6c623a42, and so doesn't have to do with the mmap changes.

ekg commented 5 years ago

And in 8f51b9cbc0e8944e1da706bc144caf5005086be7, so it doesn't have to do with dmultimap padding.

ekg commented 5 years ago

Writes to SDSL bit vectors are not threadsafe. Resolved by guarding one with an #omp pragma critical block.