Skip to content

Commit 1a9131d

Browse files
authored
Merge pull request #8891 from awlauria/dtype_v5.0.x
v5.0.x: datatype fixes port
2 parents c7e2b11 + f84d97d commit 1a9131d

25 files changed

+1006
-326
lines changed

ompi/datatype/ompi_datatype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ BEGIN_C_DECLS
5959
#define OMPI_DATATYPE_FLAG_DATA_FORTRAN 0xC000
6060
#define OMPI_DATATYPE_FLAG_DATA_LANGUAGE 0xC000
6161

62-
#define OMPI_DATATYPE_MAX_PREDEFINED 50
62+
#define OMPI_DATATYPE_MAX_PREDEFINED 52
6363

6464
#if OMPI_DATATYPE_MAX_PREDEFINED > OPAL_DATATYPE_MAX_SUPPORTED
6565
#error Need to increase the number of supported dataypes by OPAL (value OPAL_DATATYPE_MAX_SUPPORTED).

ompi/datatype/ompi_datatype_external.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ int ompi_datatype_pack_external_size(const char datarep[], int incount,
126126
CONVERTOR_SEND_CONVERSION,
127127
&local_convertor );
128128

129-
opal_convertor_get_unpacked_size( &local_convertor, &length );
129+
opal_convertor_get_packed_size( &local_convertor, &length );
130130
*size = (MPI_Aint)length;
131131
OBJ_DESTRUCT( &local_convertor );
132132

ompi/datatype/ompi_datatype_internal.h

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,14 @@
109109
#define OMPI_DATATYPE_MPI_SHORT_FLOAT 0x30
110110
#define OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX 0x31
111111

112+
/*
113+
* Datatypes that have a different external32 length.
114+
*/
115+
#define OMPI_DATATYPE_MPI_LONG 0x32
116+
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG 0x33
117+
112118
/* This should __ALWAYS__ stay last */
113-
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x32
119+
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x34
114120

115121

116122
#define OMPI_DATATYPE_MPI_MAX_PREDEFINED (OMPI_DATATYPE_MPI_UNAVAILABLE+1)
@@ -177,20 +183,6 @@
177183
#define OMPI_DATATYPE_MPI_UNSIGNED OMPI_DATATYPE_MPI_UINT64_T
178184
#endif
179185

180-
#if SIZEOF_LONG == 1
181-
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT8_T
182-
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_UINT8_T
183-
#elif SIZEOF_LONG == 2
184-
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT16_T
185-
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_UINT16_T
186-
#elif SIZEOF_LONG == 4
187-
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT32_T
188-
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_UINT32_T
189-
#elif SIZEOF_LONG == 8
190-
#define OMPI_DATATYPE_MPI_LONG OMPI_DATATYPE_MPI_INT64_T
191-
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG OMPI_DATATYPE_MPI_UINT64_T
192-
#endif
193-
194186
#if SIZEOF_LONG_LONG == 1
195187
#define OMPI_DATATYPE_MPI_LONG_LONG_INT OMPI_DATATYPE_MPI_INT8_T
196188
#define OMPI_DATATYPE_MPI_UNSIGNED_LONG_LONG OMPI_DATATYPE_MPI_UINT8_T
@@ -571,16 +563,8 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
571563
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED OPAL_DATATYPE_INITIALIZER_UINT8
572564
#endif
573565

574-
#if SIZEOF_LONG == 4
575-
#define OMPI_DATATYPE_INITIALIZER_LONG OPAL_DATATYPE_INITIALIZER_INT4
576-
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG OPAL_DATATYPE_INITIALIZER_UINT4
577-
#elif SIZEOF_LONG == 8
578-
#define OMPI_DATATYPE_INITIALIZER_LONG OPAL_DATATYPE_INITIALIZER_INT8
579-
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG OPAL_DATATYPE_INITIALIZER_UINT8
580-
#elif SIZEOF_LONG == 16
581-
#define OMPI_DATATYPE_INITIALIZER_LONG OPAL_DATATYPE_INITIALIZER_INT16
582-
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG OPAL_DATATYPE_INITIALIZER_UINT16
583-
#endif
566+
#define OMPI_DATATYPE_INITIALIZER_LONG OPAL_DATATYPE_INITIALIZER_LONG
567+
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG OPAL_DATATYPE_INITIALIZER_UNSIGNED_LONG
584568

