diff --git a/eb_hooks.py b/eb_hooks.py index 11a1ac17..cde262b9 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1503,6 +1503,18 @@ def pre_test_hook_exclude_failing_test_Highway(self, *args, **kwargs): self.cfg['runtest'] += ' ARGS="-E TestAllSumOfLanes"' +def pre_test_hook_gromacs(self, *args, **kwargs): + """ + Solve GROMACS test failure on NVIDIA Grace CPUs when hwloc support is enabled. + """ + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') + if self.name == 'GROMACS': + if self.version < '2026.3' and cpu_target == CPU_TARGET_NVIDIA_GRACE: + self.cfg['pretestopts'] = 'export HWLOC_KEEP_NVIDIA_GPU_NUMA_NODES=0 && ' + else: + raise EasyBuildError("GROMACS-specific hook triggered for non-GROMACS easyconfig?!") + + def pre_test_hook_ignore_failing_tests_ESPResSo(self, *args, **kwargs): """ Pre-test hook for ESPResSo: skip failing tests, tests frequently timeout due to known bugs in ESPResSo v4.2.1 @@ -2079,6 +2091,7 @@ def post_easyblock_hook(self, *args, **kwargs): PRE_TEST_HOOKS = { 'ESPResSo': pre_test_hook_ignore_failing_tests_ESPResSo, 'FFTW.MPI': pre_test_hook_ignore_failing_tests_FFTWMPI, + 'GROMACS': pre_test_hook_gromacs, 'Highway': pre_test_hook_exclude_failing_test_Highway, 'LAMMPS': pre_test_hook_lammps_ignore_failure_arm_generic, 'SciPy-bundle': pre_test_hook_ignore_failing_tests_SciPybundle,