Add CMAKE_TEST_LAUNCHER capability and gpu labels #191
+42
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR, the serial tests that require a GPU resource would fail when using
The issue is those tests need to be launched with
srun -n 1
within ctest to gain access to the GPU resource.Adding the CMAKE_TEST_LAUNCHER (available since cmake 3.29) allows to run serial tests to be run with a launcher, in this case
srun -n 1
.This feature used to be already available in versions of cmake < 3.29 under the more obscure name CMAKE_CROSSCOMPILING_EMULATOR. This PR makes the use of CMAKE_TEST_LAUNCHER forward compatible.
I also added labels "gpu" to GPU tests.
Following workflow works now on our HPC:
Before configuration:
To launch only gpu tests: