From 4d8e10fd4a3b130339e5e2374a4162114e29c637 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Fri, 3 May 2024 18:30:59 +0200 Subject: [PATCH] Set process binding for GROMACS. It is single core, but if launched with mpirun it is currently free to migrate between cores within a numa domain. On Snellius I've seen some strange issues with occassionally very slow performance (10x slower than normal), potentially due to the OS thread schedulling being silly. Process binding leads to better _and_ more reproducible results --- eessi/testsuite/tests/apps/gromacs.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eessi/testsuite/tests/apps/gromacs.py b/eessi/testsuite/tests/apps/gromacs.py index a3d9e625..c10da7c6 100644 --- a/eessi/testsuite/tests/apps/gromacs.py +++ b/eessi/testsuite/tests/apps/gromacs.py @@ -113,3 +113,11 @@ def set_omp_num_threads(self): self.env_vars['OMP_NUM_THREADS'] = omp_num_threads log(f'env_vars set to {self.env_vars}') + + @run_after('setup') + def set_binding_policy(self): + """ + Default process binding may depend on the launcher used. We've seen some variable performance. + Better set it explicitely to make sure process migration cannot cause such variations. + """ + hooks.set_compact_process_binding(self)