From 2ad78ac3544b2557409bc441ddadd1fcdfd43274 Mon Sep 17 00:00:00 2001
From: Damian Alvarez <swmanage@jrl10.jureca>
Date: Wed, 4 Mar 2020 12:14:18 +0100
Subject: [PATCH] Added a few packages left behind

---
 Golden_Repo/2019a/README.md                   | 63 ++++++++-----
 .../h/hwloc/hwloc-2.1.0-GCCcore-8.3.0.eb      | 49 ++++++++++
 .../g/gmvmklc/gmvmklc-2019a-GDR.eb            | 32 +++++++
 .../p/pmvmklc/pmvmklc-2019a-GDR.eb            | 32 +++++++
 .../l/libfabric/libfabric-1.9.0.eb            | 25 +++++
 .../o/OpenMPI/OpenMPI-4.0.2-GCC-8.3.0.eb      | 93 +++++++++++++++++++
 ...MPI-4.0.2-iccifort-2019.5.281-GCC-8.3.0.eb | 93 +++++++++++++++++++
 7 files changed, 364 insertions(+), 23 deletions(-)
 create mode 100644 Golden_Repo/2019a/h/hwloc/hwloc-2.1.0-GCCcore-8.3.0.eb
 create mode 100644 Golden_Repo/2019a/juwels_overlay/g/gmvmklc/gmvmklc-2019a-GDR.eb
 create mode 100644 Golden_Repo/2019a/juwels_overlay/p/pmvmklc/pmvmklc-2019a-GDR.eb
 create mode 100644 Golden_Repo/2019a/knl_overlay/l/libfabric/libfabric-1.9.0.eb
 create mode 100644 Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-GCC-8.3.0.eb
 create mode 100644 Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-iccifort-2019.5.281-GCC-8.3.0.eb

diff --git a/Golden_Repo/2019a/README.md b/Golden_Repo/2019a/README.md
index d7f7b969d..60081ea4f 100644
--- a/Golden_Repo/2019a/README.md
+++ b/Golden_Repo/2019a/README.md
@@ -1,25 +1,42 @@
 The table below shows the details of the toolchains in the 2019a stage:
 
