Skip to content

Commit 3a8bec1

Browse files
Update CMake options and README
1 parent 8f0cd37 commit 3a8bec1

File tree

8 files changed

+23
-18
lines changed

8 files changed

+23
-18
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.15)
2-
project(capi VERSION 0.1)
2+
project(capi VERSION 0.2)
33

44
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
55
set(CMAKE_VERBOSE_MAKEFILE ON)

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ It consists of two major components:
1010
- A selection tool, that creates ICs tailored to the target code and measurement objective.
1111
- A runtime library, enabling runtime-adaptable binary instrumentation based on [LLVM XRay](https://llvm.org/docs/XRay.html).
1212

13-
14-
1513
CaPI currently supports the following measurement APIs:
1614
- GNU interface: compatible with GCC's `-finstrument-functions`
1715
- TALP (part of the DLB library): Parallel performance metrics of MPI regions
@@ -27,18 +25,25 @@ This project is currently in a pre-release state, frequent changes to the code a
2725
- ScoreP >=7 (optional)
2826
- DLB 3.3 (optional, other versions may work)
2927
- Extrae 3.8.3 (optional, other versions may work)
28+
- LLVM-Lit (testing only)
3029

3130
## Build
32-
You can build CaPI as follows ([Ninja](https://github.com/ninja-build/ninja) is not required and can be substituted with `make`).
31+
CaPI is built as follows ([Ninja](https://github.com/ninja-build/ninja) is not required and can be substituted with `make`).
3332
```
3433
mkdir build && cd build
35-
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DDLB_DIR=$(which dlb)/../.. -DSCOREP_PATH=$(which scorep)/../.. ..
34+
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DDLB_DIR=$(which dlb)/../.. -DSCOREP_DIR=$(which scorep)/../.. ..
3635
ninja
3736
```
38-
Options
39-
- `ENABLE_TALP=ON/OFF`: Enable/Disable support for TALP interface. Default is `ON`.
40-
- `ENABLE_XRAY=ON/OFF`: Enable/Disable support for runtime-adaptable instrumentation with LLVM XRay. Default is `ON`.
4137

38+
CMake Options
39+
- `ENABLE_TALP=ON/OFF`: Enable/Disable support for TALP. Default is `ON`.
40+
- `DLB_DIR`: Path to DLB installation.
41+
- `ENABLE_SCOREP=ON/OFF`: Enable/Disable support for Score-P. Default is `ON`.
42+
- `SCOREP_DIR`: Path to Score-P installation.
43+
- `ENABLE_EXTRAE=ON/OFF`: Enable/Disable support for Extrae. Default is `ON`.
44+
- `ENABLE_XRAY=ON/OFF`: Enable/Disable support for runtime-adaptable instrumentation with LLVM XRay. Default is `ON`.
45+
- `ENABLE_TESTING=ON/OFF`: Enable/Disable testing. Requires MetaCG and LLVM-Lit.
46+
- Set `metacg_DIR` to MetaCG installation directory.
4247
## Examples
4348
To verify your build, you may test out the instrumentation of proxy applications LULESH and AMG in the `example` folder (located in your current build directory).
4449
For details, refer to `CAPI_README` in the `lulesh` folder.

cmake/ToolchainOptions.cmake

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ if (ENABLE_TESTING)
3939
endif()
4040

4141
option(ENABLE_XRAY "Enable XRay dynamic instrumentation interface" ON)
42-
option(SCOREP_SUPPORT "Enable Score-P support" ON)
42+
option(ENABLE_SCOREP "Enable Score-P support" ON)
4343

44-
if (SCOREP_SUPPORT)
45-
set(SCOREP_PATH "" CACHE PATH "Path to ScoreP installation")
44+
if (ENABLE_SCOREP)
45+
set(SCOREP_DIR "" CACHE PATH "Path to ScoreP installation")
4646

47-
find_library(scorep_mgmt NAMES scorep_adapter_compiler_mgmt HINTS "${SCOREP_PATH}/lib" REQUIRED)
48-
find_library(scorep_measurement NAMES scorep_measurement HINTS "${SCOREP_PATH}/lib" REQUIRED)
47+
find_library(scorep_mgmt NAMES scorep_adapter_compiler_mgmt HINTS "${SCOREP_DIR}/lib" REQUIRED)
48+
find_library(scorep_measurement NAMES scorep_measurement HINTS "${SCOREP_DIR}/lib" REQUIRED)
4949

5050
message(STATUS "Score-P libs: ${scorep_mgmt} ${scorep_measurement}")
5151
endif()

examples/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set(CAPI_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
1111
set(CC_PATH ${LLVM_BINARY_DIR}/bin/clang)
1212
set(CXX_PATH ${LLVM_BINARY_DIR}/bin/clang++)
1313
set(LLVM_CONFIG ${LLVM_BINARY_DIR}/bin/llvm-config)
14-
set(SCOREP_CONFIG ${SCOREP_PATH}/bin/scorep-config)
14+
set(SCOREP_CONFIG ${SCOREP_DIR}/bin/scorep-config)
1515

1616
configure_file(lulesh/Makefile.in lulesh/Makefile @ONLY)
1717

examples/lulesh/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ set(CAPI_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
1111
set(CC_PATH ${LLVM_BINARY_DIR}/bin/clang)
1212
set(CXX_PATH ${LLVM_BINARY_DIR}/bin/clang++)
1313
set(LLVM_CONFIG ${LLVM_BINARY_DIR}/bin/llvm-config)
14-
set(SCOREP_CONFIG ${SCOREP_PATH}/bin/scorep-config)
14+
set(SCOREP_CONFIG ${SCOREP_DIR}/bin/scorep-config)
1515

1616
configure_file(Makefile.in Makefile @ONLY)

lib/xray/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if (ENABLE_TALP)
3636
install(TARGETS capixray_talp ARCHIVE DESTINATION lib)
3737
endif()
3838

39-
if (SCOREP_SUPPORT)
39+
if (ENABLE_SCOREP)
4040
set(CAPI_XRAY_SCOREP_SOURCES ${CAPI_XRAY_SOURCES} GNUInterface.cpp ScorePInit.cpp)
4141
add_library(capixray_scorep STATIC ${CAPI_XRAY_SCOREP_SOURCES})
4242
add_json(capixray_scorep)

scripts/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function(configure_script input output)
1414
set(CAPI_LIB_DIR ${CMAKE_BINARY_DIR}/lib)
1515

1616
set(LLVM_CONFIG ${LLVM_BINARY_DIR}/bin/llvm-config)
17-
set(SCOREP_CONFIG ${SCOREP_PATH}/bin/scorep-config)
17+
set(SCOREP_CONFIG ${SCOREP_DIR}/bin/scorep-config)
1818
set(CC_PATH ${LLVM_BINARY_DIR}/bin/clang)
1919
set(CXX_PATH ${LLVM_BINARY_DIR}/bin/clang++)
2020

test/passes/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function(configure_lit_site_cfg input output)
1212
set(CAPI_MPICC ${CMAKE_BINARY_DIR}/scripts/clang-mpi-inst)
1313
set(CAPI_MPICXX ${CMAKE_BINARY_DIR}/scripts/clang-mpi-inst++)
1414

15-
if (SCOREP_SUPPORT)
15+
if (ENABLE_SCOREP)
1616
set(CAPI_SCOREP_SUPPORT True)
1717
else()
1818
set(CAPI_SCOREP_SUPPORT False)

0 commit comments

Comments
 (0)