Why FreeBSD Doesn't Aim For OpenMP Support Out-Of-The-Box
Written by Michael Larabel in BSD on 29 August 2016 at 11:15 AM EDT. 47 Comments
BSD --
Seen as silly to come, the stock compiler of FreeBSD doesn't (at least not yet) ship with OpenMP support enabled by default.

Beginning from my 2 BSDs vs. 7 Linux distribution benchmarks and continuing through with the recent Clang vs. GCC compiler comparison on FreeBSD 11, there's been a discussion on the FreeBSD mailing list about my benchmarking results and methodology.

The default LLVM Clang performance of FreeBSD when OpenMP isn't being used in an example test.

Now in the thread it looks like there's some productive conversations being had about FreeBSD's compiler defaults, particularly around OpenMP. LLVM Clang is the default compiler of FreeBSD and while Clang has offered OpenMP support for several releases, the FreeBSD build of it doesn't enable the OpenMP support by default, leaving libomp behind. Judging from the FreeBSD mailing list, not everyone is even aware of this decision.

The reported reason for not shipping with OpenMP support enabled by default for FreeBSD's Clang is that nothing in the FreeBSD system makes use of OpenMP. The support can be enabled, but even then by default other packages in FreeBSD's ports collection doesn't even make use of OpenMP when it's present. There appear to be developers on both sides of the table whether it makes sense disabling a compiler feature simply because nothing in the base system makes use of it.

Aside from not aiming for good out-of-the-box performant defaults, it was also pointed out that while various Linux distributions are beginning to pass various compile-time options for their packages to increase security, FreeBSD doesn't appear to be doing much (anything?) with approaching those options for consideration by default and instead just kept with conservative defaults.

The discussion is still ongoing and will hopefully continue to be productive and ideally look at modernizing and re-considering some of the defaults of FreeBSD.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related BSD News
Popular News This Week