You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gudhi contains several python modules, written in C++, using CGAL, and using pybind11 or nanobind (which implies -fvisibility=hidden on linux). To get reproducible results, users want to be able to set the seed of the random generator. However, each DLL ends up with its own copy of the random generator, get_default_random gives a different pointer in each DLL. That makes things complicated. Some options I see are
Force a unique (per thread) global generator, with things like
Without -fvisibility=hidden, I get the same pointer. But with it, I don't (and my understanding is that windows misbehaves this way whatever the options).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Details
Gudhi contains several python modules, written in C++, using CGAL, and using pybind11 or nanobind (which implies
-fvisibility=hiddenon linux). To get reproducible results, users want to be able to set the seed of the random generator. However, each DLL ends up with its own copy of the random generator,get_default_randomgives a different pointer in each DLL. That makes things complicated. Some options I see areor
plus the corresponding dllexport in one DLL.
-fvisibility=hidden(does not help on windows)get_default_randomcan also take an argument to override it, like many already do?).Do you have other ideas? What do you recommend?
Source Code
If you want to reproduce the behavior with a toy example on linux:
i.h
f.cc
g.cc
m.cc
Without
-fvisibility=hidden, I get the same pointer. But with it, I don't (and my understanding is that windows misbehaves this way whatever the options).Beta Was this translation helpful? Give feedback.
All reactions