From 60c0a2fea0ada266ad43df3f76ef571000c51a41 Mon Sep 17 00:00:00 2001
From: Sebastian Achilles <Sebastian.Achilles@rwth-aachen.de>
Date: Fri, 30 Apr 2021 17:18:20 +0200
Subject: [PATCH] adding nompi toolchain

---
 Golden_Repo/README.md                         |  5 +-
 Golden_Repo/n/nompi/nompi-2020.1.eb           | 21 ++++++
 Golden_Repo/n/nompi/nompi-2020.eb             | 21 ++++++
 .../OpenMPI-4.1.0rc1-NVHPC-20.9-GCC-9.3.0.eb  | 68 +++++++++++++++++++
 .../OpenMPI-4.1.0rc1-NVHPC-21.1-GCC-9.3.0.eb  | 68 +++++++++++++++++++
 5 files changed, 182 insertions(+), 1 deletion(-)
 create mode 100644 Golden_Repo/n/nompi/nompi-2020.1.eb
 create mode 100644 Golden_Repo/n/nompi/nompi-2020.eb
 create mode 100644 Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-20.9-GCC-9.3.0.eb
 create mode 100644 Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-21.1-GCC-9.3.0.eb

diff --git a/Golden_Repo/README.md b/Golden_Repo/README.md
index fe6f3b095..b933d9c77 100644
--- a/Golden_Repo/README.md
+++ b/Golden_Repo/README.md
@@ -12,6 +12,7 @@ The table below shows the details of the toolchains in the 2020 stage:
 |----------------|---------------------------|----------------|------------------|-------------------------|----------|----------------|---------------------------|
 | GCC            | 9.3.0                     | 9.3.0          | GCC 9.3.0        |                         |          |                | GCCcore                   |
 | NVHPC          | 20.7-GCC-9.3.0            | 9.3.0          | NVHPC 20.7       |                         | 11.0.X§  |                | GCCcore                   |
+| NVHPC          | 20.9-GCC-9.3.0            | 9.3.0          | NVHPC 20.9       |                         | 11.0.X§  |                | GCCcore                   |
 | NVHPC          | 21.1-GCC-9.3.0            | 9.3.0          | NVHPC 21.1       |                         | 11.0.X§  |                | GCCcore                   |
 | iccifort       | 2020.2.254-GCC-9.3.0      | 9.3.0          | Intel 2020.2.254 |                         |          |                | GCCcore                   |
 
@@ -20,7 +21,9 @@ The table below shows the details of the toolchains in the 2020 stage:
 | Toolchain name |     Toolchain version     | Underlying GCC |     Compiler     |          MPI            |   CUDA   | Math libraries |  Includes software from   |
 |----------------|---------------------------|----------------|------------------|-------------------------|----------|----------------|---------------------------|
 | gpsmpi         | 2020                      | 9.3.0          | GCC 9.3.0        | ParaStationMPI 5.4.X    | 11.0.X§  |                | GCCcore, GCC              |
-| npsmpic        | 2020                      | 9.3.0          | NVHPC 20.7       | ParaStationMPI 5.4.X    | 11.0.X   |                | GCCcore, NVHPC            |
+| nompi          | 2020                      | 9.3.0          | NVHPC 20.9       | ParaStationMPI 5.4.X    | 11.0.X   |                | GCCcore, NVHPC            |
+| nompi          | 2020.1                    | 9.3.0          | NVHPC 21.1       | ParaStationMPI 5.4.X    | 11.0.X   |                | GCCcore, NVHPC            |
+| npsmpic        | 2020                      | 9.3.0          | NVHPC 20.9       | ParaStationMPI 5.4.X    | 11.0.X   |                | GCCcore, NVHPC            |
 | npsmpic        | 2020.1                    | 9.3.0          | NVHPC 21.1       | ParaStationMPI 5.4.X    | 11.0.X   |                | GCCcore, NVHPC            |
 | ipsmpi         | 2020                      | 9.3.0          | Intel 2020.2.254 | ParaStationMPI 5.4.X    | 11.0.X§  |                | GCCcore, iccifort         |
 | ipsmpi         | 2020-mt                   | 9.3.0          | Intel 2020.2.254 | ParaStationMPI 5.4.X MT | 11.0.X§  |                | GCCcore, iccifort         |
