Skip to content

Commit

Permalink
{mpi}[NVHPC/24.9] Add OpenMPI 5.0.3
Browse files Browse the repository at this point in the history
Signed-off-by: Jan André Reuter <[email protected]>
  • Loading branch information
Thyre committed Nov 22, 2024
1 parent 01c1b04 commit 3c748e0
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name = 'OpenMPI'
version = '5.0.3'

homepage = 'https://www.open-mpi.org/'
description = """The Open MPI Project is an open source MPI-3 implementation."""

toolchain = {'name': 'NVHPC', 'version': '24.9-CUDA-12.6.0'}

source_urls = ['https://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads']
sources = [SOURCELOWER_TAR_BZ2]
patches = [
'OpenMPI-5.0.3_fix_hle_make_errors.patch',
'OpenMPI-5.0.3_disable_opal_path_nfs_test.patch',
('OpenMPI-5.0.2_build-with-internal-cuda-header.patch', 1)
]
checksums = [
{'openmpi-5.0.3.tar.bz2':
'990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b'},
{'OpenMPI-5.0.3_fix_hle_make_errors.patch':
'881c907a9f5901d5d6af41cd33dffdcecba4a67a9e5123e602542aea57a80895'},
{'OpenMPI-5.0.3_disable_opal_path_nfs_test.patch':
'75d4417e35252ea3a19b2792f1b06e9aeb408c253aa4921d77226d57b71dee45'},
{'OpenMPI-5.0.2_build-with-internal-cuda-header.patch':
'f52dc470543f35efef10d651dd159c771ae25f8f76a420d20d87abf4dc769ed7'},
]

builddependencies = [
('pkgconf', '2.2.0'),
('Perl', '5.38.2'),
('Autotools', '20231222'),
]

dependencies = [
('zlib', '1.3.1'),
('hwloc', '2.10.0'),
('libevent', '2.1.12'),
('UCX', '1.16.0'),
('UCX-CUDA', '1.16.0', '-CUDA-%(cudaver)s'),
('libfabric', '1.21.0'),
('PMIx', '5.0.2'),
('PRRTE', '3.0.5'),
('UCC', '1.3.0'),
('UCC-CUDA', '1.3.0', '-CUDA-%(cudaver)s'),
]

# CUDA related patches and custom configure option can be removed if CUDA support isn't wanted.
preconfigopts = 'nvc -Iopal/mca/cuda/include -shared opal/mca/cuda/lib/cuda.c -o opal/mca/cuda/lib/libcuda.so && '
# Update configure to include changes from the "disable_opal_path_nfs_test" patch
preconfigopts += './autogen.pl --force && '

configopts = '--with-cuda=%(start_dir)s/opal/mca/cuda '
# Required to prevent internal compiler error in opal.
configopts += '--enable-alt-short-float=no '
# Set PGI compilers manually, as NVHPC compilers are not correctly detected
configopts += 'CC=pgcc CXX=pgc++ FC=pgfortran '

# site specific options
# configopts += '--without-psm2 '
# configopts += '--disable-oshmem '
# configopts += '--with-gpfs '
configopts += '--with-slurm '

moduleclass = 'mpi'
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Disable opal_path_nfs test in OpenMPI 5.0.3 as this test can easily fail on some systems,
when NFS mounts are used. Generally, this test is flaky, which may prevent users
from installing OpenMPI for no apparent reason.

diff --git a/test/util/Makefile.am b/test/util/Makefile.am
index e5ad472..33d63c4 100644
--- a/test/util/Makefile.am
+++ b/test/util/Makefile.am
@@ -38,7 +38,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/test/support

check_PROGRAMS = \
opal_bit_ops \
- opal_path_nfs \
bipartite_graph \
opal_sha256

@@ -80,11 +79,11 @@ opal_bit_ops_LDADD = \
$(top_builddir)/test/support/libsupport.a
opal_bit_ops_DEPENDENCIES = $(opal_path_nfs_LDADD)

-opal_path_nfs_SOURCES = opal_path_nfs.c
-opal_path_nfs_LDADD = \
- $(top_builddir)/opal/lib@[email protected] \
- $(top_builddir)/test/support/libsupport.a
-opal_path_nfs_DEPENDENCIES = $(opal_path_nfs_LDADD)
+# opal_path_nfs_SOURCES = opal_path_nfs.c
+# opal_path_nfs_LDADD = \
+# $(top_builddir)/opal/lib@[email protected] \
+# $(top_builddir)/test/support/libsupport.a
+# opal_path_nfs_DEPENDENCIES = $(opal_path_nfs_LDADD)

#opal_os_path_SOURCES = opal_os_path.c
#opal_os_path_LDADD = \
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
On JUWELS, building OpenMPI 5.0.5 with NVHPC 24.9 fails with errors
related to `__ATOMIC_HLE_ACQUIRE` and `__ATOMIC_HLE_RELEASE` not being
defined. Add an additional macro check to let the build succeed.

--- a/opal/include/opal/sys/gcc_builtin/atomic.h 2024-07-23 01:23:20.567556032 +0200
+++ a/opal/include/opal/sys/gcc_builtin/atomic.h 2024-10-02 12:19:53.130698758 +0200
@@ -187,7 +187,7 @@
*
*********************************************************************/

-#if defined(__HLE__)
+#if defined(__HLE__) && defined(__ATOMIC_HLE_ACQUIRE) && defined(__ATOMIC_HLE_RELEASE)

# include <immintrin.h>

@@ -225,7 +225,7 @@
__ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
}

-#else /* #if defined(__HLE__) */
+#else /* #if defined(__HLE__) && defined(__ATOMIC_HLE_ACQUIRE) && defined(__ATOMIC_HLE_RELEASE) */

#include "opal/sys/atomic_impl_spinlock.h"


0 comments on commit 3c748e0

Please sign in to comment.