On the mac, you will find that -framework Accelerate
is much faster than -lopenblas
, however, I think you lose some fine control over the multithreading behavior because the apple library does some of its own multithreading internally.
Also, if you need to use some of the single precision blas functions, the apple library has some of the common precision errors that occur in many blas libraries. The openblas library on the Mac does NOT have these errors. This is discussed here. How many BLAS libraries have this error? There is a workaround for these errors, so that is another option. Apple has been notified of these library errors, several years ago now, but I think they still persist because the library test suite also has the error, so if you just correct the error in the library, it appears to fail the tests. One must also correct the test code together with the library code. We all have the K&R C compiler convention to thank for this decades long programmer mess.