585569
#if SIZEOF_LONG_LONG == 4
586570
#define OMPI_DATATYPE_INITIALIZER_LONG_LONG_INT OPAL_DATATYPE_INITIALIZER_INT4

ompi/datatype/ompi_datatype_module.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX_PREDEF
366366
[OMPI_DATATYPE_MPI_LB] = &ompi_mpi_lb.dt,
367367
[OMPI_DATATYPE_MPI_UB] = &ompi_mpi_ub.dt,
368368

369+
[OMPI_DATATYPE_MPI_LONG] = &ompi_mpi_long.dt,
370+
[OMPI_DATATYPE_MPI_UNSIGNED_LONG] = &ompi_mpi_long.dt,
369371
/* MPI 3.0 types */
370372
[OMPI_DATATYPE_MPI_COUNT] = &ompi_mpi_count.dt,
371373

ompi/mca/op/base/op_base_functions.c

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ FUNC_FUNC(max, int32_t, int32_t)
161161
FUNC_FUNC(max, uint32_t, uint32_t)
162162
FUNC_FUNC(max, int64_t, int64_t)
163163
FUNC_FUNC(max, uint64_t, uint64_t)
164+
FUNC_FUNC(max, long, long)
165+
FUNC_FUNC(max, unsigned_long, long)
166+
164167
/* Fortran integer */
165168
#if OMPI_HAVE_FORTRAN_INTEGER
166169
FUNC_FUNC(max, fortran_integer, ompi_fortran_integer_t)
@@ -224,6 +227,9 @@ FUNC_FUNC(min, int32_t, int32_t)
224227
FUNC_FUNC(min, uint32_t, uint32_t)
225228
FUNC_FUNC(min, int64_t, int64_t)
226229
FUNC_FUNC(min, uint64_t, uint64_t)
230+
FUNC_FUNC(min, long, long)
231+
FUNC_FUNC(min, unsigned_long, long)
232+
227233
/* Fortran integer */
228234
#if OMPI_HAVE_FORTRAN_INTEGER
229235
FUNC_FUNC(min, fortran_integer, ompi_fortran_integer_t)
@@ -284,6 +290,9 @@ OP_FUNC(sum, int32_t, int32_t, +=)
284290
OP_FUNC(sum, uint32_t, uint32_t, +=)
285291
OP_FUNC(sum, int64_t, int64_t, +=)
286292
OP_FUNC(sum, uint64_t, uint64_t, +=)
293+
OP_FUNC(sum, long, long, +=)
294+
OP_FUNC(sum, unsigned_long, long, +=)
295+
287296
/* Fortran integer */
288297
#if OMPI_HAVE_FORTRAN_INTEGER
289298
OP_FUNC(sum, fortran_integer, ompi_fortran_integer_t, +=)
@@ -353,6 +362,9 @@ OP_FUNC(prod, int32_t, int32_t, *=)
353362
OP_FUNC(prod, uint32_t, uint32_t, *=)
354363
OP_FUNC(prod, int64_t, int64_t, *=)
355364
OP_FUNC(prod, uint64_t, uint64_t, *=)
365+
OP_FUNC(prod, long, long, *=)
366+
OP_FUNC(prod, unsigned_long, long, *=)
367+
356368
/* Fortran integer */
357369
#if OMPI_HAVE_FORTRAN_INTEGER
358370
OP_FUNC(prod, fortran_integer, ompi_fortran_integer_t, *=)
@@ -424,6 +436,9 @@ FUNC_FUNC(land, int32_t, int32_t)
424436
FUNC_FUNC(land, uint32_t, uint32_t)
425437
FUNC_FUNC(land, int64_t, int64_t)
426438
FUNC_FUNC(land, uint64_t, uint64_t)
439+
FUNC_FUNC(land, long, long)
440+
FUNC_FUNC(land, unsigned_long, long)
441+
427442
/* Logical */
428443
#if OMPI_HAVE_FORTRAN_LOGICAL
429444
FUNC_FUNC(land, fortran_logical, ompi_fortran_logical_t)
@@ -446,6 +461,9 @@ FUNC_FUNC(lor, int32_t, int32_t)
446461
FUNC_FUNC(lor, uint32_t, uint32_t)
447462
FUNC_FUNC(lor, int64_t, int64_t)
448463
FUNC_FUNC(lor, uint64_t, uint64_t)
464+
FUNC_FUNC(lor, long, long)
465+
FUNC_FUNC(lor, unsigned_long, long)
466+
449467
/* Logical */
450468
#if OMPI_HAVE_FORTRAN_LOGICAL
451469
FUNC_FUNC(lor, fortran_logical, ompi_fortran_logical_t)
@@ -468,6 +486,10 @@ FUNC_FUNC(lxor, int32_t, int32_t)
468486
FUNC_FUNC(lxor, uint32_t, uint32_t)
469487
FUNC_FUNC(lxor, int64_t, int64_t)
470488
FUNC_FUNC(lxor, uint64_t, uint64_t)
489+
FUNC_FUNC(lxor, long, long)
490+
FUNC_FUNC(lxor, unsigned_long, long)
491+
492+
471493
/* Logical */
472494
#if OMPI_HAVE_FORTRAN_LOGICAL
473495
FUNC_FUNC(lxor, fortran_logical, ompi_fortran_logical_t)
@@ -490,6 +512,9 @@ FUNC_FUNC(band, int32_t, int32_t)
490512
FUNC_FUNC(band, uint32_t, uint32_t)
491513
FUNC_FUNC(band, int64_t, int64_t)
492514
FUNC_FUNC(band, uint64_t, uint64_t)
515+
FUNC_FUNC(band, long, long)
516+
FUNC_FUNC(band, unsigned_long, long)
517+
493518
/* Fortran integer */
494519
#if OMPI_HAVE_FORTRAN_INTEGER
495520
FUNC_FUNC(band, fortran_integer, ompi_fortran_integer_t)
@@ -527,6 +552,9 @@ FUNC_FUNC(bor, int32_t, int32_t)
527552
FUNC_FUNC(bor, uint32_t, uint32_t)
528553
FUNC_FUNC(bor, int64_t, int64_t)
529554
FUNC_FUNC(bor, uint64_t, uint64_t)
555+
FUNC_FUNC(bor, long, long)
556+
FUNC_FUNC(bor, unsigned_long, long)
557+
530558
/* Fortran integer */
531559
#if OMPI_HAVE_FORTRAN_INTEGER
532560
FUNC_FUNC(bor, fortran_integer, ompi_fortran_integer_t)
@@ -564,6 +592,9 @@ FUNC_FUNC(bxor, int32_t, int32_t)
564592
FUNC_FUNC(bxor, uint32_t, uint32_t)
565593
FUNC_FUNC(bxor, int64_t, int64_t)
566594
FUNC_FUNC(bxor, uint64_t, uint64_t)
595+
FUNC_FUNC(bxor, long, long)
596+
FUNC_FUNC(bxor, unsigned_long, long)
597+
567598
/* Fortran integer */
568599
#if OMPI_HAVE_FORTRAN_INTEGER
569600
FUNC_FUNC(bxor, fortran_integer, ompi_fortran_integer_t)
@@ -605,6 +636,7 @@ LOC_STRUCT(long_int, long, int)
605636
LOC_STRUCT(2int, int, int)
606637
LOC_STRUCT(short_int, short, int)
607638
LOC_STRUCT(long_double_int, long double, int)
639+
LOC_STRUCT(unsigned_long, unsigned long, int)
608640

