From 7495d9b135888f7d9fbd399c55c743cc58ea4313 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Dehenne?= <remi.dehenne@cea.fr>
Date: Mon, 24 Jul 2023 18:24:02 +0200
Subject: [PATCH] Bypass InfiniBand rail autodetection

---
 Custom_EasyBlocks/mpcframework.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Custom_EasyBlocks/mpcframework.py b/Custom_EasyBlocks/mpcframework.py
index e3c3fec2..5808d43a 100644
--- a/Custom_EasyBlocks/mpcframework.py
+++ b/Custom_EasyBlocks/mpcframework.py
@@ -1,4 +1,5 @@
 from easybuild.easyblocks.generic.binary import Binary
+from easybuild.tools.filetools import write_file
 
 import os.path
 
@@ -25,3 +26,9 @@ class EB_MPCFramework(Binary):
             "MPCFRAMEWORK_DIR", self.installdir + 'share/mpcframework/cmake/')
 
         return txt
+
+    def post_install_step(self):
+        """Override network rail configuration by adding an MPC configuration file"""
+
+        write_file(os.path.join(self.installdir, "etc", "mpcframework", "rail.conf"),
+                   "LOWCOMM_NETWORKING_RAILS_IBMPI_DEVICE=mlx5_0")
-- 
GitLab