From f51b15642ada14350ece3f4bb3f56f08b4cdd66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Sun, 4 May 2025 22:04:41 +0200 Subject: [PATCH 1/3] fix condition in GROMACS hook --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 6d9a067ab9..a4ed62c5f9 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -615,7 +615,7 @@ def pre_configure_hook_gromacs(self, *args, **kwargs): """ if self.name == 'GROMACS': cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') - if LooseVersion(self.version) <= LooseVersion('2024.1') and cpu_target == CPU_TARGET_NEOVERSE_V1 or LooseVersion(self.version) <= LooseVersion('2024.4') and CPU_TARGET_NVIDIA_GRACE: + if (LooseVersion(self.version) <= LooseVersion('2024.1') and cpu_target == CPU_TARGET_NEOVERSE_V1) or (LooseVersion(self.version) <= LooseVersion('2024.4') and CPU_TARGET_NVIDIA_GRACE): self.cfg.update('configopts', '-DGMX_SIMD=ARM_NEON_ASIMD') print_msg( "Avoiding use of SVE instructions for GROMACS %s by using ARM_NEON_ASIMD as GMX_SIMD value", From eab65380f865dd3f83a071a03c8ac2290bdeafb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Sun, 4 May 2025 23:02:46 +0200 Subject: [PATCH 2/3] break long if statement into multiple lines --- eb_hooks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index a4ed62c5f9..0ca464ce76 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -615,7 +615,10 @@ def pre_configure_hook_gromacs(self, *args, **kwargs): """ if self.name == 'GROMACS': cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') - if (LooseVersion(self.version) <= LooseVersion('2024.1') and cpu_target == CPU_TARGET_NEOVERSE_V1) or (LooseVersion(self.version) <= LooseVersion('2024.4') and CPU_TARGET_NVIDIA_GRACE): + if ( + (LooseVersion(self.version) <= LooseVersion('2024.1') and cpu_target == CPU_TARGET_NEOVERSE_V1) or + (LooseVersion(self.version) <= LooseVersion('2024.4') and CPU_TARGET_NVIDIA_GRACE) + ): self.cfg.update('configopts', '-DGMX_SIMD=ARM_NEON_ASIMD') print_msg( "Avoiding use of SVE instructions for GROMACS %s by using ARM_NEON_ASIMD as GMX_SIMD value", From de21325a854343cf7bc8f8a6b20d5285e4cc3690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Mon, 5 May 2025 08:35:19 +0200 Subject: [PATCH 3/3] another fix for CPU target comparison in GROMACS hook --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 0ca464ce76..eae80ce7df 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -617,7 +617,7 @@ def pre_configure_hook_gromacs(self, *args, **kwargs): cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if ( (LooseVersion(self.version) <= LooseVersion('2024.1') and cpu_target == CPU_TARGET_NEOVERSE_V1) or - (LooseVersion(self.version) <= LooseVersion('2024.4') and CPU_TARGET_NVIDIA_GRACE) + (LooseVersion(self.version) <= LooseVersion('2024.4') and cpu_target == CPU_TARGET_NVIDIA_GRACE) ): self.cfg.update('configopts', '-DGMX_SIMD=ARM_NEON_ASIMD') print_msg(