Skip to content

Commit 60ea322

Browse files
committed
Fix various missing bigcount functions
Signed-off-by: Jake Tronge <[email protected]>
1 parent c09c91e commit 60ea322

File tree

12 files changed

+120
-37
lines changed

12 files changed

+120
-37
lines changed

VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ minor=1
2020
release=0
2121

2222
# MPI Standard Compliance Level
23-
mpi_standard_version=3
24-
mpi_standard_subversion=1
23+
mpi_standard_version=4
24+
mpi_standard_subversion=0
2525

2626
# OMPI required dependency versions.
2727
# List in x.y.z format.

ompi/include/mpi.h.in

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,6 +1793,8 @@ OMPI_DECLSPEC int MPI_File_write_ordered_begin_c(MPI_File fh, const void *buf,
17931793
OMPI_DECLSPEC int MPI_File_write_ordered_end(MPI_File fh, const void *buf, MPI_Status *status);
17941794
OMPI_DECLSPEC int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype,
17951795
MPI_Aint *extent);
1796+
OMPI_DECLSPEC int MPI_File_get_type_extent_c(MPI_File fh, MPI_Datatype datatype,
1797+
MPI_Count *extent);
17961798
OMPI_DECLSPEC int MPI_File_set_atomicity(MPI_File fh, int flag);
17971799
OMPI_DECLSPEC int MPI_File_get_atomicity(MPI_File fh, int *flag);
17981800
OMPI_DECLSPEC int MPI_File_sync(MPI_File fh);
@@ -2067,6 +2069,7 @@ OMPI_DECLSPEC int MPI_Neighbor_alltoallw_init_c(const void *sendbuf, const MPI_
20672069
OMPI_DECLSPEC MPI_Fint MPI_Op_c2f(MPI_Op op);
20682070
OMPI_DECLSPEC int MPI_Op_commutative(MPI_Op op, int *commute);
20692071
OMPI_DECLSPEC int MPI_Op_create(MPI_User_function *function, int commute, MPI_Op *op);
2072+
OMPI_DECLSPEC int MPI_Op_create_c(MPI_User_function_c *function, int commute, MPI_Op *op);
20702073
OMPI_DECLSPEC int MPI_Open_port(MPI_Info info, char *port_name);
20712074
OMPI_DECLSPEC MPI_Op MPI_Op_f2c(MPI_Fint op);
20722075
OMPI_DECLSPEC int MPI_Op_free(MPI_Op *op);
@@ -2079,7 +2082,7 @@ OMPI_DECLSPEC int MPI_Pack_external_c(const char datarep[], const void *inbuf,
20792082
OMPI_DECLSPEC int MPI_Pack_external_size(const char datarep[], int incount,
20802083
MPI_Datatype datatype, MPI_Aint *size);
20812084
OMPI_DECLSPEC int MPI_Pack_external_size_c(const char datarep[], MPI_Count incount,
2082-
MPI_Datatype datatype, MPI_Aint *size);
2085+
MPI_Datatype datatype, MPI_Count *size);
20832086
OMPI_DECLSPEC int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype,
20842087
void *outbuf, int outsize, int *position, MPI_Comm comm);
20852088
OMPI_DECLSPEC int MPI_Pack_c(const void *inbuf, MPI_Count incount, MPI_Datatype datatype,
@@ -2414,6 +2417,8 @@ OMPI_DECLSPEC int MPI_Type_get_envelope_c(MPI_Datatype type, MPI_Count *num_int
24142417
MPI_Count *num_datatypes, int *combiner);
24152418
OMPI_DECLSPEC int MPI_Type_get_extent(MPI_Datatype type, MPI_Aint *lb,
24162419
MPI_Aint *extent);
2420+
OMPI_DECLSPEC int MPI_Type_get_extent_c(MPI_Datatype type, MPI_Count *lb,
2421+
MPI_Count *extent);
24172422
OMPI_DECLSPEC int MPI_Type_get_extent_x(MPI_Datatype type, MPI_Count *lb,
24182423
MPI_Count *extent);
24192424
OMPI_DECLSPEC int MPI_Type_get_name(MPI_Datatype type, char *type_name,
@@ -2449,8 +2454,8 @@ OMPI_DECLSPEC int MPI_Unpublish_name(const char *service_name, MPI_Info info, c
24492454
OMPI_DECLSPEC int MPI_Unpack_external (const char datarep[], const void *inbuf, MPI_Aint insize,
24502455
MPI_Aint *position, void *outbuf, int outcount,
24512456
MPI_Datatype datatype);
2452-
OMPI_DECLSPEC int MPI_Unpack_external_c (const char datarep[], const void *inbuf, MPI_Aint insize,
2453-
MPI_Aint *position, void *outbuf, MPI_Count outcount,
2457+
OMPI_DECLSPEC int MPI_Unpack_external_c (const char datarep[], const void *inbuf, MPI_Count insize,
2458+
MPI_Count *position, void *outbuf, MPI_Count outcount,
24542459
MPI_Datatype datatype);
24552460
OMPI_DECLSPEC int MPI_Waitall(int count, MPI_Request array_of_requests[],
24562461
MPI_Status *array_of_statuses);
@@ -2462,14 +2467,20 @@ OMPI_DECLSPEC int MPI_Waitsome(int incount, MPI_Request array_of_requests[],
24622467
MPI_Status array_of_statuses[]);
24632468
OMPI_DECLSPEC int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info,
24642469
MPI_Comm comm, void *baseptr, MPI_Win *win);
2470+
OMPI_DECLSPEC int MPI_Win_allocate_c(MPI_Aint size, MPI_Aint disp_unit, MPI_Info info,
2471+
MPI_Comm comm, void *baseptr, MPI_Win *win);
24652472
OMPI_DECLSPEC int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info,
24662473
MPI_Comm comm, void *baseptr, MPI_Win *win);
2474+
OMPI_DECLSPEC int MPI_Win_allocate_shared_c(MPI_Aint size, MPI_Aint disp_unit, MPI_Info info,
2475+
MPI_Comm comm, void *baseptr, MPI_Win *win);
24672476
OMPI_DECLSPEC int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size);
24682477
OMPI_DECLSPEC MPI_Fint MPI_Win_c2f(MPI_Win win);
24692478
OMPI_DECLSPEC int MPI_Win_call_errhandler(MPI_Win win, int errorcode);
24702479
OMPI_DECLSPEC int MPI_Win_complete(MPI_Win win);
24712480
OMPI_DECLSPEC int MPI_Win_create(void *base, MPI_Aint size, int disp_unit,
24722481
MPI_Info info, MPI_Comm comm, MPI_Win *win);
2482+
OMPI_DECLSPEC int MPI_Win_create_c(void *base, MPI_Aint size, MPI_Aint disp_unit,
2483+
MPI_Info info, MPI_Comm comm, MPI_Win *win);
24732484
OMPI_DECLSPEC int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win);
24742485
OMPI_DECLSPEC int MPI_Win_create_errhandler(MPI_Win_errhandler_function *function,
24752486
MPI_Errhandler *errhandler);
@@ -2913,6 +2924,8 @@ OMPI_DECLSPEC int PMPI_File_write_ordered_begin_c(MPI_File fh, const void *buf,
29132924
OMPI_DECLSPEC int PMPI_File_write_ordered_end(MPI_File fh, const void *buf, MPI_Status *status);
29142925
OMPI_DECLSPEC int PMPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype,
29152926
MPI_Aint *extent);
2927+
OMPI_DECLSPEC int PMPI_File_get_type_extent_c(MPI_File fh, MPI_Datatype datatype,
2928+
MPI_Count *extent);
29162929
OMPI_DECLSPEC int PMPI_File_set_atomicity(MPI_File fh, int flag);
29172930
OMPI_DECLSPEC int PMPI_File_get_atomicity(MPI_File fh, int *flag);
29182931
OMPI_DECLSPEC int PMPI_File_sync(MPI_File fh);
@@ -3187,6 +3200,7 @@ OMPI_DECLSPEC int PMPI_Neighbor_alltoallw_init_c(const void *sendbuf, const MPI
31873200
OMPI_DECLSPEC MPI_Fint PMPI_Op_c2f(MPI_Op op);
31883201
OMPI_DECLSPEC int PMPI_Op_commutative(MPI_Op op, int *commute);
31893202
OMPI_DECLSPEC int PMPI_Op_create(MPI_User_function *function, int commute, MPI_Op *op);
3203+
OMPI_DECLSPEC int PMPI_Op_create_c(MPI_User_function_c *function, int commute, MPI_Op *op);
31903204
OMPI_DECLSPEC int PMPI_Open_port(MPI_Info info, char *port_name);
31913205
OMPI_DECLSPEC MPI_Op PMPI_Op_f2c(MPI_Fint op);
31923206
OMPI_DECLSPEC int PMPI_Op_free(MPI_Op *op);
@@ -3199,7 +3213,7 @@ OMPI_DECLSPEC int PMPI_Pack_external_c(const char datarep[], const void *inbuf,
31993213
OMPI_DECLSPEC int PMPI_Pack_external_size(const char datarep[], int incount,
32003214
MPI_Datatype datatype, MPI_Aint *size);
32013215
OMPI_DECLSPEC int PMPI_Pack_external_size_c(const char datarep[], MPI_Count incount,
3202-
MPI_Datatype datatype, MPI_Aint *size);
3216+
MPI_Datatype datatype, MPI_Count *size);
32033217
OMPI_DECLSPEC int PMPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype,
32043218
void *outbuf, int outsize, int *position, MPI_Comm comm);
32053219
OMPI_DECLSPEC int PMPI_Pack_c(const void *inbuf, MPI_Count incount, MPI_Datatype datatype,
@@ -3534,6 +3548,8 @@ OMPI_DECLSPEC int PMPI_Type_get_envelope_c(MPI_Datatype type, MPI_Count *num_in
35343548
MPI_Count *num_datatypes, int *combiner);
35353549
OMPI_DECLSPEC int PMPI_Type_get_extent(MPI_Datatype type, MPI_Aint *lb,
35363550
MPI_Aint *extent);
3551+
OMPI_DECLSPEC int PMPI_Type_get_extent_c(MPI_Datatype type, MPI_Count *lb,
3552+
MPI_Count *extent);
35373553
OMPI_DECLSPEC int PMPI_Type_get_extent_x(MPI_Datatype type, MPI_Count *lb,
35383554
MPI_Count *extent);
35393555
OMPI_DECLSPEC int PMPI_Type_get_name(MPI_Datatype type, char *type_name,
@@ -3569,8 +3585,8 @@ OMPI_DECLSPEC int PMPI_Unpublish_name(const char *service_name, MPI_Info info,
35693585
OMPI_DECLSPEC int PMPI_Unpack_external (const char datarep[], const void *inbuf, MPI_Aint insize,
35703586
MPI_Aint *position, void *outbuf, int outcount,
35713587
MPI_Datatype datatype);
3572-
OMPI_DECLSPEC int PMPI_Unpack_external_c (const char datarep[], const void *inbuf, MPI_Aint insize,
3573-
MPI_Aint *position, void *outbuf, MPI_Count outcount,
3588+
OMPI_DECLSPEC int PMPI_Unpack_external_c (const char datarep[], const void *inbuf, MPI_Count insize,
3589+
MPI_Count *position, void *outbuf, MPI_Count outcount,
35743590
MPI_Datatype datatype);
35753591
OMPI_DECLSPEC int PMPI_Waitall(int count, MPI_Request array_of_requests[],
35763592
MPI_Status *array_of_statuses);
@@ -3582,14 +3598,20 @@ OMPI_DECLSPEC int PMPI_Waitsome(int incount, MPI_Request array_of_requests[],
35823598
MPI_Status array_of_statuses[]);
35833599
OMPI_DECLSPEC int PMPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info,
35843600
MPI_Comm comm, void *baseptr, MPI_Win *win);
3601+
OMPI_DECLSPEC int PMPI_Win_allocate_c(MPI_Aint size, MPI_Aint disp_unit, MPI_Info info,
3602+
MPI_Comm comm, void *baseptr, MPI_Win *win);
35853603
OMPI_DECLSPEC int PMPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info,
35863604
MPI_Comm comm, void *baseptr, MPI_Win *win);
3605+
OMPI_DECLSPEC int PMPI_Win_allocate_shared_c(MPI_Aint size, MPI_Aint disp_unit, MPI_Info info,
3606+
MPI_Comm comm, void *baseptr, MPI_Win *win);
35873607
OMPI_DECLSPEC int PMPI_Win_attach(MPI_Win win, void *base, MPI_Aint size);
35883608
OMPI_DECLSPEC MPI_Fint PMPI_Win_c2f(MPI_Win win);
35893609
OMPI_DECLSPEC int PMPI_Win_call_errhandler(MPI_Win win, int errorcode);
35903610
OMPI_DECLSPEC int PMPI_Win_complete(MPI_Win win);
35913611
OMPI_DECLSPEC int PMPI_Win_create(void *base, MPI_Aint size, int disp_unit,
35923612
MPI_Info info, MPI_Comm comm, MPI_Win *win);
3613+
OMPI_DECLSPEC int PMPI_Win_create_c(void *base, MPI_Aint size, MPI_Aint disp_unit,
3614+
MPI_Info info, MPI_Comm comm, MPI_Win *win);
35933615
OMPI_DECLSPEC int PMPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win);
35943616
OMPI_DECLSPEC int PMPI_Win_create_errhandler(MPI_Win_errhandler_function *function,
35953617
MPI_Errhandler *errhandler);

ompi/mpi/bindings/ompi_bindings/c_type.py

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,19 @@ def type_text(self, enable_count=False):
141141
return 'MPI_Count'
142142

143143

144+
@Type.add_type('DISP')
145+
class TypeDisp(Type):
146+
147+
@property
148+
def is_count(self):
149+
return True
150+
151+
def type_text(self, enable_count=False):
152+
return 'MPI_Aint' if enable_count else 'int'
153+
154+
144155
@Type.add_type('DISP_ARRAY')
145-
class TypeDisplArray(Type):
156+
class TypeDispArray(Type):
146157

147158
@property
148159
def is_count(self):
@@ -199,6 +210,7 @@ def parameter(self, enable_count=False, **kwargs):
199210
else:
200211
return f'int {self.name}[]'
201212

213+
202214
@Type.add_type('COUNT_OUT')
203215
class TypeCountOut(Type):
204216

@@ -209,6 +221,29 @@ def is_count(self):
209221
def type_text(self, enable_count=False):
210222
return 'MPI_Count *' if enable_count else 'int *'
211223

224+
225+
@Type.add_type('AINT_COUNT')
226+
class TypeAintCountOut(Type):
227+
228+
@property
229+
def is_count(self):
230+
return True
231+
232+
def type_text(self, enable_count=False):
233+
return 'MPI_Count' if enable_count else 'MPI_Aint'
234+
235+
236+
@Type.add_type('AINT_COUNT_OUT')
237+
class TypeAintCountOut(Type):
238+
239+
@property
240+
def is_count(self):
241+
return True
242+
243+
def type_text(self, enable_count=False):
244+
return 'MPI_Count *' if enable_count else 'MPI_Aint *'
245+
246+
212247
@Type.add_type('INT_ARRAY')
213248
class TypeIntArray(Type):
214249

@@ -867,8 +902,12 @@ class TypeDeleteFunctionStandard(Type):
867902
@Type.add_type('USER_FUNCTION', abi_type=['ompi'])
868903
class TypeUserFunction(Type):
869904

905+
@property
906+
def is_count(self):
907+
return True
908+
870909
def type_text(self, enable_count=False):
871-
return 'MPI_User_function *'
910+
return 'MPI_User_function_c *' if enable_count else 'MPI_User_function *'
872911

873912

874913
@Type.add_type('USER_FUNCTION', abi_type=['standard'])

ompi/mpi/bindings/ompi_bindings/util.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,18 @@ def abi_internal_name(extname):
126126
return f'{extname}_ABI_INTERNAL'
127127

128128

129+
BIGCOUNT_TYPE_NAMES = [
130+
'COUNT',
131+
'COUNT_ARRAY',
132+
'DISP',
133+
'DISP_ARRAY',
134+
'COUNT_OUT',
135+
'AINT_COUNT',
136+
'AINT_COUNT_OUT',
137+
'USER_FUNCTION',
138+
]
139+
140+
129141
def prototype_has_bigcount(prototype):
130142
"""Should this prototype have a bigcount version?"""
131-
return any(param.type_name in ('COUNT', 'COUNT_ARRAY', 'DISP', 'DISP_ARRAY', 'COUNT_OUT')
132-
for param in prototype.params)
143+
return any(param.type_name in BIGCOUNT_TYPE_NAMES for param in prototype.params)

ompi/mpi/c/file_get_type_extent.c.in

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
/* TODO: Does this need a bigcount variant? */
3333

3434
PROTOTYPE ERROR_CLASS file_get_type_extent(FILE fh, DATATYPE datatype,
35-
AINT_OUT extent)
35+
AINT_COUNT_OUT extent)
3636
{
3737
int rc;
38+
MPI_Aint tmp_extent = 0;
3839

3940
MEMCHECKER(
4041
memchecker_datatype(datatype);
@@ -59,8 +60,10 @@ PROTOTYPE ERROR_CLASS file_get_type_extent(FILE fh, DATATYPE datatype,
5960

6061
switch (fh->f_io_version) {
6162
case MCA_IO_BASE_V_3_0_0:
63+
/* TODO:BIGCOUNT: Need to update below code with bigcount variant */
6264
rc = fh->f_io_selected_module.v3_0_0.
63-
io_module_file_get_type_extent(fh, datatype, extent);
65+
io_module_file_get_type_extent(fh, datatype, &tmp_extent);
66+
*extent = tmp_extent;
6467
break;
6568

6669
default:

ompi/mpi/c/op_create.c.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ PROTOTYPE ERROR_CLASS op_create(USER_FUNCTION function, INT commute, OP_OUT op)
4646

4747
/* Create and cache the op. Sets a refcount of 1. */
4848

49+
/* TODO:BIGCOUNT: Update internally to handle bigcount variant of user function */
4950
*op = ompi_op_create_user(OPAL_INT_TO_BOOL(commute),
5051
(ompi_op_fortran_handler_fn_t *) function);
5152
if (NULL == *op) {

ompi/mpi/c/pack_external_size.c.in

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@
3434

3535
/* TODO: Does this need a bigcount variant? */
3636

37-
PROTOTYPE ERROR_CLASS pack_external_size(STRING datarep, INT incount,
38-
DATATYPE datatype, AINT_OUT size)
37+
PROTOTYPE ERROR_CLASS pack_external_size(STRING datarep, COUNT incount,
38+
DATATYPE datatype, AINT_COUNT_OUT size)
3939
{
4040
int rc = MPI_SUCCESS;
41+
MPI_Aint tmp_size = 0;
4142

4243
MEMCHECKER(
4344
memchecker_datatype(datatype);
@@ -52,8 +53,10 @@ PROTOTYPE ERROR_CLASS pack_external_size(STRING datarep, INT incount,
5253
}
5354
}
5455

55-
rc = ompi_datatype_pack_external_size(datarep, incount,
56-
datatype, size);
56+
/* TODO:BIGCOUNT: Update when the ompi_datatype code is updated for bigcount */
57+
rc = ompi_datatype_pack_external_size(datarep, (int) incount,
58+
datatype, &tmp_size);
59+
*size = tmp_size;
5760

5861
OMPI_ERRHANDLER_NOHANDLE_RETURN(rc, rc, FUNC_NAME);
5962
}

ompi/mpi/c/type_get_extent.c.in

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@
2929
#include "ompi/datatype/ompi_datatype.h"
3030
#include "ompi/memchecker.h"
3131

32-
PROTOTYPE ERROR_CLASS type_get_extent(DATATYPE type, AINT_OUT lb, AINT_OUT extent)
32+
PROTOTYPE ERROR_CLASS type_get_extent(DATATYPE type, AINT_COUNT_OUT lb, AINT_COUNT_OUT extent)
3333
{
3434
int rc;
35+
ptrdiff_t tmp_lb = 0;
36+
ptrdiff_t tmp_extent = 0;
3537

3638
MEMCHECKER(
3739
memchecker_datatype(type);
@@ -46,6 +48,9 @@ PROTOTYPE ERROR_CLASS type_get_extent(DATATYPE type, AINT_OUT lb, AINT_OUT exten
4648
}
4749
}
4850

49-
rc = ompi_datatype_get_extent( type, lb, extent );
51+
/* TODO:BIGCOUNT: Does ompi_datatype_get_extent() need a bigcount variant? */
52+
rc = ompi_datatype_get_extent( type, &tmp_lb, &tmp_extent );
53+
*lb = tmp_lb;
54+
*extent = tmp_extent;
5055
OMPI_ERRHANDLER_NOHANDLE_RETURN(rc, rc, FUNC_NAME );
5156
}

ompi/mpi/c/unpack_external.c.in

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,12 @@
3131
#include "opal/datatype/opal_convertor.h"
3232
#include "ompi/memchecker.h"
3333

34-
/* TODO: Does this need a bigcount variant? */
35-
36-
PROTOTYPE ERROR_CLASS unpack_external (STRING datarep, BUFFER inbuf, AINT insize,
37-
AINT_OUT position, BUFFER_OUT outbuf, INT outcount,
34+
PROTOTYPE ERROR_CLASS unpack_external (STRING datarep, BUFFER inbuf, AINT_COUNT insize,
35+
AINT_COUNT_OUT position, BUFFER_OUT outbuf, COUNT outcount,
3836
DATATYPE datatype)
3937
{
4038
int rc = MPI_SUCCESS;
39+
MPI_Aint tmp_position = 0;
4140

4241
MEMCHECKER(
4342
memchecker_datatype(datatype);
@@ -57,9 +56,12 @@ PROTOTYPE ERROR_CLASS unpack_external (STRING datarep, BUFFER inbuf, AINT insize
5756
OMPI_ERRHANDLER_NOHANDLE_CHECK(rc, rc, FUNC_NAME);
5857
}
5958

60-
rc = ompi_datatype_unpack_external(datarep, inbuf, insize,
61-
position, outbuf, outcount,
59+
/* TODO:BIGCOUNT: Update once ompi_datatype_unpack_external() is updated with a bigcount variant */
60+
61+
rc = ompi_datatype_unpack_external(datarep, inbuf, (MPI_Aint) insize,
62+
&tmp_position, outbuf, (int) outcount,
6263
datatype);
64+
*position = tmp_position;
6365

6466
OMPI_ERRHANDLER_NOHANDLE_RETURN(rc, rc, FUNC_NAME);
6567
}

ompi/mpi/c/win_allocate.c.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131
#include "ompi/win/win.h"
3232
#include "ompi/memchecker.h"
3333

34-
/* TODO: Does this need a bigcount variant? */
35-
36-
PROTOTYPE ERROR_CLASS win_allocate(AINT size, INT disp_unit, INFO info,
34+
PROTOTYPE ERROR_CLASS win_allocate(AINT size, DISP disp_unit, INFO info,
3735
COMM comm, BUFFER_OUT baseptr, WIN_OUT win)
3836
{
3937
int ret = MPI_SUCCESS;
@@ -68,7 +66,8 @@ PROTOTYPE ERROR_CLASS win_allocate(AINT size, INT disp_unit, INFO info,
6866
}
6967

7068
/* create window and return */
71-
ret = ompi_win_allocate((size_t)size, disp_unit, &(info->super),
69+
/* TODO:BIGCOUNT: Update ompi_win_allocate to take ptrdiff_t/MPI_Aint disp units */
70+
ret = ompi_win_allocate((size_t)size, (int)disp_unit, &(info->super),
7271
comm, baseptr, win);
7372
if (OMPI_SUCCESS != ret) {
7473
*win = MPI_WIN_NULL;

ompi/mpi/c/win_allocate_shared.c.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
#include "ompi/win/win.h"
3535
#include "ompi/memchecker.h"
3636

37-
/* TODO: Does this need a bigcount variant? */
38-
39-
PROTOTYPE ERROR_CLASS win_allocate_shared(AINT size, INT disp_unit, INFO info,
37+
PROTOTYPE ERROR_CLASS win_allocate_shared(AINT size, DISP disp_unit, INFO info,
4038
COMM comm, BUFFER_OUT baseptr, WIN_OUT win)
4139
{
4240
int ret = MPI_SUCCESS;
@@ -69,7 +67,8 @@ PROTOTYPE ERROR_CLASS win_allocate_shared(AINT size, INT disp_unit, INFO info,
6967
}
7068

7169
/* create window and return */
72-
ret = ompi_win_allocate_shared((size_t)size, disp_unit, &(info->super),
70+
/* TODO:BIGCOUNT: Update internal code to use ptrdiff_t for disp_unit */
71+
ret = ompi_win_allocate_shared((size_t)size, (int)disp_unit, &(info->super),
7372
comm, baseptr, win);
7473
if (OMPI_SUCCESS != ret) {
7574
*win = MPI_WIN_NULL;

0 commit comments

Comments
 (0)