From 10341c0fc745d9282a6b1b216072b62686b0f24b Mon Sep 17 00:00:00 2001
From: Damian Alvarez <d.alvarez@fz-juelich.de>
Date: Thu, 23 Feb 2023 16:03:23 +0100
Subject: [PATCH] ParaStationMPI: Add multithreading capable runtimes

---
 .../p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb    | 42 +++++++++++++++++++
 .../p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb    | 42 +++++++++++++++++++
 ...mpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb | 42 +++++++++++++++++++
 .../p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb    | 38 +++++++++++++++++
 .../p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb    | 38 +++++++++++++++++
 ...mpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb | 38 +++++++++++++++++
 6 files changed, 240 insertions(+)
 create mode 100644 Golden_Repo/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb
 create mode 100644 Golden_Repo/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb
 create mode 100644 Golden_Repo/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb
 create mode 100644 Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb
 create mode 100644 Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb
 create mode 100644 Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb

diff --git a/Golden_Repo/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb b/Golden_Repo/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb
new file mode 100644
index 000000000..45124f476
--- /dev/null
+++ b/Golden_Repo/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb
@@ -0,0 +1,42 @@
+name = 'psmpi'
+version = '5.8.0-1'
+
+homepage = 'https://github.com/ParaStation/psmpi2'
+description = """ParaStation MPI is an open source high-performance MPI 3.0 implementation,
+based on MPICH v3. It provides extra low level communication libraries and integration with
+various batch systems for tighter process control.
+"""
+
+toolchain = {'name': 'GCC', 'version': '11.3.0'}
+
+sources = [SOURCE_TAR_GZ]
+source_urls = ['https://gitlab.jsc.fz-juelich.de/ParTec/psmpi/uploads/762714c8eec01fe59239a52798a70e1c/']
+checksums = [
+    # psmpi-5.8.0-1.tar.gz
+    'bcebb42f68e062d4cf957c1ec12a8e2e50051265d38715854bafc34855ed3029',
+    # psmpi-5.5.0-1_ime.patch
+    'c2418b9511560dca197242508de9c7b6b117122912b6d3a4aa18398834f465ff',
+]
+
+dependencies = [
+    ('pscom', '5.6-default'),
+    # needed due to the inclusion of hwloc
+    ('libxml2', '2.9.13'),
+    # Including CUDA here to trigger the hook to add the gpu property, and because it is actually needed
+    ('CUDA', '11.7', '', SYSTEM)
+]
+
+patches = [
+    'psmpi-5.5.0-1_ime.patch'
+]
+
+mpich_opts = '--enable-static --with-file-system=ime+ufs+gpfs --enable-romio'
+
+preconfigopts = 'export CFLAGS="-I/opt/ddn/ime/include $CFLAGS" && '
+preconfigopts += 'export LDFLAGS="$LDFLAGS -L/opt/ddn/ime/lib -lim_client" && '
+
+threaded = True
+
+cuda = True
+
+moduleclass = 'mpi'
diff --git a/Golden_Repo/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb b/Golden_Repo/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb
new file mode 100644
index 000000000..d10dbb646
--- /dev/null
+++ b/Golden_Repo/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb
@@ -0,0 +1,42 @@
+name = 'psmpi'
+version = '5.8.0-1'
+
+homepage = 'https://github.com/ParaStation/psmpi2'
+description = """ParaStation MPI is an open source high-performance MPI 3.0 implementation,
+based on MPICH v3. It provides extra low level communication libraries and integration with
+various batch systems for tighter process control.
+"""
+
+toolchain = {'name': 'NVHPC', 'version': '23.1'}
+
+sources = [SOURCE_TAR_GZ]
+source_urls = ['https://gitlab.jsc.fz-juelich.de/ParTec/psmpi/uploads/762714c8eec01fe59239a52798a70e1c/']
+checksums = [
+    # psmpi-5.8.0-1.tar.gz
+    'bcebb42f68e062d4cf957c1ec12a8e2e50051265d38715854bafc34855ed3029',
+    # psmpi-5.5.0-1_ime.patch
+    'c2418b9511560dca197242508de9c7b6b117122912b6d3a4aa18398834f465ff',
+]
+
+dependencies = [
+    ('pscom', '5.6-default'),
+    # needed due to the inclusion of hwloc
+    ('libxml2', '2.9.13'),
+    # Including CUDA here to trigger the hook to add the gpu property, and because it is actually needed
+    ('CUDA', '11.7', '', SYSTEM)
+]
+
+patches = [
+    'psmpi-5.5.0-1_ime.patch'
+]
+
+mpich_opts = '--enable-static --with-file-system=ime+ufs+gpfs --enable-romio'
+
+preconfigopts = 'export CFLAGS="-I/opt/ddn/ime/include $CFLAGS" && '
+preconfigopts += 'export LDFLAGS="$LDFLAGS -L/opt/ddn/ime/lib -lim_client" && '
+
+threaded = True
+
+cuda = True
+
+moduleclass = 'mpi'
diff --git a/Golden_Repo/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb b/Golden_Repo/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb
new file mode 100644
index 000000000..f798f5697
--- /dev/null
+++ b/Golden_Repo/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb
@@ -0,0 +1,42 @@
+name = 'psmpi'
+version = '5.8.0-1'
+
+homepage = 'https://github.com/ParaStation/psmpi2'
+description = """ParaStation MPI is an open source high-performance MPI 3.0 implementation,
+based on MPICH v3. It provides extra low level communication libraries and integration with
+various batch systems for tighter process control.
+"""
+
+toolchain = {'name': 'intel-compilers', 'version': '2022.1.0'}
+
+sources = [SOURCE_TAR_GZ]
+source_urls = ['https://gitlab.jsc.fz-juelich.de/ParTec/psmpi/uploads/762714c8eec01fe59239a52798a70e1c/']
+checksums = [
+    # psmpi-5.8.0-1.tar.gz
+    'bcebb42f68e062d4cf957c1ec12a8e2e50051265d38715854bafc34855ed3029',
+    # psmpi-5.5.0-1_ime.patch
+    'c2418b9511560dca197242508de9c7b6b117122912b6d3a4aa18398834f465ff',
+]
+
+dependencies = [
+    ('pscom', '5.6-default'),
+    # needed due to the inclusion of hwloc
+    ('libxml2', '2.9.13'),
+    # Including CUDA here to trigger the hook to add the gpu property, and because it is actually needed
+    ('CUDA', '11.7', '', SYSTEM)
+]
+
+patches = [
+    'psmpi-5.5.0-1_ime.patch'
+]
+
+mpich_opts = '--enable-static --with-file-system=ime+ufs+gpfs --enable-romio'
+
+preconfigopts = 'export CFLAGS="-I/opt/ddn/ime/include $CFLAGS" && '
+preconfigopts += 'export LDFLAGS="$LDFLAGS -L/opt/ddn/ime/lib -lim_client" && '
+
+threaded = True
+
+cuda = True
+
+moduleclass = 'mpi'
diff --git a/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb b/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb
new file mode 100644
index 000000000..8e157f7ac
--- /dev/null
+++ b/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-GCC-11.3.0-mt.eb
@@ -0,0 +1,38 @@
+name = 'psmpi'
+version = '5.8.0-1'
+
+homepage = 'https://github.com/ParaStation/psmpi2'
+description = """ParaStation MPI is an open source high-performance MPI 3.0 implementation,
+based on MPICH v3. It provides extra low level communication libraries and integration with
+various batch systems for tighter process control.
+"""
+
+toolchain = {'name': 'GCC', 'version': '11.3.0'}
+
+sources = [SOURCE_TAR_GZ]
+source_urls = ['https://gitlab.jsc.fz-juelich.de/ParTec/psmpi/uploads/762714c8eec01fe59239a52798a70e1c/']
+checksums = [
+    # psmpi-5.8.0-1.tar.gz
+    'bcebb42f68e062d4cf957c1ec12a8e2e50051265d38715854bafc34855ed3029',
+]
+
+dependencies = [
+    ('pscom', '5.6-default'),
+    # needed due to the inclusion of hwloc
+    ('libxml2', '2.9.13'),
+    # Including CUDA here to trigger the hook to add the gpu property, and because it is actually needed
+    ('CUDA', '11.7', '', SYSTEM)
+]
+
+# We don't have IME in HDFML so we skip this
+# mpich_opts = '--enable-static --with-file-system=ime+ufs+gpfs --enable-romio'
+#
+# preconfigopts = 'export CFLAGS="-I/opt/ddn/ime/include $CFLAGS" && '
+# preconfigopts += 'export LDFLAGS="$LDFLAGS -L/opt/ddn/ime/lib -lim_client" && '
+mpich_opts = '--enable-static --with-file-system=ufs+gpfs --enable-romio'
+
+threaded = True
+
+cuda = True
+
+moduleclass = 'mpi'
diff --git a/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb b/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb
new file mode 100644
index 000000000..da8160f3b
--- /dev/null
+++ b/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-NVHPC-23.1-mt.eb
@@ -0,0 +1,38 @@
+name = 'psmpi'
+version = '5.8.0-1'
+
+homepage = 'https://github.com/ParaStation/psmpi2'
+description = """ParaStation MPI is an open source high-performance MPI 3.0 implementation,
+based on MPICH v3. It provides extra low level communication libraries and integration with
+various batch systems for tighter process control.
+"""
+
+toolchain = {'name': 'NVHPC', 'version': '23.1'}
+
+sources = [SOURCE_TAR_GZ]
+source_urls = ['https://gitlab.jsc.fz-juelich.de/ParTec/psmpi/uploads/762714c8eec01fe59239a52798a70e1c/']
+checksums = [
+    # psmpi-5.8.0-1.tar.gz
+    'bcebb42f68e062d4cf957c1ec12a8e2e50051265d38715854bafc34855ed3029',
+]
+
+dependencies = [
+    ('pscom', '5.6-default'),
+    # needed due to the inclusion of hwloc
+    ('libxml2', '2.9.13'),
+    # Including CUDA here to trigger the hook to add the gpu property, and because it is actually needed
+    ('CUDA', '11.7', '', SYSTEM)
+]
+
+# We don't have IME in HDFML so we skip this
+# mpich_opts = '--enable-static --with-file-system=ime+ufs+gpfs --enable-romio'
+#
+# preconfigopts = 'export CFLAGS="-I/opt/ddn/ime/include $CFLAGS" && '
+# preconfigopts += 'export LDFLAGS="$LDFLAGS -L/opt/ddn/ime/lib -lim_client" && '
+mpich_opts = '--enable-static --with-file-system=ufs+gpfs --enable-romio'
+
+threaded = True
+
+cuda = True
+
+moduleclass = 'mpi'
diff --git a/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb b/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb
new file mode 100644
index 000000000..8ffdae0fa
--- /dev/null
+++ b/Overlays/hdfml_overlay/p/psmpi/psmpi-5.8.0-1-intel-compilers-2022.1.0-mt.eb
@@ -0,0 +1,38 @@
+name = 'psmpi'
+version = '5.8.0-1'
+
+homepage = 'https://github.com/ParaStation/psmpi2'
+description = """ParaStation MPI is an open source high-performance MPI 3.0 implementation,
+based on MPICH v3. It provides extra low level communication libraries and integration with
+various batch systems for tighter process control.
+"""
+
+toolchain = {'name': 'intel-compilers', 'version': '2022.1.0'}
+
+sources = [SOURCE_TAR_GZ]
+source_urls = ['https://gitlab.jsc.fz-juelich.de/ParTec/psmpi/uploads/762714c8eec01fe59239a52798a70e1c/']
+checksums = [
+    # psmpi-5.8.0-1.tar.gz
+    'bcebb42f68e062d4cf957c1ec12a8e2e50051265d38715854bafc34855ed3029',
+]
+
+dependencies = [
+    ('pscom', '5.6-default'),
+    # needed due to the inclusion of hwloc
+    ('libxml2', '2.9.13'),
+    # Including CUDA here to trigger the hook to add the gpu property, and because it is actually needed
+    ('CUDA', '11.7', '', SYSTEM)
+]
+
+# We don't have IME in HDFML so we skip this
+# mpich_opts = '--enable-static --with-file-system=ime+ufs+gpfs --enable-romio'
+#
+# preconfigopts = 'export CFLAGS="-I/opt/ddn/ime/include $CFLAGS" && '
+# preconfigopts += 'export LDFLAGS="$LDFLAGS -L/opt/ddn/ime/lib -lim_client" && '
+mpich_opts = '--enable-static --with-file-system=ufs+gpfs --enable-romio'
+
+threaded = True
+
+cuda = True
+
+moduleclass = 'mpi'
-- 
GitLab