-| Toolchain name |     Toolchain version     | Underlying GCC |     Compiler     |          MPI           |   CUDA   | Math libraries |  Includes software from   |                          Notes                           |
-|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|----------------------------------------------------------|
-| GCCcore        | 8.3.0                     | 8.3.0          |                  |                        |          |                |                           | Used for boostrapping other compilers and basic software |
-| GCC            | 8.3.0                     | 8.3.0          | GCC 8.3.0        |                        |          |                | GCCcore                   | Compiler toolchain                                       |
-| iccifort       | 2019.3.199-GCC-8.3.0      | 8.3.0          | Intel 2019.3.199 |                        |          |                | GCCcore                   | Compiler toolchain                                       |
-| iccifort       | 2019.5.281-GCC-8.3.0      | 8.3.0          | Intel 2019.5.281 |                        |          |                | GCCcore                   | Compiler toolchain                                       |
-| PGI            | 19.3-GCC-8.3.0            | 8.3.0          | PGI 19.3         |                        |          |                | GCCcore                   | Compiler toolchain                                       |
-| gpsmpi         | 2019a                     | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.2.2-1 |          |                | GCCcore, GCC              | Compiler+MPI toolchain                                   |
-| gpsmpi         | 2019a                     | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.4.3-1 |          |                | GCCcore, GCC              | Compiler+MPI toolchain                                   |
-| iimpi          | 2019a                     | 8.3.0          | Intel 2019.3.199 | IntelMPI 2019.3.199    |          |                | GCCcore, iccifort         | Compiler+MPI toolchain                                   |
-| iimpi          | 2019a.1                   | 8.3.0          | Intel 2019.3.199 | IntelMPI 2018.5.288    |          |                | GCCcore, iccifort         | Compiler+MPI toolchain                                   |
-| ipsmpi         | 2019a                     | 8.3.0          | Intel 2019.3.199 | ParaStationMPI 5.2.2-1 |          |                | GCCcore, iccifort         | Compiler+MPI toolchain                                   |
-| ipsmpi         | 2019a.1                   | 8.3.0          | Intel 2019.5.281 | ParaStationMPI 5.4.3-1 |          |                | GCCcore, iccifort         | Compiler+MPI toolchain                                   |
-| gmvapich2c     | 2019a                     | 8.3.0          | GCC 8.3.0        | MVAPICH2 2.3.3-GDR     | 10.1.105 |                | GCCcore, GCC              | Compiler+MPI+CUDA toolchain                              |
-| pmvapich2c     | 2019a                     | 8.3.0          | PGI 19.3         | MVAPICH2 2.3.3-GDR     | 10.1.105 |                | GCCcore, PGI              | Compiler+MPI+CUDA toolchain                              |
-| gpsmkl         | 2019a                     | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.2.2-1 |          | MKL 2019.3.199 | GCCcore, GCC, gpsmpi      | Compiler+MPI+Math toolchain                              |
-| gpsmkl         | 2019a.1                   | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.4.3-1 |          | MKL 2019.3.199 | GCCcore, GCC, gpsmpi      | Compiler+MPI+Math toolchain                              |
-| intel-para     | 2019a                     | 8.3.0          | Intel 2019.3.199 | ParaStationMPI 5.2.2-1 |          | MKL 2019.3.199 | GCCcore, iccifort, ipsmpi | Compiler+MPI+Math toolchain                              |
-| intel-para     | 2019a.1                   | 8.3.0          | Intel 2019.5.281 | ParaStationMPI 5.4.3-1 |          | MKL 2019.3.199 | GCCcore, iccifort, ipsmpi | Compiler+MPI+Math toolchain                              |
-| intel          | 2019a                     | 8.3.0          | Intel 2019.3.199 | IntelMPI 2019.3.199    |          | MKL 2019.3.199 | GCCcore, iccifort, iimpi  | Compiler+MPI+Math toolchain                              |
-| intel          | 2019a.1                   | 8.3.0          | Intel 2019.3.199 | IntelMPI 2018.5.288    |          | MKL 2019.3.199 | GCCcore, iccifort, iimpi  | Compiler+MPI+Math toolchain                              |
-| gmvmklc        | 2019a                     | 8.3.0          | GCC 8.3.0        | MVAPICH2 2.3.3-GDR     | 10.1.105 | MKL 2019.3.199 | GCCcore, GCC, gmvapich2c  | Compiler+MPI+CUDA+Math toolchain                         |
-| pmvmklc        | 2019a                     | 8.3.0          | PGI 19.3         | MVAPICH2 2.3.3-GDR     | 10.1.105 | MKL 2019.3.199 | GCCcore, PGI, pmvapich2c  | Compiler+MPI+CUDA+Math toolchain                         |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+| Toolchain name |     Toolchain version     | Underlying GCC |     Compiler     |          MPI           |   CUDA   | Math libraries |  Includes software from   |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+|                                                                              Base                                                                               |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+| GCCcore        | 8.3.0                     | 8.3.0          |                  |                        |          |                |                           |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+|                                                                            Compilers                                                                            |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+| GCC            | 8.3.0                     | 8.3.0          | GCC 8.3.0        |                        |          |                | GCCcore                   |
+| iccifort       | 2019.3.199-GCC-8.3.0      | 8.3.0          | Intel 2019.3.199 |                        |          |                | GCCcore                   |
+| iccifort       | 2019.5.281-GCC-8.3.0      | 8.3.0          | Intel 2019.5.281 |                        |          |                | GCCcore                   |
+| PGI            | 19.3-GCC-8.3.0            | 8.3.0          | PGI 19.3         |                        |          |                | GCCcore                   |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+|                                                                          Compilers+MPI                                                                          |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+| gpsmpi         | 2019a                     | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.2.2-1 |          |                | GCCcore, GCC              |
+| gpsmpi         | 2019a                     | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.4.3-1 |          |                | GCCcore, GCC              |
+| gmvapich2c     | 2019a                     | 8.3.0          | GCC 8.3.0        | MVAPICH2 2.3.3-GDR     | 10.1.105 |                | GCCcore, GCC              |
+| gompi          | 2019a                     | 8.3.0          | GCC 8.3.0        | OpenMPI 4.0.2          |          |                | GCCcore, GCC              |
+| iimpi          | 2019a                     | 8.3.0          | Intel 2019.3.199 | IntelMPI 2019.3.199    |          |                | GCCcore, iccifort         |
+| iimpi          | 2019a.1                   | 8.3.0          | Intel 2019.3.199 | IntelMPI 2018.5.288    |          |                | GCCcore, iccifort         |
+| ipsmpi         | 2019a                     | 8.3.0          | Intel 2019.3.199 | ParaStationMPI 5.2.2-1 |          |                | GCCcore, iccifort         |
+| ipsmpi         | 2019a.1                   | 8.3.0          | Intel 2019.5.281 | ParaStationMPI 5.4.3-1 |          |                | GCCcore, iccifort         |
+| iompi          | 2019a                     | 8.3.0          | Intel 2019.5.281 | OpenMPI 4.0.2          |          |                | GCCcore, iccifort         |
+| pmvapich2c     | 2019a                     | 8.3.0          | PGI 19.3         | MVAPICH2 2.3.3-GDR     | 10.1.105 |                | GCCcore, PGI              |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+|                                                                       Compilers+MPI+Math                                                                        |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
+| gpsmkl         | 2019a                     | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.2.2-1 |          | MKL 2019.3.199 | GCCcore, GCC, gpsmpi      |
+| gpsmkl         | 2019a.1                   | 8.3.0          | GCC 8.3.0        | ParaStationMPI 5.4.3-1 |          | MKL 2019.3.199 | GCCcore, GCC, gpsmpi      |
+| gmvmklc        | 2019a                     | 8.3.0          | GCC 8.3.0        | MVAPICH2 2.3.3-GDR     | 10.1.105 | MKL 2019.3.199 | GCCcore, GCC, gmvapich2c  |
+| gomkl          | 2019a                     | 8.3.0          | GCC 8.3.0        | OpenMPI 4.0.2          |          | MKL 2019.3.199 | GCCcore, GCC, gompi       |
+| intel-para     | 2019a                     | 8.3.0          | Intel 2019.3.199 | ParaStationMPI 5.2.2-1 |          | MKL 2019.3.199 | GCCcore, iccifort, ipsmpi |
+| intel          | 2019a                     | 8.3.0          | Intel 2019.3.199 | IntelMPI 2019.3.199    |          | MKL 2019.3.199 | GCCcore, iccifort, iimpi  |
+| intel          | 2019a.1                   | 8.3.0          | Intel 2019.3.199 | IntelMPI 2018.5.288    |          | MKL 2019.3.199 | GCCcore, iccifort, iimpi  |
+| intel-para     | 2019a.1                   | 8.3.0          | Intel 2019.5.281 | ParaStationMPI 5.4.3-1 |          | MKL 2019.3.199 | GCCcore, iccifort, ipsmpi |
+| iomkl          | 2019a                     | 8.3.0          | Intel 2019.5.281 | OpenMPI 4.0.2          |          | MKL 2019.3.199 | GCCcore, iccifort, iompi  |
+| pmvmklc        | 2019a                     | 8.3.0          | PGI 19.3         | MVAPICH2 2.3.3-GDR     | 10.1.105 | MKL 2019.3.199 | GCCcore, PGI, pmvapich2c  |
+|----------------|---------------------------|----------------|------------------|------------------------|----------|----------------|---------------------------|
diff --git a/Golden_Repo/2019a/h/hwloc/hwloc-2.1.0-GCCcore-8.3.0.eb b/Golden_Repo/2019a/h/hwloc/hwloc-2.1.0-GCCcore-8.3.0.eb
new file mode 100644
index 000000000..9717c7810
--- /dev/null
+++ b/Golden_Repo/2019a/h/hwloc/hwloc-2.1.0-GCCcore-8.3.0.eb
@@ -0,0 +1,49 @@
+easyblock = 'ConfigureMake'
+
+name = 'hwloc'
+version = '2.1.0'
+
+homepage = 'http://www.open-mpi.org/projects/hwloc/'
+
+description = """
+ The Portable Hardware Locality (hwloc) software package provides a portable
+ abstraction (across OS, versions, architectures, ...) of the hierarchical
+ topology of modern architectures, including NUMA memory nodes, sockets, shared
+ caches, cores and simultaneous multithreading. It also gathers various system
+ attributes such as cache and memory information as well as the locality of I/O
+ devices such as network interfaces, InfiniBand HCAs or GPUs. It primarily
+ aims at helping applications with gathering information about modern computing
+ hardware so as to exploit it accordingly and efficiently.
+"""
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = {'name': 'GCCcore', 'version': '8.3.0'}
+# need to build with -fno-tree-vectorize to avoid segfaulting lstopo on Intel Skylake
+# cfr. https://github.com/open-mpi/hwloc/issues/315
+toolchainopts = {'vectorize': False}
+
+source_urls = ['https://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/']
+sources = [SOURCE_TAR_GZ]
+
+builddependencies = [
+    ('binutils', '2.32'),
+]
+
+dependencies = [
+    ('numactl', '2.0.12', '', True),
+    ('libxml2', '2.9.9'),
+    ('X11', '20190311'), # For libpciaccess
+]
+
+configopts = "--enable-libnuma=$EBROOTNUMACTL "
+configopts += "--disable-cairo --disable-opencl --disable-cuda --disable-nvml --disable-gl --disable-libudev "
+
+sanity_check_paths = {
+    'files': ['bin/lstopo', 'include/hwloc/linux.h',
+              'lib/libhwloc.%s' % SHLIB_EXT],
+    'dirs': ['share/man/man3'],
+}
+sanity_check_commands = ['lstopo']
+
+moduleclass = 'system'
diff --git a/Golden_Repo/2019a/juwels_overlay/g/gmvmklc/gmvmklc-2019a-GDR.eb b/Golden_Repo/2019a/juwels_overlay/g/gmvmklc/gmvmklc-2019a-GDR.eb
new file mode 100644
index 000000000..3d45a1ced
--- /dev/null
+++ b/Golden_Repo/2019a/juwels_overlay/g/gmvmklc/gmvmklc-2019a-GDR.eb
@@ -0,0 +1,32 @@
+easyblock = "Toolchain"
+
+name = 'gmvmklc'
+version = '2019a-GDR'
+
+homepage = '(none)'
+description = """ GCC based compiler toolchain,
+ including CUDA and MVAPICH2 for CUDA-aware MPI support, and MKL
+"""
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = {'name': 'dummy', 'version': 'dummy'}
+
+comp_name = 'GCC'
+comp_version = '8.3.0'
+comp = (comp_name, comp_version)
+
+# toolchain used to build  dependencies
+comp_mpi_tc_name = 'gmvapich2c'
+comp_mpi_tc_ver = version
+comp_mpi_tc = (comp_mpi_tc_name, comp_mpi_tc_ver)
+
+# compiler toolchain dependencies
+dependencies = [
+    comp,
+    ('CUDA', '10.1.105', '', True),
+    ('MVAPICH2', '2.3.1', '-GDR', comp),
+    ('imkl', '2019.3.199', '', comp_mpi_tc),
+]
+
+moduleclass = 'toolchain'
diff --git a/Golden_Repo/2019a/juwels_overlay/p/pmvmklc/pmvmklc-2019a-GDR.eb b/Golden_Repo/2019a/juwels_overlay/p/pmvmklc/pmvmklc-2019a-GDR.eb
new file mode 100644
index 000000000..325b80877
--- /dev/null
+++ b/Golden_Repo/2019a/juwels_overlay/p/pmvmklc/pmvmklc-2019a-GDR.eb
@@ -0,0 +1,32 @@
+easyblock = "Toolchain"
+
+name = 'pmvmklc'
+version = '2019a-GDR'
+
+homepage = '(none)'
+description = """ PGI based compiler toolchain,
+ including CUDA and MVAPICH2 for CUDA-aware MPI support, and MKL
+"""
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = {'name': 'dummy', 'version': 'dummy'}
+
+comp_name = 'PGI'
+comp_version = '19.3-GCC-8.3.0'
+comp = (comp_name, comp_version)
+
+# toolchain used to build  dependencies
+comp_mpi_tc_name = 'pmvapich2c'
+comp_mpi_tc_ver = version
+comp_mpi_tc = (comp_mpi_tc_name, comp_mpi_tc_ver)
+
+# compiler toolchain dependencies
+dependencies = [
+    comp,
+    ('CUDA', '10.1.105', '', True),
+    ('MVAPICH2', '2.3.1', '-GDR', comp),
+    ('imkl', '2019.3.199', '', comp_mpi_tc),
+]
+
+moduleclass = 'toolchain'
diff --git a/Golden_Repo/2019a/knl_overlay/l/libfabric/libfabric-1.9.0.eb b/Golden_Repo/2019a/knl_overlay/l/libfabric/libfabric-1.9.0.eb
new file mode 100644
index 000000000..f739f3c3e
--- /dev/null
+++ b/Golden_Repo/2019a/knl_overlay/l/libfabric/libfabric-1.9.0.eb
@@ -0,0 +1,25 @@
+easyblock = 'ConfigureMake'
+
+name = 'libfabric'
+version = '1.9.0'
+
+homepage = 'https://github.com/ofiwg/libfabric/'
+description = """libfabric"""
+
+site_contacts = 'sc@fz-juelich.de'
+
+toolchain = {'name': 'dummy', 'version': 'dummy'}
+
+source_urls = ['https://github.com/ofiwg/libfabric/releases/download/v%(version)s/']
+sources = [SOURCELOWER_TAR_BZ2]
+
+builddependencies = [
+    ('binutils', '2.32'),
+    ('Autotools', '20180311'),
+]
+
+configopts = '--enable-psm2=yes --enable-psm=no '
+configopts += '--enable-rxd=no --enable-mlx=no '
+configopts += '--enable-mrail=no --enable-rxm=no '
+
+moduleclass = 'lib'
diff --git a/Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-GCC-8.3.0.eb b/Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-GCC-8.3.0.eb
new file mode 100644
index 000000000..982d62d83
--- /dev/null
+++ b/Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-GCC-8.3.0.eb
@@ -0,0 +1,93 @@
+easyblock = 'ConfigureMake'
+
+name = 'OpenMPI'
+version = '4.0.2'
+
+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': 'GCC', 'version': '8.3.0'}
+
+source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads']
+sources = [SOURCELOWER_TAR_GZ]
+
+patches = ['openmpi_4.0.2_ucx_1.7.0.patch']
+
+osdependencies = [
+    # needed for --with-verbs
+    ('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel'),
+    # needed for --with-pmix
+    ('pmix-devel'),
+]
+
+builddependencies = [
+    ('Autotools', '20180311'),
+    # Automake 1.15 is needed, since the configuration relies on aclocal-1.15 explicitely
+    ('Automake', '1.15.1'),
+]
+
+dependencies = [
+    ('zlib', '1.2.11'),
+    ('hwloc', '2.1.0'),
+    ('libfabric', '1.9.0', '', True),
+    ('libevent', '2.1.8'),
+]
+
+# Without this we might run into this https://github.com/open-mpi/ompi/issues/6058 for some reason. Observed with
+# 4.0.2, but not with 4.0.1
+preconfigopts = "./autogen.pl --force && "
+
+configopts = '--enable-shared '
+#configopts += '--enable-mpirun-prefix-by-default '  # suppress failure modes in relation to mpirun path
+configopts += '--with-hwloc=$EBROOTHWLOC '  # hwloc support
+configopts += '--with-ofi=$EBROOTLIBFABRIC '
+configopts += '--with-libevent=$EBROOTLIBEVENT '
+configopts += '--with-psm2 '
+configopts += '--without-orte '
+configopts += '--without-verbs '
+configopts += '--disable-oshmem '
+
+# to enable SLURM integration (site-specific)
+configopts += '--with-slurm --with-pmix=external --with-libevent=external --with-ompi-pmix-rte'
+
+libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"]
+sanity_check_paths = {
+    'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper"]] +
+             ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] +
+             ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]],
+    'dirs': [],
+}
+
+modextravars = {
+    'SLURM_MPI_TYPE': 'pspmix'
+}
+
+# Configure OpenMPI
+postinstallcmds = [
+    'echo "mca_base_component_show_load_errors = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "mpi_param_check = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "mpi_show_handle_leaks = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "mpi_warn_on_fork = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "btl = self,vader,openib" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "btl_openib_allow_ib = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "btl_openib_if_include = mlx5_0:1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "bml_r2_show_unreach_errors = 0" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "coll = ^ml" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "coll_hcoll_enable = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "coll_hcoll_np = 0" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "pml = ucx" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "osc = ^rdma" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "opal_abort_print_stack = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "opal_set_max_sys_limits = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "opal_event_include = epoll" >> %(installdir)s/etc/openmpi-mca-params.conf',
+]
+
+# Add a family for our naming scheme
+modluafooter = '''
+family("mpi")
+add_property("arch","gpu")
+'''
+
+moduleclass = 'mpi'
diff --git a/Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-iccifort-2019.5.281-GCC-8.3.0.eb b/Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-iccifort-2019.5.281-GCC-8.3.0.eb
new file mode 100644
index 000000000..6dafaa3c7
--- /dev/null
+++ b/Golden_Repo/2019a/knl_overlay/o/OpenMPI/OpenMPI-4.0.2-iccifort-2019.5.281-GCC-8.3.0.eb
@@ -0,0 +1,93 @@
+easyblock = 'ConfigureMake'
+
+name = 'OpenMPI'
+version = '4.0.2'
+
+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': 'iccifort', 'version': '2019.5.281-GCC-8.3.0'}
+
+source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads']
+sources = [SOURCELOWER_TAR_GZ]
+
+patches = ['openmpi_4.0.2_ucx_1.7.0.patch']
+
+osdependencies = [
+    # needed for --with-verbs
+    ('libibverbs-dev', 'libibverbs-devel', 'rdma-core-devel'),
+    # needed for --with-pmix
+    ('pmix-devel'),
+]
+
+builddependencies = [
+    ('Autotools', '20180311'),
+    # Automake 1.15 is needed, since the configuration relies on aclocal-1.15 explicitely
+    ('Automake', '1.15.1'),
+]
+
+dependencies = [
+    ('zlib', '1.2.11'),
+    ('hwloc', '2.1.0'),
+    ('libfabric', '1.9.0', '', True),
+    ('libevent', '2.1.8'),
+]
+
+# Without this we might run into this https://github.com/open-mpi/ompi/issues/6058 for some reason. Observed with
+# 4.0.2, but not with 4.0.1
+preconfigopts = "./autogen.pl --force && "
+
+configopts = '--enable-shared '
+#configopts += '--enable-mpirun-prefix-by-default '  # suppress failure modes in relation to mpirun path
+configopts += '--with-hwloc=$EBROOTHWLOC '  # hwloc support
+configopts += '--with-ofi=$EBROOTLIBFABRIC '
+configopts += '--with-libevent=$EBROOTLIBEVENT '
+configopts += '--with-psm2 '
+configopts += '--without-orte '
+configopts += '--without-verbs '
+configopts += '--disable-oshmem '
+
+# to enable SLURM integration (site-specific)
+configopts += '--with-slurm --with-pmix=external --with-libevent=external --with-ompi-pmix-rte'
+
+libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"]
+sanity_check_paths = {
+    'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper"]] +
+             ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] +
+             ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]],
+    'dirs': [],
+}
+
+modextravars = {
+    'SLURM_MPI_TYPE': 'pspmix'
+}
+
+# Configure OpenMPI
+postinstallcmds = [
+    'echo "mca_base_component_show_load_errors = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "mpi_param_check = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "mpi_show_handle_leaks = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "mpi_warn_on_fork = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "btl = self,vader,openib" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "btl_openib_allow_ib = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "btl_openib_if_include = mlx5_0:1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "bml_r2_show_unreach_errors = 0" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "coll = ^ml" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "coll_hcoll_enable = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "coll_hcoll_np = 0" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "pml = ucx" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "osc = ^rdma" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "opal_abort_print_stack = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "opal_set_max_sys_limits = 1" >> %(installdir)s/etc/openmpi-mca-params.conf',
+    'echo "opal_event_include = epoll" >> %(installdir)s/etc/openmpi-mca-params.conf',
+]
+
+# Add a family for our naming scheme
+modluafooter = '''
+family("mpi")
+add_property("arch","gpu")
+'''
+
+moduleclass = 'mpi'
-- 
GitLab