Skip to content

Commit 588b213

Browse files
committed
OpenMPI: Add missing header for ROCm memcpy
Taken from open-mpi/ompi#13295 and the 5.0.x backport.
1 parent 9f9ee8c commit 588b213

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

openmpi-rocm-include-fix.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/opal/mca/accelerator/rocm/accelerator_rocm_module.c b/opal/mca/accelerator/rocm/accelerator_rocm_module.c
2+
index c66467cadec..1419eeedcfe 100644
3+
--- a/opal/mca/accelerator/rocm/accelerator_rocm_module.c
4+
+++ b/opal/mca/accelerator/rocm/accelerator_rocm_module.c
5+
@@ -16,6 +16,7 @@
6+
#include "opal/constants.h"
7+
#include "opal/util/output.h"
8+
#include "ompi/info/info_memkind.h"
9+
+#include <string.h>
10+
11+
/* Accelerator API's */
12+
static int mca_accelerator_rocm_check_addr(const void *addr, int *dev_id, uint64_t *flags);

openmpi.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
%define tag v%{realversion}
77
Source: git+https://github.com/open-mpi/ompi.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}.tgz
88
Patch0: openmpi-setenv-fix
9+
Patch1: openmpi-rocm-include-fix
910
BuildRequires: autotools flex
1011
%{!?without_cuda:Requires: cuda}
1112
%{!?without_rocm:Requires: rocm}
@@ -26,6 +27,7 @@ Requires: zlib
2627
%prep
2728
%setup -q -n %{n}-%{realversion}
2829
%patch0 -p1
30+
%patch1 -p1
2931

3032
#Make sure IPATH_NO_BACKTRACE and HFI_NO_BACKTRACE default values match what we expect (see cmsdist/openmpi-opt.file)
3133
grep ' opal_setenv("IPATH_NO_BACKTRACE", "%{IPATH_NO_BACKTRACE}", true, &environ)' opal/runtime/opal_init.c

0 commit comments

Comments
 (0)