Closed daniilvinn closed 5 months ago
Resolved: METIS_PartGraphKway
was called from multiple threads simultaneously which led to an application crash. Performing a graph cut under a lock resolved the issue.
Hmm, I don't think that should be an issue. All the global variables should be thread locals.
@gfaster Still, it solved the issue - I don't get crashes anymore. As far as I know, METIS thread local globals are enabled via CMake thread_local support check - maybe it fails for some reason (I will check). Also worth to mention - for threading I use taskflow library, maybe it handles threads in some special way
Taskflow can operate in a work-stealing mode for asynchronous tasks, but it doesn't seem like that should be an issue since it isn't preemptive.
A few other questions:
METIS_OPTION_ONDISK
?If you're using gcc or clang, I strongly suspect the problem is that -pthread
isn't being passed to the compiler, which I believe is needed for thread locals to work correctly.
Problem: Using
METIS_PartGraphKway
I ran into a problem that led to an application crash with error "Could not find pointer X in mcore" (X is an address). I am not sure if it is the expected behavior for that input data (provided incrash_*.txt
). However, exactly the same setup works for other graphs (data provided incorrect_*.txt
).Steps to reproduce:
options[METIS_OPTION_OBJTYPE] = METIS_OBJTYPE_CUT; options[METIS_OPTION_CCORDER] = 1;