1717 * Copyright (c) 2015-2017 Research Organization for Information Science
1818 * and Technology (RIST). All rights reserved.
1919 * Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
20- * Copyright (c) 2018-2019 Triad National Security, LLC. All rights
20+ * Copyright (c) 2018-2025 Triad National Security, LLC. All rights
2121 * reserved.
2222 * Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
2323 * $COPYRIGHT$
@@ -206,7 +206,7 @@ static int alloc_window(struct ompi_communicator_t *comm, opal_info_t *info, int
206206}
207207
208208static int
209- config_window (void * base , size_t size , int disp_unit ,
209+ config_window (void * base , size_t size , ptrdiff_t disp_unit ,
210210 int flavor , int model , ompi_win_t * win )
211211{
212212 int ret ;
@@ -220,9 +220,15 @@ config_window(void *base, size_t size, int disp_unit,
220220 MPI_WIN_SIZE , size , true);
221221 if (OMPI_SUCCESS != ret ) return ret ;
222222
223+ /*
224+ * No this isn't really right but the MPI Forum RMA WG was spleeping during
225+ * Big count proposal reading and didn't put in something for Table 12.1 of the
226+ * MPI 5.0 standard for embiggened disp_unit, so here we go with int * in accordance
227+ * with that table.
228+ */
223229 ret = ompi_attr_set_int (WIN_ATTR , win ,
224230 & win -> w_keyhash ,
225- MPI_WIN_DISP_UNIT , disp_unit ,
231+ MPI_WIN_DISP_UNIT , ( int ) disp_unit ,
226232 true);
227233 if (OMPI_SUCCESS != ret ) return ret ;
228234
@@ -244,7 +250,7 @@ config_window(void *base, size_t size, int disp_unit,
244250
245251int
246252ompi_win_create (void * base , size_t size ,
247- int disp_unit , ompi_communicator_t * comm ,
253+ ptrdiff_t disp_unit , ompi_communicator_t * comm ,
248254 opal_info_t * info ,
249255 ompi_win_t * * newwin )
250256{
@@ -275,7 +281,7 @@ ompi_win_create(void *base, size_t size,
275281}
276282
277283int
278- ompi_win_allocate (size_t size , int disp_unit , opal_info_t * info ,
284+ ompi_win_allocate (size_t size , ptrdiff_t disp_unit , opal_info_t * info ,
279285 ompi_communicator_t * comm , void * baseptr , ompi_win_t * * newwin )
280286{
281287 ompi_win_t * win ;
@@ -307,7 +313,7 @@ ompi_win_allocate(size_t size, int disp_unit, opal_info_t *info,
307313}
308314
309315int
310- ompi_win_allocate_shared (size_t size , int disp_unit , opal_info_t * info ,
316+ ompi_win_allocate_shared (size_t size , ptrdiff_t disp_unit , opal_info_t * info ,
311317 ompi_communicator_t * comm , void * baseptr , ompi_win_t * * newwin )
312318{
313319 ompi_win_t * win ;
0 commit comments