Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/linux_debug_ittnotify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright (c) 2026 The STE||AR Group
# Copyright (c) 2026 Vansh Dobhal
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

name: Linux CI (ITTNotify, Debug)

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
container: stellargroup/build_env:17

steps:
- uses: actions/checkout@v6
- name: Install ITTNotify (ittapi)
shell: bash
run: |
git clone https://github.com/intel/ittapi.git
cmake -S ittapi -B ittapi/build -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PWD/ittapi/install
cmake --build ittapi/build --target install
- name: Configure
shell: bash
env:
AMPLIFIER_ROOT: ${{ github.workspace }}/ittapi/install
run: |
cmake \
. \
-Bbuild \
-GNinja \
-DCMAKE_BUILD_TYPE=Debug \
-DHPX_WITH_MALLOC=system \
-DHPX_WITH_FETCH_ASIO=ON \
-DHPX_WITH_ASIO_TAG=asio-1-34-2 \
-DHPX_WITH_EXAMPLES=ON \
-DHPX_WITH_TESTS=ON \
-DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=2 \
-DHPX_WITH_VERIFY_LOCKS=ON \
-DHPX_WITH_VERIFY_LOCKS_BACKTRACE=ON \
-DHPX_WITH_CHECK_MODULE_DEPENDENCIES=On \
-DHPX_WITH_ITTNOTIFY=ON
- name: Build
shell: bash
run: |
cmake --build build --target all
cmake --build build --target examples
- name: Test
shell: bash
run: |
export LD_LIBRARY_PATH="$GITHUB_WORKSPACE/ittapi/install/lib:$GITHUB_WORKSPACE/ittapi/install/lib64:$LD_LIBRARY_PATH"
cd build
ctest \
--output-on-failure \
--tests-regex tests.examples \
--exclude-regex tests.examples.transpose.transpose_block_numa \
--exclude-regex tests.examples.quickstart.1d_wave_equation
4 changes: 4 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ set(subdirs
transpose
)

if(HPX_WITH_ITTNOTIFY)
set(subdirs ${subdirs} itt_notify)
endif()

if(HPX_WITH_EXAMPLES_HDF5)
set(subdirs ${subdirs} interpolate1d sheneos)
endif()
Expand Down
33 changes: 33 additions & 0 deletions examples/itt_notify/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) 2026 The STE||AR Group
# Copyright (c) 2026 Vansh Dobhal
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

if(NOT HPX_WITH_ITTNOTIFY)
return()
endif()

set(example_programs itt_notify_smoke)
set(itt_notify_smoke_PARAMETERS "--hpx:ini=hpx.use_itt_notify=1")

foreach(example_program ${example_programs})
set(sources ${example_program}.cpp)

source_group("Source Files" FILES ${sources})

add_hpx_executable(
${example_program} INTERNAL_FLAGS
SOURCES ${sources}
FOLDER "Examples/ITTNotify" ${HPX_WITH_CXX_MODULES_OPTION}
)

add_hpx_example_target_dependencies("itt_notify" ${example_program})

if(HPX_WITH_TESTS AND HPX_WITH_TESTS_EXAMPLES)
add_hpx_example_test(
"itt_notify" ${example_program} ${${example_program}_PARAMETERS}
)
endif()
endforeach()
41 changes: 41 additions & 0 deletions examples/itt_notify/itt_notify_smoke.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Copyright (c) 2026 The STE||AR Group
// Copyright (c) 2026 Vansh Dobhal
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <hpx/init.hpp>
#include <hpx/modules/itt_notify.hpp>

int hpx_main(int, char*[])
{
int sync_obj = 0;

HPX_ITT_THREAD_SET_NAME("hpx_itt_smoke");

auto* domain = HPX_ITT_DOMAIN_CREATE("hpx.itt.smoke");
auto* task_name = HPX_ITT_STRING_HANDLE_CREATE("smoke_task");

HPX_ITT_SYNC_CREATE(&sync_obj, "smoke_sync", "smoke_sync");
HPX_ITT_SYNC_PREPARE(&sync_obj);

HPX_ITT_TASK_BEGIN(domain, task_name);
HPX_ITT_TASK_END(domain);

HPX_ITT_SYNC_ACQUIRED(&sync_obj);
HPX_ITT_SYNC_RELEASED(&sync_obj);
HPX_ITT_SYNC_DESTROY(&sync_obj);

int mark = 0;
HPX_ITT_MARK_CREATE(mark, "smoke_mark");
HPX_ITT_MARK(mark, "smoke_event");
HPX_ITT_MARK_OFF(mark);

return hpx::local::finalize();
}

int main(int argc, char* argv[])
{
return hpx::local::init(&hpx_main, argc, argv);
}
Loading