Why am I doing this? To support OpenMP for base-clang and ports-gcc. Why all these patches? When OpenMP is supported, patched ports/ can build correctly, leaving OpenMP disabled for those ports. Afterwards, porters can choose to enable it.
What next? Hopefully, patches to disable OpenMP for a few ports are all applied, followed by a patch to ports-gcc and a new libomp (or update to base-clang) for clang. These last two steps result in OpenMP working on clang and gcc-ports compilers when requested. Otherwise, no unexpected behaviours in ports. Other questions: Is OpenMP faster? Yes, for code written for it. OpenMP applies multiple cores to one code fragment resulting in clear speedup. If the code is good (and there are bad examples out there) it is correct and faster. Is it stable? Since it is userland, and OpenMP implementations elsewhere are stable, very likely so on OpenBSD. Does it rely on kernel SMP? No. It's pthreads but the code is simpler to read and write. Does it work properly on OpenBSD? Some GNU configure scripts assume that if it is present that therefore it should be used. Nope. Patches will fix that. Otherwise, for packages like z3, sample boost/odeint, it does work faster on OpenBSD at runtime. Things will need some testing before it should be enabled on a per-port basis. How did you create these patches? I've checked (tested on amd64) many of the ports for OpenBSD -current: - all github-hosted ports - all pypi-hosted ports - all astro/ audio/ cad/ devel/ math/ multimedia/ security/ ports I have assumed that scripting languages and related packages do not use OpenMP. Languages such as: ruby, perl, python, php, lua. And ports such as go-, hs- (haskell), mono-. Status: The following have patches tested and published by me on amd64: audio/clementine audio/libsoxr devel/gettext (applied by @naddy) graphics/libraw math/R (applied by @feinerer) math/ecm math/fftw math/fftw3 math/z3 (applied by @rsadowski) and emulators/vbam discovered by Charlene; not applied For supporting OpenMP by ports-gcc, I've published a patch to PLIST to add the gcc OpenMP runtime libgomp. For clang 8.0, I'll publish a package for the support library libomp. (Smarter people than me can decide if such a new port is needed or clang should have built-in OpenMP support. And when.) The following packages already have OpenMP turned off as indicated. This is specifically; by an OpenBSD patch; or by default: archivers/zstd defaulted audio/soundtouch defaulted audio/sox off cad/ngspice defaulted devel/bullet off devel/cryptopp patched geo/osrm-backend defaulted graphics/darktable off graphics/gd defaulted graphics/lensfun defaulted graphics/libmypaint defaulted graphics/tesseract defaulted math/mlpack defaulted math/suitesparse defaulted security/john defaulted security/john-jumbo defaulted The following are source code packages (header files or modules) and while they support OpenMP this is up to the user (programmer) to choose to enable. So don't turn on or off:: math/armadillo math/boost (specifically odeint) math/eigen3
