From 79f925c5a8c372d4b5afe2da2067c40fd42639f3 Mon Sep 17 00:00:00 2001
From: Damian Alvarez <alvarezmallon1@jwlogin02.juwels>
Date: Wed, 10 Nov 2021 10:52:57 +0100
Subject: [PATCH] To allow to install MPIs in overlays using user
 installations, without bumping into a blocker

---
 Custom_Hooks/eb_hooks.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py
index 135c29d6d..d1ff1912b 100644
--- a/Custom_Hooks/eb_hooks.py
+++ b/Custom_Hooks/eb_hooks.py
@@ -463,7 +463,8 @@ def pre_ready_hook(self, *args, **kwargs):
     # overridden, only experts should know that)
     override_mpi_check = os.getenv("JSC_OVERRIDE_MPI_CHECK")
     if not override_mpi_check:
-        if is_mpi and GOLDEN_REPO not in path_to_ec and os.getenv('USER') not in 'swmanage':
+        if is_mpi and GOLDEN_REPO not in path_to_ec and 'Overlays' not in path_to_ec \
+        and os.getenv('USER') not in 'swmanage':
             print_warning(
                 "\nYou are attempting to install a non-system MPI implementation (%s), "
                 "this is very likely to lead to severe performance degradation. Please "
-- 
GitLab