A hybrid MPI+OpenMP parallel CG solver benchmark.
It is recommended to use GNU Make 4.0 or newer. While older make versions will
work, the generation of the .clangd
configuration for the clang language
server will not work. The default Make version included in MacOS is 3.81! Newer make
versions can be easily installed on MacOS using the
Homebrew package manager.
- Configure the tool-chain and additional options in
config.mk
:
# Supported: GCC, CLANG, ICC
TOOLCHAIN ?= GCC
ENABLE_MPI ?= false
ENABLE_OPENMP ?= false
OPTIONS += -DARRAY_ALIGNMENT=64
OPTIONS += -DOMP_SCHEDULE=static
#OPTIONS += -DDEBUG
#OPTIONS += -DVERBOSE_AFFINITY
#OPTIONS += -DVERBOSE_DATASIZE
#OPTIONS += -DVERBOSE_TIMER
The verbosity options enable detailed output about affinity settings, allocation sizes and timer resolution.
- Build with:
make
You can build multiple tool-chains in the same directory, but notice that the
Makefile is only acting on the one currently set. Intermediate build results are
located in the ./build/<TOOLCHAIN>
directory.
To show all executed commands use:
make Q=
- Clean up intermediate build results for current tool-chain with:
make clean
Clean up all build results for all tool-chains with:
make distclean
- Optional targets:
Generate assembler:
make asm
The assembler files will also be located in the ./build/<TOOLCHAIN>
directory.
Reformat all source files using clang-format
. This only works if
clang-format
is in your path.
make format