diff --git a/Golden_Repo/n/nompi/nompi-2020.1.eb b/Golden_Repo/n/nompi/nompi-2020.1.eb
new file mode 100644
index 000000000..f604b1be5
--- /dev/null
+++ b/Golden_Repo/n/nompi/nompi-2020.1.eb
@@ -0,0 +1,21 @@
+easyblock = 'Toolchain'
+
+name = 'nompi'
+version = '2020.1'
+
+homepage = '(none)'
+description = 'NVHPC based compiler toolchain, including OpenMPI for MPI support.'
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = SYSTEM
+
+local_compiler = ('NVHPC', '21.1-GCC-9.3.0')
+
+dependencies = [
+    local_compiler,
+    ('CUDA', '11.0', '', SYSTEM),
+    ('OpenMPI', '4.1.0rc1', '', local_compiler),
+]
+
+moduleclass = 'toolchain'
diff --git a/Golden_Repo/n/nompi/nompi-2020.eb b/Golden_Repo/n/nompi/nompi-2020.eb
new file mode 100644
index 000000000..9e0f1dfd9
--- /dev/null
+++ b/Golden_Repo/n/nompi/nompi-2020.eb
@@ -0,0 +1,21 @@
+easyblock = 'Toolchain'
+
+name = 'nompi'
+version = '2020'
+
+homepage = '(none)'
+description = 'NVHPC based compiler toolchain, including OpenMPI for MPI support.'
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = SYSTEM
+
+local_compiler = ('NVHPC', '20.9-GCC-9.3.0')
+
+dependencies = [
+    local_compiler,
+    ('CUDA', '11.0', '', SYSTEM),
+    ('OpenMPI', '4.1.0rc1', '', local_compiler),
+]
+
+moduleclass = 'toolchain'
diff --git a/Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-20.9-GCC-9.3.0.eb b/Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-20.9-GCC-9.3.0.eb
new file mode 100644
index 000000000..89ba7a729
--- /dev/null
+++ b/Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-20.9-GCC-9.3.0.eb
@@ -0,0 +1,68 @@
+easyblock = 'ConfigureMake'
+
+name = 'OpenMPI'
+version = '4.1.0rc1'
+
+homepage = 'http://www.open-mpi.org/'
+description = """The Open MPI Project is an open source MPI-3 implementation."""
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = {'name': 'NVHPC', 'version': '20.9-GCC-9.3.0'}
+toolchainopts = {'pic': True}
+
+source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads']
+sources = [SOURCELOWER_TAR_GZ]
+
+osdependencies = [
+    # needed for --with-verbs
+    ('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel'),
+    # needed for --with-pmix
+    ('pmix-devel'),
+]
+
+builddependencies = [
+    ('Autotools', '20200321'),
+]
+
+dependencies = [
+    ('zlib', '1.2.11'),
+    ('hwloc', '2.2.0'),
+    ('UCX', '1.8.1', '', SYSTEM),
+    ('CUDA', '11.0', '', SYSTEM),
+    ('libevent', '2.1.12'),
+]
+
+configopts = '--enable-shared '
+configopts += '--with-hwloc=$EBROOTHWLOC '  # hwloc support
+configopts += '--with-ucx=$EBROOTUCX '
+configopts += '--with-verbs '
+configopts += '--with-libevent=$EBROOTLIBEVENT '
+configopts += '--without-orte '
+configopts += '--without-psm2 '
+configopts += '--disable-oshmem '
+configopts += '--with-cuda=$EBROOTCUDA '
+configopts += '--with-ime=/opt/ddn/ime '
+configopts += '--with-gpfs '
+
+# to enable SLURM integration (site-specific)
+configopts += '--with-slurm --with-pmix=external --with-libevent=external --with-ompi-pmix-rte'
+
+local_libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"]
+sanity_check_paths = {
+    'files': ["bin/%s" % local_binfile for local_binfile in ["ompi_info", "opal_wrapper"]] +
+             ["lib/lib%s.%s" % (local_libfile, SHLIB_EXT) for local_libfile in local_libs] +
+             ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]],
+    'dirs': [],
+}
+
+# Add a family for our naming scheme
+modluafooter = '''
+family("mpi")
+add_property("arch","gpu")
+if not ( isloaded("mpi-settings") ) then
+    load("mpi-settings")
+end
+'''
+
+moduleclass = 'mpi'
diff --git a/Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-21.1-GCC-9.3.0.eb b/Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-21.1-GCC-9.3.0.eb
new file mode 100644
index 000000000..8ebd256f5
--- /dev/null
+++ b/Golden_Repo/o/OpenMPI/OpenMPI-4.1.0rc1-NVHPC-21.1-GCC-9.3.0.eb
@@ -0,0 +1,68 @@
+easyblock = 'ConfigureMake'
+
+name = 'OpenMPI'
+version = '4.1.0rc1'
+
+homepage = 'http://www.open-mpi.org/'
+description = """The Open MPI Project is an open source MPI-3 implementation."""
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = {'name': 'NVHPC', 'version': '21.1-GCC-9.3.0'}
+toolchainopts = {'pic': True}
+
+source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads']
+sources = [SOURCELOWER_TAR_GZ]
+
+osdependencies = [
+    # needed for --with-verbs
+    ('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel'),
+    # needed for --with-pmix
+    ('pmix-devel'),
+]
+
+builddependencies = [
+    ('Autotools', '20200321'),
+]
+
+dependencies = [
+    ('zlib', '1.2.11'),
+    ('hwloc', '2.2.0'),
+    ('UCX', '1.8.1', '', SYSTEM),
+    ('CUDA', '11.0', '', SYSTEM),
+    ('libevent', '2.1.12'),
+]
+
+configopts = '--enable-shared '
+configopts += '--with-hwloc=$EBROOTHWLOC '  # hwloc support
+configopts += '--with-ucx=$EBROOTUCX '
+configopts += '--with-verbs '
+configopts += '--with-libevent=$EBROOTLIBEVENT '
+configopts += '--without-orte '
+configopts += '--without-psm2 '
+configopts += '--disable-oshmem '
+configopts += '--with-cuda=$EBROOTCUDA '
+configopts += '--with-ime=/opt/ddn/ime '
+configopts += '--with-gpfs '
+
+# to enable SLURM integration (site-specific)
+configopts += '--with-slurm --with-pmix=external --with-libevent=external --with-ompi-pmix-rte'
+
+local_libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"]
+sanity_check_paths = {
+    'files': ["bin/%s" % local_binfile for local_binfile in ["ompi_info", "opal_wrapper"]] +
+             ["lib/lib%s.%s" % (local_libfile, SHLIB_EXT) for local_libfile in local_libs] +
+             ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]],
+    'dirs': [],
+}
+
+# Add a family for our naming scheme
+modluafooter = '''
+family("mpi")
+add_property("arch","gpu")
+if not ( isloaded("mpi-settings") ) then
+    load("mpi-settings")
+end
+'''
+
+moduleclass = 'mpi'
-- 
GitLab