Skip to content

Commit 766d48e

Browse files
lamikrMika Laitio
authored and
Mika Laitio
committed
amd-fftw fix wrong parameter type with ompi 5.0.1
fixes detected on fedora40/gcc 14 build fixes: #12 Signed-off-by: Mika Laitio <[email protected]>
1 parent 9c1f913 commit 766d48e

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
From 7d168fcd8b3d015fb9d06876e2d43e8cc38f8efe Mon Sep 17 00:00:00 2001
2+
From: Mika Laitio <[email protected]>
3+
Date: Wed, 29 May 2024 15:16:57 -0700
4+
Subject: [PATCH] fix parameter type for openmpi 5.0.1
5+
MIME-Version: 1.0
6+
Content-Type: text/plain; charset=UTF-8
7+
Content-Transfer-Encoding: 8bit
8+
9+
detected on fedora 40/gcc build that
10+
at least OpenMPI 5.0.1 request that last
11+
parameter on some function calls needs to be
12+
MPI_Request instead of MPI_Status
13+
14+
original build error
15+
/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/transpose-pairwise-omc.c:108:115: error: passing argument 7 of ‘MPI_Isend’ from incompatible pointer type [-Wincompatible-pointer-types]
16+
108 | MPI_Isend(buf[j&0x1], (int) (sbs[pe]), FFTW_MPI_TYPE, pe, (my_pe * n_pes + pe) & 0xffff, comm, &send_status);
17+
| ^~~~~~~~~~~~
18+
| |
19+
| MPI_Status * {aka struct ompi_status_public_t *}
20+
libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi -I.. -I /home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw -I /home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/api -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -I/opt/rocm_sdk_611/include -I/opt/rocm_sdk_611/hsa/include -I/opt/rocm_sdk_611/rocm_smi/include -I/opt/rocm_sdk_611/rocblas/include -mno-avx256-split-unaligned-store -mno-avx256-split-unaligned-load -mno-prefer-avx128 -MT dft-rank-geq2-transposed.lo -MD -MP -MF .deps/dft-rank-geq2-transposed.Tpo -c /home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/dft-rank-geq2-transposed.c -fPIC -DPIC -o .libs/dft-rank-geq2-transposed.o
21+
In file included from /home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/ifftw-mpi.h:28,
22+
from /home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/mpi-transpose.h:22,
23+
from /home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/transpose-pairwise-omc.c:32:
24+
/opt/rocm_sdk_611/include/mpi.h:1783:67: note: expected ‘struct ompi_request_t **’ but argument is of type ‘MPI_Status *’ {aka ‘struct ompi_status_public_t *’}
25+
1783 | int tag, MPI_Comm comm, MPI_Request *request);
26+
| ~~~~~~~~~~~~~^~~~~~~
27+
/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/transpose-pairwise-omc.c:109:116: error: passing argument 7 of ‘MPI_Irecv’ from incompatible pointer type [-Wincompatible-pointer-types]
28+
109 | MPI_Irecv(O + rbo[pe], (int) (rbs[pe]), FFTW_MPI_TYPE, pe, (pe * n_pes + my_pe) & 0xffff, comm, &recv_status);
29+
| ^~~~~~~~~~~~
30+
| |
31+
| MPI_Status * {aka struct ompi_status_public_t *}
32+
/opt/rocm_sdk_611/include/mpi.h:1779:67: note: expected ‘struct ompi_request_t **’ but argument is of type ‘MPI_Status *’ {aka ‘struct ompi_status_public_t *’}
33+
1779 | int tag, MPI_Comm comm, MPI_Request *request);
34+
| ~~~~~~~~~~~~~^~~~~~~
35+
/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/transpose-pairwise-omc.c:113:29: error: passing argument 1 of ‘MPI_Wait’ from incompatible pointer type [-Wincompatible-pointer-types]
36+
113 | MPI_Wait(&send_status, MPI_STATUS_IGNORE);
37+
| ^~~~~~~~~~~~
38+
| |
39+
| MPI_Status * {aka struct ompi_status_public_t *}
40+
/opt/rocm_sdk_611/include/mpi.h:2099:42: note: expected ‘struct ompi_request_t **’ but argument is of type ‘MPI_Status *’ {aka ‘struct ompi_status_public_t *’}
41+
2099 | OMPI_DECLSPEC int MPI_Wait(MPI_Request *request, MPI_Status *status);
42+
| ~~~~~~~~~~~~~^~~~~~~
43+
/home/lamikr/own/rocm/src/sdk/rocm_sdk_builder_611/src_projects/amd-fftw/mpi/transpose-pairwise-omc.c:114:29: error: passing argument 1 of ‘MPI_Wait’ from incompatible pointer type [-Wincompatible-pointer-types]
44+
114 | MPI_Wait(&recv_status, MPI_STATUS_IGNORE);
45+
| ^~~~~~~~~~~~
46+
| |
47+
| MPI_Status * {aka struct ompi_status_public_t *}
48+
/opt/rocm_sdk_611/include/mpi.h:2099:42: note: expected ‘struct ompi_request_t **’ but argument is of type ‘MPI_Status *’ {aka ‘struct ompi_status_public_t *’}
49+
2099 | OMPI_DECLSPEC int MPI_Wait(MPI_Request *request, MPI_Status *status);
50+
51+
Signed-off-by: Mika Laitio <[email protected]>
52+
---
53+
mpi/transpose-pairwise-omc.c | 2 +-
54+
1 file changed, 1 insertion(+), 1 deletion(-)
55+
56+
diff --git a/mpi/transpose-pairwise-omc.c b/mpi/transpose-pairwise-omc.c
57+
index 41b588c7..298ab644 100644
58+
--- a/mpi/transpose-pairwise-omc.c
59+
+++ b/mpi/transpose-pairwise-omc.c
60+
@@ -71,7 +71,7 @@ static void transpose_chunks(int *sched, int n_pes, int my_pe,
61+
buf[1] = bufs[1];
62+
#endif
63+
int pe = sched[0], pe2, j=0;
64+
- MPI_Status send_status, recv_status;
65+
+ MPI_Request send_status, recv_status;
66+
67+
#ifdef AMD_MPI_TRANSPOSE_LOGS
68+
printf("TRANSPOSE-PAIRWISE: n_pes[%d], my_pe[%d], first_pe[%d]\n", n_pes, my_pe, pe);
69+
--
70+
2.45.1
71+

0 commit comments

Comments
 (0)