descartes_light icon indicating copy to clipboard operation
descartes_light copied to clipboard

Increasing the number of threads Seg Faults

Open shloksobti opened this issue 2 years ago • 1 comments

Hi! I'm running into some segfault bugs, where if I attempt to use more than 1 thread, I get pure virtual method called. This is true for all solvers. Do I need to provide an implementation of handling threads? Curious if this is a known issue?

shloksobti avatar Feb 21 '23 16:02 shloksobti

If I remember correctly, all of the unit tests and benchmarks are set to be single-threaded because the BGL classes are not thread-safe. We should probably change them to be single-threaded or add locks around the critical areas, but I don't think that's been done yet.

I think the LadderGraph solver should be thread-safe if the interface implementations are also thread-safe. I believe the implementations provided in this repository should be thread-safe. Our main "real" implementation in tesseract uses the LadderGraph solver, but defaults to being single threaded, so it's possible that we're incorrect here.

Can you provide more detail on the segfault (e.g., line number, etc.) and what solvers, samplers, edge/state evaluators you are using?

marip8 avatar Feb 21 '23 20:02 marip8