609641
/*************************************************************************
610642
* Max location
@@ -789,6 +821,9 @@ FUNC_FUNC_3BUF(max, int32_t, int32_t)
789821
FUNC_FUNC_3BUF(max, uint32_t, uint32_t)
790822
FUNC_FUNC_3BUF(max, int64_t, int64_t)
791823
FUNC_FUNC_3BUF(max, uint64_t, uint64_t)
824+
FUNC_FUNC_3BUF(max, long, long)
825+
FUNC_FUNC_3BUF(max, unsigned_long, long)
826+
792827
/* Fortran integer */
793828
#if OMPI_HAVE_FORTRAN_INTEGER
794829
FUNC_FUNC_3BUF(max, fortran_integer, ompi_fortran_integer_t)
@@ -852,6 +887,9 @@ FUNC_FUNC_3BUF(min, int32_t, int32_t)
852887
FUNC_FUNC_3BUF(min, uint32_t, uint32_t)
853888
FUNC_FUNC_3BUF(min, int64_t, int64_t)
854889
FUNC_FUNC_3BUF(min, uint64_t, uint64_t)
890+
FUNC_FUNC_3BUF(min, long, long)
891+
FUNC_FUNC_3BUF(min, unsigned_long, long)
892+
855893
/* Fortran integer */
856894
#if OMPI_HAVE_FORTRAN_INTEGER
857895
FUNC_FUNC_3BUF(min, fortran_integer, ompi_fortran_integer_t)
@@ -912,6 +950,9 @@ OP_FUNC_3BUF(sum, int32_t, int32_t, +)
912950
OP_FUNC_3BUF(sum, uint32_t, uint32_t, +)
913951
OP_FUNC_3BUF(sum, int64_t, int64_t, +)
914952
OP_FUNC_3BUF(sum, uint64_t, uint64_t, +)
953+
OP_FUNC_3BUF(sum, long, long, +)
954+
OP_FUNC_3BUF(sum, unsigned_long, long, +)
955+
915956
/* Fortran integer */
916957
#if OMPI_HAVE_FORTRAN_INTEGER
917958
OP_FUNC_3BUF(sum, fortran_integer, ompi_fortran_integer_t, +)
@@ -981,6 +1022,9 @@ OP_FUNC_3BUF(prod, int32_t, int32_t, *)
9811022
OP_FUNC_3BUF(prod, uint32_t, uint32_t, *)
9821023
OP_FUNC_3BUF(prod, int64_t, int64_t, *)
9831024
OP_FUNC_3BUF(prod, uint64_t, uint64_t, *)
1025+
OP_FUNC_3BUF(prod, long, long, *)
1026+
OP_FUNC_3BUF(prod, unsigned_long, long, *)
1027+
9841028
/* Fortran integer */
9851029
#if OMPI_HAVE_FORTRAN_INTEGER
9861030
OP_FUNC_3BUF(prod, fortran_integer, ompi_fortran_integer_t, *)
@@ -1052,6 +1096,9 @@ FUNC_FUNC_3BUF(land, int32_t, int32_t)
10521096
FUNC_FUNC_3BUF(land, uint32_t, uint32_t)
10531097
FUNC_FUNC_3BUF(land, int64_t, int64_t)
10541098
FUNC_FUNC_3BUF(land, uint64_t, uint64_t)
1099+
FUNC_FUNC_3BUF(land, long, long)
1100+
FUNC_FUNC_3BUF(land, unsigned_long, long)
1101+
10551102
/* Logical */
10561103
#if OMPI_HAVE_FORTRAN_LOGICAL
10571104
FUNC_FUNC_3BUF(land, fortran_logical, ompi_fortran_logical_t)
@@ -1074,6 +1121,9 @@ FUNC_FUNC_3BUF(lor, int32_t, int32_t)
10741121
FUNC_FUNC_3BUF(lor, uint32_t, uint32_t)
10751122
FUNC_FUNC_3BUF(lor, int64_t, int64_t)
10761123
FUNC_FUNC_3BUF(lor, uint64_t, uint64_t)
1124+
FUNC_FUNC_3BUF(lor, long, long)
1125+
FUNC_FUNC_3BUF(lor, unsigned_long, long)
1126+
10771127
/* Logical */
10781128
#if OMPI_HAVE_FORTRAN_LOGICAL
10791129
FUNC_FUNC_3BUF(lor, fortran_logical, ompi_fortran_logical_t)
@@ -1096,6 +1146,9 @@ FUNC_FUNC_3BUF(lxor, int32_t, int32_t)
10961146
FUNC_FUNC_3BUF(lxor, uint32_t, uint32_t)
10971147
FUNC_FUNC_3BUF(lxor, int64_t, int64_t)
10981148
FUNC_FUNC_3BUF(lxor, uint64_t, uint64_t)
1149+
FUNC_FUNC_3BUF(lxor, long, long)
1150+
FUNC_FUNC_3BUF(lxor, unsigned_long, long)
1151+
10991152
/* Logical */
11001153
#if OMPI_HAVE_FORTRAN_LOGICAL
11011154
FUNC_FUNC_3BUF(lxor, fortran_logical, ompi_fortran_logical_t)
@@ -1118,6 +1171,9 @@ FUNC_FUNC_3BUF(band, int32_t, int32_t)
11181171
FUNC_FUNC_3BUF(band, uint32_t, uint32_t)
11191172
FUNC_FUNC_3BUF(band, int64_t, int64_t)
11201173
FUNC_FUNC_3BUF(band, uint64_t, uint64_t)
1174+
FUNC_FUNC_3BUF(band, long, long)
1175+
FUNC_FUNC_3BUF(band, unsigned_long, long)
1176+
11211177
/* Fortran integer */
11221178
#if OMPI_HAVE_FORTRAN_INTEGER
11231179
FUNC_FUNC_3BUF(band, fortran_integer, ompi_fortran_integer_t)
@@ -1155,6 +1211,9 @@ FUNC_FUNC_3BUF(bor, int32_t, int32_t)
11551211
FUNC_FUNC_3BUF(bor, uint32_t, uint32_t)
11561212
FUNC_FUNC_3BUF(bor, int64_t, int64_t)
11571213
FUNC_FUNC_3BUF(bor, uint64_t, uint64_t)
1214+
FUNC_FUNC_3BUF(bor, long, long)
1215+
FUNC_FUNC_3BUF(bor, unsigned_long, long)
1216+
11581217
/* Fortran integer */
11591218
#if OMPI_HAVE_FORTRAN_INTEGER
11601219
FUNC_FUNC_3BUF(bor, fortran_integer, ompi_fortran_integer_t)
@@ -1192,6 +1251,9 @@ FUNC_FUNC_3BUF(bxor, int32_t, int32_t)
11921251
FUNC_FUNC_3BUF(bxor, uint32_t, uint32_t)
11931252
FUNC_FUNC_3BUF(bxor, int64_t, int64_t)
11941253
FUNC_FUNC_3BUF(bxor, uint64_t, uint64_t)
1254+
FUNC_FUNC_3BUF(bxor, long, long)
1255+
FUNC_FUNC_3BUF(bxor, unsigned_long, long)
1256+
11951257
/* Fortran integer */
11961258
#if OMPI_HAVE_FORTRAN_INTEGER
11971259
FUNC_FUNC_3BUF(bxor, fortran_integer, ompi_fortran_integer_t)
@@ -1293,6 +1355,8 @@ LOC_FUNC_3BUF(minloc, long_double_int, <)
12931355
[OMPI_OP_BASE_TYPE_INT32_T] = ompi_op_base_##ftype##_##name##_int32_t, \
12941356
[OMPI_OP_BASE_TYPE_UINT32_T] = ompi_op_base_##ftype##_##name##_uint32_t, \
12951357
[OMPI_OP_BASE_TYPE_INT64_T] = ompi_op_base_##ftype##_##name##_int64_t, \
1358+
[OMPI_OP_BASE_TYPE_LONG] = ompi_op_base_##ftype##_##name##_long, \
1359+
[OMPI_OP_BASE_TYPE_UNSIGNED_LONG] = ompi_op_base_##ftype##_##name##_unsigned_long, \
12961360
[OMPI_OP_BASE_TYPE_UINT64_T] = ompi_op_base_##ftype##_##name##_uint64_t
12971361

