Closed cohnt closed 1 week ago
+@sammy-tri for platform review please
@drake-jenkins-bot linux-jammy-clang-bazel-experimental-thread-sanitizer please @drake-jenkins-bot linux-jammy-clang-bazel-experimental-valgrind-memcheck please @drake-jenkins-bot linux-jammy-clang-bazel-experimental-undefined-behavior-sanitizer please @drake-jenkins-bot linux-jammy-clang-bazel-experimental-address-sanitizer please
Thanks for tracking down the root cause! Should we document somewhere that this is a footgun one needs to worry about when deprecating (potentially) multithreaded code?
bindings/pydrake/geometry/geometry_py_optimization.cc
line 1463 at r1 (raw file):
... there's a call into
WarnDeprecated
when the function is run, which tries to redirect the output through python with the GIL released, and there's our segfault.Thanks for tracking down the root cause! Should we document somewhere that this is a footgun one needs to worry about when deprecating (potentially) multithreaded code?
It was a bug in the wrapper, so we'll fix the bug (and then no docs needed):
=> #22195
Closes #21351. (Although once we have a
parallelism
option added to GCS, as is being discussed in #21965, we should make sure that gets plumbed through.)Note that the parallelism here is used in two ways -- the computation of AABBs of the constituent sets is handled with a parallel for loop, and then the pairwise intersections themselves are checked with
SolveInParallel
.This leads to significant speedups, especially on faster graphs. With 224 sets (resulting in 5928 edges), we have the following computation times:
With 1120 sets (resulting in 152680 edges), we have the following computation times:
(This is on my personal computer, with 20 threads.)
+@sadraddini for feature review, if you have the time.
This change is