From 0f77a7adcce4368196d4d4fcb529e9a377b9baf7 Mon Sep 17 00:00:00 2001 From: Samuel Moors Date: Sun, 12 Feb 2023 08:17:41 +0100 Subject: [PATCH] support testing non-gpu jobs on gpu nodes --- .../applications/gromacs_check.py | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/eessi/reframe/eessi-checks/applications/gromacs_check.py b/eessi/reframe/eessi-checks/applications/gromacs_check.py index 96bc972b..2bec6706 100644 --- a/eessi/reframe/eessi-checks/applications/gromacs_check.py +++ b/eessi/reframe/eessi-checks/applications/gromacs_check.py @@ -42,17 +42,22 @@ class GROMACS_EESSI(gromacs_check): def filter_tests(self): # filter valid_systems, unless specified with --setvar valid_systems= if not self.valid_systems: - cuda = utils.is_cuda_required_module(self.module_name) - valid_systems = [] - - # CUDA modules should only run in partitions with 'gpu' feature, - # non-CUDA modules should only run in partitions with 'cpu' feature - if self.nb_impl == 'gpu' and cuda: - valid_systems = ['+gpu'] - elif self.nb_impl == 'cpu' and not cuda: - valid_systems = ['+cpu'] - - self.valid_systems = valid_systems + cuda_module = utils.is_cuda_required_module(self.module_name) + valid_systems = '' + + # CUDA modules and when using a GPU for non-bonded interactions require partitions with 'gpu' feature + # non-CUDA modules require partitions with 'cpu' feature + if cuda_module: + valid_systems = '+gpu' + if self.nb_impl == 'cpu': + valid_systems += ' +cpu' + else: + valid_systems += '+cpu' + if self.nb_impl == 'gpu': + valid_systems = '' # impossible combination + + if valid_systems: + self.valid_systems = [valid_systems] # filter out this test if the module is not among a list of manually specified modules # modules can be specified with --setvar modules=