dds is restricted to single-threaded operation under MacOS 10.x (Catalina)
tameware opened this issue · 4 comments
Per README.md:
Note that Apple stopped using g++ in Xcode a while back, DDS does compile using the clang compiler, but since DDS does not support pthreads multi-threading, DDS becomes single-threaded. To get OpenMP multi-threading you need to use the Homebrew installer and do:
brew reinstall gcc --without-multilib
The without-multilib is important because you won't get OpenMP otherwise, and that's the whole point. (Thanks to Matthew Kidd for these instructions.)
Alas, --without-multilib is no longer an option. See:
I tried comping with a standard gcc install and got many errors, with or without boost (log on request.) For now, this seems to mean that dds cannot be multi-threaded under MacOS.
This is how I'm able to compile on MacOS:
cd dds/src
make -f Makefiles/Makefile_Mac_clang_shared THREADING=
I don't have access to MacOS. What threading do you have available in your environment? I assume you have at least normal STL threads. If so, could you try to change line 23 in Makefile_Mac_clang_shared to only use $(THR_STL)? All you need is one threading system after all.
That did the trick - thanks again! My unit test now runs in half the time. I'll send a pull request to incorporate this.