From 4b7e3fc502b68f636dc64393fd82641dedd63991 Mon Sep 17 00:00:00 2001 From: Sebastian Keller Date: Fri, 5 Apr 2019 14:14:50 +0200 Subject: [PATCH 1/2] sorted compare of cores list --- cscs-checks/prgenv/affinity_check.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cscs-checks/prgenv/affinity_check.py b/cscs-checks/prgenv/affinity_check.py index 6663982a25..22f882b9c4 100644 --- a/cscs-checks/prgenv/affinity_check.py +++ b/cscs-checks/prgenv/affinity_check.py @@ -50,10 +50,14 @@ def parse_cpus(x): self.sanity_patterns = sn.all([ sn.assert_eq(self.aff_thrds, self.ref_thrds), sn.assert_eq(self.aff_ranks, self.ref_ranks), - sn.assert_eq(self.aff_cores, self.ref_cores)]) + sn.assert_eq(self.sn_sorted(self.aff_cores), + self.sn_sorted(self.ref_cores))]) super().setup(partition, environ, **job_opts) + @sn.sanity_function + def sn_sorted(self, lst): + return sorted(lst) @rfm.parameterized_test(['omp_bind_threads'], ['omp_bind_threads_nomultithread'], From 0e33e7a919bfba1516c1b53f13a3628d7792a976 Mon Sep 17 00:00:00 2001 From: Vasileios Karakasis Date: Fri, 5 Apr 2019 23:47:43 +0200 Subject: [PATCH 2/2] Address PR comments --- cscs-checks/prgenv/affinity_check.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cscs-checks/prgenv/affinity_check.py b/cscs-checks/prgenv/affinity_check.py index 22f882b9c4..7068947088 100644 --- a/cscs-checks/prgenv/affinity_check.py +++ b/cscs-checks/prgenv/affinity_check.py @@ -9,12 +9,12 @@ def __init__(self, variant): 'dom:gpu', 'dom:mc'] self.valid_prog_environs = ['PrgEnv-gnu'] self.build_system = 'Make' - self.build_system.options = ['--directory=affinity', 'MPI=1'] + self.build_system.options = ['-C affinity', 'MPI=1'] # The github URL can not be specifid as `self.sourcedir` as that # would prevent the src folder from being copied to stage which is # necessary since these tests need files from it. self.prebuild_cmd = ['git clone https://github.com/vkarak/affinity'] - self.executable = 'affinity/affinity' + self.executable = './affinity/affinity' self.variant = variant self.maintainers = ['RS', 'VK'] self.tags = {'production', 'scs', 'maintenance'} @@ -50,14 +50,11 @@ def parse_cpus(x): self.sanity_patterns = sn.all([ sn.assert_eq(self.aff_thrds, self.ref_thrds), sn.assert_eq(self.aff_ranks, self.ref_ranks), - sn.assert_eq(self.sn_sorted(self.aff_cores), - self.sn_sorted(self.ref_cores))]) + sn.assert_eq(sn.sorted(self.aff_cores), sn.sorted(self.ref_cores)) + ]) super().setup(partition, environ, **job_opts) - @sn.sanity_function - def sn_sorted(self, lst): - return sorted(lst) @rfm.parameterized_test(['omp_bind_threads'], ['omp_bind_threads_nomultithread'],