From bcbb8a232bb5c7f96786eae052d4088681adceef Mon Sep 17 00:00:00 2001 From: noabauma Date: Tue, 5 Aug 2025 13:49:41 +0200 Subject: [PATCH 1/3] updating the yml file (hopefully this fixes the CI) --- .github/workflows/master-test-workflow.yml | 3 +++ .github/workflows/pr-development-workflow.yml | 3 +++ .gitlab-ci.yml | 24 +++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/.github/workflows/master-test-workflow.yml b/.github/workflows/master-test-workflow.yml index 1116b42..0edd3cf 100644 --- a/.github/workflows/master-test-workflow.yml +++ b/.github/workflows/master-test-workflow.yml @@ -42,6 +42,9 @@ jobs: - name: Build Pybind11 run: | + sudo apt-get update + sudo apt-get install -y python3-pytest + /usr/bin/python3 -m pip install --upgrade pip pytest cd extern/pybind11 diff --git a/.github/workflows/pr-development-workflow.yml b/.github/workflows/pr-development-workflow.yml index 2c24a6d..f0f73e2 100644 --- a/.github/workflows/pr-development-workflow.yml +++ b/.github/workflows/pr-development-workflow.yml @@ -272,6 +272,9 @@ jobs: - name: Build Pybind11 run: | + sudo apt-get update + sudo apt-get install -y python3-pytest + /usr/bin/python3 -m pip install --upgrade pip pytest cd extern/pybind11 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1f7e11..a52c440 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,30 @@ build: - x86 - infiniband script: + # Build Pybind11 + - sudo apt-get update + - sudo apt-get install -y python3-pytest + - /usr/bin/python3 -m pip install --upgrade pip pytest + - cd extern/pybind11 + - mkdir -p build + - cd build + - cmake .. -DPython_EXECUTABLE=/usr/bin/python3 + - make check -j"$(nproc)" + - mkdir -p mock_install/share/pkgconfig + - | + cat < mock_install/share/pkgconfig/pybind11.pc + prefix=$(pwd)/.. + includedir=\${prefix}/include + + Name: pybind11 + Description: Seamless operability between C++11 and Python + Version: 2.13.6 + Cflags: -I\${includedir} + EOF + - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(pwd)/mock_install/share/pkgconfig" + + # TaskR build process + - cd ../../../.. - export HOME=/home/hicr - source /home/hicr/.hicr-env.sh - echo "Building TaskR..." From c7d26c87f26e3b29db28991141bbde1cdcadfe12 Mon Sep 17 00:00:00 2001 From: noabauma Date: Tue, 5 Aug 2025 14:50:22 +0200 Subject: [PATCH 2/3] minor fix in the yml --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a52c440..5a736e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,8 +29,10 @@ build: EOF - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$(pwd)/mock_install/share/pkgconfig" + # Return to project root + - cd "$CI_PROJECT_DIR" + # TaskR build process - - cd ../../../.. - export HOME=/home/hicr - source /home/hicr/.hicr-env.sh - echo "Building TaskR..." From 177ede4cd9b6220405cc289b16c37e7fe355ec5a Mon Sep 17 00:00:00 2001 From: noabauma Date: Tue, 5 Aug 2025 15:16:35 +0200 Subject: [PATCH 3/3] fixing code style --- include/taskr/runtime.hpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/include/taskr/runtime.hpp b/include/taskr/runtime.hpp index eeaf149..d20496a 100644 --- a/include/taskr/runtime.hpp +++ b/include/taskr/runtime.hpp @@ -437,14 +437,10 @@ class Runtime */ __INLINE__ void addService(taskr::service_t *service) { _serviceQueue->push(service); } - /** * Funtion to force termination in case the application does not have its own termination logic */ - __INLINE__ void forceTermination() - { - _forceTerminate = true; - } + __INLINE__ void forceTermination() { _forceTerminate = true; } private: @@ -459,7 +455,7 @@ class Runtime // Getting worker pointer auto worker = _serviceWorkers[serviceWorkerId]; - + // Checking for termination auto terminated = checkTermination(worker.get()); @@ -509,16 +505,16 @@ class Runtime if (_forceTerminate == true) { while (_commonReadyTaskQueue->wasEmpty() == false) - { + { auto task = _commonReadyTaskQueue->pop(); if (task != nullptr) _activeTaskCount--; - } + } while (worker->getReadyTaskQueue()->wasEmpty() == false) - { + { auto task = worker->getReadyTaskQueue()->pop(); if (task != nullptr) _activeTaskCount--; - } + } } // If required, perform a service task @@ -751,8 +747,6 @@ class Runtime this->_workerCallbackMap.trigger(taskrWorker, HiCR::tasking::Worker::callback_t::onWorkerTerminate); } - - /** * Flag to indicate whether execution must be forcibly terminated. It is discouraged to use this if the application * has implemented a clear ending logic. This is only useful for always-on services-like applications