12981362
/** All the Fortran integers ********************************************/

ompi/mca/op/op.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ enum {
191191
/** 2 location C: long double int */
192192
OMPI_OP_BASE_TYPE_LONG_DOUBLE_INT,
193193

194+
/** long */
195+
OMPI_OP_BASE_TYPE_LONG,
196+
/** unsigned long */
197+
OMPI_OP_BASE_TYPE_UNSIGNED_LONG,
198+
194199
/** 2 location C: wchar_t */
195200
OMPI_OP_BASE_TYPE_WCHAR,
196201

ompi/mca/pml/ob1/pml_ob1_recvreq.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ static inline void prepare_recv_req_converter(mca_pml_ob1_recv_request_t *req)
234234
req->req_recv.req_base.req_addr,
235235
0,
236236
&req->req_recv.req_base.req_convertor);
237-
opal_convertor_get_unpacked_size(&req->req_recv.req_base.req_convertor,
238-
&req->req_bytes_expected);
237+
opal_convertor_get_packed_size(&req->req_recv.req_base.req_convertor,
238+
&req->req_bytes_expected);
239239
}
240240
}
241241

ompi/op/op.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ int ompi_op_init(void)
228228
ompi_op_ddt_map[OMPI_DATATYPE_MPI_SHORT_FLOAT] = OMPI_OP_BASE_TYPE_SHORT_FLOAT;
229229
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX] = OMPI_OP_BASE_TYPE_C_SHORT_FLOAT_COMPLEX;
230230

