BallisticLA / RandBLAS

A header-only C++ library for sketching in randomized linear algebra
https://randblas.readthedocs.io/en/latest/
Other
64 stars 4 forks source link

Update installation guide #86

Closed rileyjmurray closed 1 month ago

rileyjmurray commented 2 months ago

The README and web docs should have an installation guide, and should mention the examples folder.

Note that RandBLAS might be header-only, but if it's configured to use OpenMP then builds can still fail. For example, gcc and g++ on macOS are symlinked to system clang/clang++, which doesn't have OpenMP:

(base) s1104997ca:build rjmurr$ gcc -v
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

So if you want to use OpenMP on macOS then you need to install clang from homebrew:

(base) s1104997ca:build rjmurr$ clang -v
Homebrew clang version 17.0.6
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /opt/homebrew/opt/llvm/bin

From there, you need to run export CC=clang and export CXX=clang++ before running CMake (or otherwise tell CMake to use these compilers).