rivetTDA / rivet

RIVET is a tool for Topological Data Analysis, in particular two-parameter persistent homology.
GNU General Public License v3.0
73 stars 24 forks source link

Segmentation fault for bifiltration inputs with multiple bigrades of appearance #168

Closed Mishalassif closed 1 year ago

Mishalassif commented 1 year ago

Hello! I keep getting a segmentation fault when I run rivet with a bifiltration input with multiple bigrades of appearance. The following simple bifiltration leads to a crash:

--datatype bifiltration --xlabel time --ylabel distance

#data starts here 0 ; 0 0 1 ; 0 0 2 ; 0 0 0 1 ; 1 2 2 1 0 2 ; 1 1 1 2 ; 1 1

The crash occurs only in homology 1, homology 0 seems to work fine. The problem occurs when computing the minimal presentation using ./rivet_console ~/Documents/Projects/traj-space/src/bifilt_test.txt --minpres -H 1. The issue doesn't appear when using the Koszul algorithm to compute the betti numbers alone.

I also tried reversing the order of minimal bigrades to 0 1 ; 2 1 1 2 but the issue persists.

mlesnick commented 1 year ago

Thank you. I have a possible fix, but I am unable to test it right now (or anytime in the next couple of days). https://github.com/rivetTDA/rivet/pull/169 If you have a chance, please check whether this solves your problem.

mlesnick commented 1 year ago

I did have a chance to test this, albeit only very lightly. It looks to fix the problem. I've merged the fix. Please let us know if you encounter any other issues.