Crash by timers in ScalarNonSquaredErrorTerm since sm::timing not multithreading save
Closed this issue · 2 comments
uschwes commented
The timers in e.g. https://github.com/ethz-asl/aslam_optimizer/blob/master/aslam_backend/src/ScalarNonSquaredErrorTerm.cpp#L24 seem to crash when running the gradient evaluation massively multithreaded.
@HannesSommer Would you rather remove the timers or make sm::timing
multithreading save? I think it's the getHandle()
method https://github.com/ethz-asl/Schweizer-Messer/blob/master/sm_timing/src/Timer.cpp#L29 as well as addTime()
https://github.com/ethz-asl/Schweizer-Messer/blob/master/sm_timing/src/Timer.cpp#L122. A mutex in the Timing
class might help.
uschwes commented
This fixes it: ethz-asl/schweizer_messer#136
uschwes commented
Fixed in ethz-asl/schweizer_messer#136