-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Geoffroy Vallee edited this page Oct 18, 2017
·
4 revisions
Welcome to the libomp wiki!
You can find here all that is required to install and used an OpenMP runtime for LLVM that is PMIx aware. By having a PMIx-aware runtime, it is possible to have communications between the OpenMP, MPI runtimes and the resource manager.
At minimum, please get a checkout of LLVM, CLANG and this repository. You can add more LLVM components but these 3 are required here. Please configure all components following the LLVM documentation.
To build the code, you will need a build script such as:
#!/bin/bash
INSTALL_PATH=$HOME/projects/OMPIX/install/llvm
PATH_TO_PMIX=<path/to/pmix/install/dir>
PATH_TO_LLVM=<path/to/llvm/src>
rm -f CMakeCache.txt
rm -rf CMakeFiles
EXTRA_ARGS=$@
ARGS=(
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_PATH
-DCMAKE_C_COMPILER=gcc
-DCMAKE_CXX_COMPILER=g++
-DPMIX_LIBRARY_DIR:PATH=$PATH_TO_PMIX/lib
-DPMIX_INCLUDE_DIR:PATH=$PATH_TO_PMIX/include
)
cmake $PATH_TO_LLVM "${ARGS[@]}"
Once LLVM compiled and installed, you can compile OpenMP with a Makefile similar to:
all: omp_hello
omp_hello: omp_hello.c
clang -I<path/to/llvm/install/dir>/include -L<path/to/pmix/install>/lib -fopenmp omp_hello.c -lpmix