Ripser / ripser

Ripser: efficient computation of Vietoris–Rips persistence barcodes
http://ripser.org
MIT License
311 stars 78 forks source link

terminate called after throwing an instance of 'std::bad_alloc' #28

Closed rorondre closed 4 years ago

rorondre commented 4 years ago

I am using Ripser to perform dimension 0 and 1 calculations on a point cloud with between 15k and 20k points in 9-d (the input file is 15 000 x 9 dimensional). However, I've received the error message :

terminate called after throwing an instance of 'std::bad_alloc'

If I try with less points ( 10k points ), I do not get this error. Is it that Ripser has a limit of the number of data point in the point cloud it can handle? Could you please provide an idea of how to go around this, and can it be fixed?

Thank you!

rrrlw commented 4 years ago

Could this be due to exceeding available memory on your local machine with 15,000 points? (instead of an issue with Ripser)

ubauer commented 4 years ago

Dear rorondre,

the exception "std::bad_alloc" means that your computer runs out of memory. 15k points is a lot for Rips complexes, you might still be able to compute 0-dimensional persistence but probably not much more. To compute first homology, you need to consider the 2-skeleton of the full simplex, which has about 500 billion simplices. Maybe using the --threshold option might help. If you really need to work with data sets that large, an option might be to compute approximate barcodes instead of exact ones as in Ripser. A very powerful software package for this purpose is Sparips: https://github.com/bbrehm/Sparips.jl/blob/master/docs/tutorial/sparips_tutorial.md

Best, Uli