Skip to content

Commit

Permalink
Updated the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
eg0000r-pub committed Feb 15, 2024
1 parent 0656736 commit 998aa9b
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,34 @@ set OMP_NUM_THREADS=4

### macOS & LLVM/clang compiler

LLVM/clang compiler has to be used with OpenMP parallelization.
LLVM/clang and OpenMP need to be installed:
```shell
brew install llvm libomp
```
To use LLVM/clang instead of AppleClang with CMake, run:
```shell
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
cmake <path to CMakeLists.txt>
```
The following compiler flags are recommended for best performance:
```
-O3 -fopenmp -flto -march=native
```
The following linker flags are recommended for best performance:
```
-lomp -flto
```
Every time you run your simulation, the number of threads can be set prior to execution with:
```shell
export OMP_NUM_THREADS=4
```

### macOS & AppleClang compiler

The default AppleClang compiler bundled with XCode **is not supported**, because it does
The default AppleClang compiler bundled with XCode **is not supported**, because it does not support
C++ 17 parallel algorithms or OpenMP

## Acknowledgement

Expand Down

0 comments on commit 998aa9b

Please sign in to comment.