231+
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG] = OMPI_OP_BASE_TYPE_LONG;
232+
ompi_op_ddt_map[OMPI_DATATYPE_MPI_UNSIGNED_LONG] = OMPI_OP_BASE_TYPE_UNSIGNED_LONG;
233+
231234
/* Create the intrinsic ops */
232235

233236
if (OMPI_SUCCESS !=

opal/datatype/opal_convertor.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@ opal_convertor_master_t *opal_convertor_find_or_create_master(uint32_t remote_ar
142142
} else {
143143
opal_output(0, "Unknown sizeof(bool) for the remote architecture\n");
144144
}
145-
145+
if (opal_arch_checkmask(&master->remote_arch, OPAL_ARCH_LONGIS64)) {
146+
remote_sizes[OPAL_DATATYPE_LONG] = 8;
147+
remote_sizes[OPAL_DATATYPE_UNSIGNED_LONG] = 8;
148+
} else {
149+
remote_sizes[OPAL_DATATYPE_LONG] = 4;
150+
remote_sizes[OPAL_DATATYPE_UNSIGNED_LONG] = 4;
151+
}
146152
/**
147153
* Now we can compute the conversion mask. For all sizes where the remote
148154
* and local architecture differ a conversion is needed. Moreover, if the
@@ -434,7 +440,7 @@ int32_t opal_convertor_set_position_nocheck(opal_convertor_t *convertor, size_t
434440
}
435441
rc = opal_convertor_generic_simple_position(convertor, position);
436442
/**
437-
* If we have a non-contigous send convertor don't allow it move in the middle
443+
* If we have a non-contiguous send convertor don't allow it move in the middle
438444
* of a predefined datatype, it won't be able to copy out the left-overs
439445
* anyway. Instead force the position to stay on predefined datatypes
440446
* boundaries. As we allow partial predefined datatypes on the contiguous
@@ -484,8 +490,8 @@ size_t opal_convertor_compute_remote_size(opal_convertor_t *pConvertor)
484490
pConvertor->remote_size = pConvertor->local_size;
485491
if (OPAL_UNLIKELY(datatype->bdt_used & pConvertor->master->hetero_mask)) {
486492
pConvertor->flags &= (~CONVERTOR_HOMOGENEOUS);
487-
if (!(pConvertor->flags & CONVERTOR_SEND
488-
&& pConvertor->flags & OPAL_DATATYPE_FLAG_CONTIGUOUS)) {
493+
/* Can we use the optimized description? */
494+
if (pConvertor->flags & OPAL_DATATYPE_OPTIMIZED_RESTRICTED) {
489495
pConvertor->use_desc = &(datatype->desc);
490496
}
491497
if (0 == (pConvertor->flags & CONVERTOR_HAS_REMOTE_SIZE)) {

0 commit comments

Comments
 (0)