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..5a736e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,32 @@ 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" + + # Return to project root + - cd "$CI_PROJECT_DIR" + + # TaskR build process - export HOME=/home/hicr - source /home/hicr/.hicr-env.sh - echo "Building TaskR..." 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