Skip to content

Commit 4d7bde2

Browse files
committed
ompi/datatype: Use short float for MPI_REAL2
... and add `MPI_COMPLEX4`. This commit changes values of existing `OMPI_DATATYPE_MPI_*` macros. This change does not affect ABI compatibility of `libmpi.so` and the like because these values are only used in OMPI internal code. On the other hand, `ompi_datatype_t::id` values of existing datatypes are not changed and 73 is newly assigned to for `MPI_COMPLEX4` to retain ABI compatibility. Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
1 parent 4375c11 commit 4d7bde2

26 files changed

+182
-67
lines changed

config/ompi_fortran_check.m4

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,13 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [
129129
long*double) ofc_type_kind=C_LONG_DOUBLE ;;
130130
long*long) ofc_type_kind=C_LONG_LONG ;;
131131
short) ofc_type_kind=C_SHORT ;;
132+
short*float) ofc_type_kind=C_SHORT_FLOAT ;;
133+
short*float*_Complex) ofc_type_kind=C_SHORT_FLOAT_COMPLEX ;;
132134
float*_Complex) ofc_type_kind=C_FLOAT_COMPLEX ;;
133135
double*_Complex) ofc_type_kind=C_DOUBLE_COMPLEX ;;
134136
long*double*_Complex) ofc_type_kind=C_LONG_DOUBLE_COMPLEX ;;
137+
opal_short_float_t) ofc_type_kind=C_SHORT_FLOAT ;;
138+
opal_short_float_complex_t) ofc_type_kind=C_SHORT_FLOAT_COMPLEX ;;
135139
*)
136140
# Skip types like "DOUBLE PRECISION"
137141
;;
@@ -142,8 +146,9 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [
142146

143147
# See if the value is -1. If so, then just say we don't
144148
# have a match. If the compiler doesn't support
145-
# ISO_C_BINDING, then we'll just fall back to a default
146-
# kind and hope for the best. :-\
149+
# ISO_C_BINDING, C_SHORT_FLOAT, or C_SHORT_FLOAT_COMPLEX,
150+
# then we'll just fall back to a default kind and hope
151+
# for the best. :-\
147152
OMPI_FORTRAN_GET_KIND_VALUE([$ofc_type_kind], 4, [ofc_type_kind_value])
148153
AS_IF([test $ofc_type_kind_value -le 0],
149154
[ofc_have_type=0

config/ompi_setup_mpi_fortran.m4

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
1818
dnl Copyright (c) 2014-2017 Research Organization for Information Science
1919
dnl and Technology (RIST). All rights reserved.
2020
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
21+
dnl Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
2122
dnl $COPYRIGHT$
2223
dnl
2324
dnl Additional copyrights may follow
@@ -168,25 +169,33 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
168169
[int, int64_t, long long, long], [16], [yes])
169170

170171
OMPI_FORTRAN_CHECK([REAL], [yes],
171-
[float, double, long double], [-1], [yes])
172+
[short float, float, double, long double, opal_short_float_t],
173+
[-1], [yes])
172174
OMPI_FORTRAN_CHECK([REAL*2], [no],
173-
[float, double, long double], [2], [yes])
175+
[short float, float, double, long double, opal_short_float_t],
176+
[2], [yes])
174177
OMPI_FORTRAN_CHECK([REAL*4], [no],
175-
[float, double, long double], [4], [yes])
178+
[short float, float, double, long double, opal_short_float_t],
179+
[4], [yes])
176180
OMPI_FORTRAN_CHECK([REAL*8], [no],
177-
[float, double, long double], [8], [yes])
181+
[short float, float, double, long double, opal_short_float_t],
182+
[8], [yes])
178183
OMPI_FORTRAN_CHECK([REAL*16], [no],
179-
[float, double, long double], [16], [yes])
184+
[short float, float, double, long double, opal_short_float_t],
185+
[16], [yes])
180186

181187
# In some compilers, the bit representation of REAL*16 is not the same
182188
# as the C counterpart that we found. If this is the case, then we
183189
# want to disable reduction support for MPI_REAL16 (per ticket #1603).
184190
OMPI_FORTRAN_CHECK_REAL16_C_EQUIV
185191

186192
OMPI_FORTRAN_CHECK([DOUBLE PRECISION], [yes],
187-
[float, double, long double], [-1], [yes])
193+
[short float, float, double, long double, opal_short_float_t],
194+
[-1], [yes])
188195

189-
OMPI_FORTRAN_CHECK([COMPLEX], [yes], [float _Complex, double _Complex], [-1], [no])
196+
OMPI_FORTRAN_CHECK([COMPLEX], [yes],
197+
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
198+
[-1], [no])
190199

191200
# The complex*N tests are a bit different (note: the complex tests are
192201
# the same as all the rest, because complex is a composite of two
@@ -199,21 +208,23 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
199208
# have a back-end C type for it)
200209
# b) compiler supports complex*N
201210

202-
OMPI_FORTRAN_CHECK([COMPLEX*4], [no], [float _Complex], [4], [no])
211+
OMPI_FORTRAN_CHECK([COMPLEX*4], [no],
212+
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
213+
[4], [no])
203214
OMPI_FORTRAN_CHECK([COMPLEX*8], [no],
204-
[float _Complex, double _Complex, long double _Complex],
215+
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
205216
[8], [no])
206217
OMPI_FORTRAN_CHECK([COMPLEX*16], [no],
207-
[float _Complex, double _Complex, long double _Complex],
218+
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
208219
[16], [no])
209220
OMPI_FORTRAN_CHECK([COMPLEX*32], [no],
210-
[float _Complex, double _Complex, long double _Complex],
221+
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
211222
[32], [no])
212223
# Double precision complex types are not standard, but many
213224
# compilers support it. Code should be wrapped with #ifdef
214225
# OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX
215226
OMPI_FORTRAN_CHECK([DOUBLE COMPLEX], [no],
216-
[float _Complex, double _Complex, long double _Complex],
227+
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
217228
[-1], [no])
218229

219230
# Regardless of whether we have fortran bindings, or even a

ompi/datatype/ompi_datatype.h

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

61-
#define OMPI_DATATYPE_MAX_PREDEFINED 49
61+
#define OMPI_DATATYPE_MAX_PREDEFINED 50
6262

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

ompi/datatype/ompi_datatype_internal.h

Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -46,69 +46,70 @@
4646
#define OMPI_DATATYPE_MPI_FLOAT 0x09
4747
#define OMPI_DATATYPE_MPI_DOUBLE 0x0A
4848
#define OMPI_DATATYPE_MPI_LONG_DOUBLE 0x0B
49-
#define OMPI_DATATYPE_MPI_COMPLEX8 0x0C
50-
#define OMPI_DATATYPE_MPI_COMPLEX16 0x0D
51-
#define OMPI_DATATYPE_MPI_COMPLEX32 0x0E
52-
#define OMPI_DATATYPE_MPI_WCHAR 0x0F
53-
#define OMPI_DATATYPE_MPI_PACKED 0x10
49+
#define OMPI_DATATYPE_MPI_COMPLEX4 0x0C
50+
#define OMPI_DATATYPE_MPI_COMPLEX8 0x0D
51+
#define OMPI_DATATYPE_MPI_COMPLEX16 0x0E
52+
#define OMPI_DATATYPE_MPI_COMPLEX32 0x0F
53+
#define OMPI_DATATYPE_MPI_WCHAR 0x10
54+
#define OMPI_DATATYPE_MPI_PACKED 0x11
5455

55-
#define OMPI_DATATYPE_MPI_BOOL 0x11
56+
#define OMPI_DATATYPE_MPI_BOOL 0x12
5657

57-
#define OMPI_DATATYPE_MPI_LOGICAL 0x12
58-
#define OMPI_DATATYPE_MPI_CHARACTER 0x13
59-
#define OMPI_DATATYPE_MPI_INTEGER 0x14
60-
#define OMPI_DATATYPE_MPI_REAL 0x15
61-
#define OMPI_DATATYPE_MPI_DOUBLE_PRECISION 0x16
58+
#define OMPI_DATATYPE_MPI_LOGICAL 0x13
59+
#define OMPI_DATATYPE_MPI_CHARACTER 0x14
60+
#define OMPI_DATATYPE_MPI_INTEGER 0x15
61+
#define OMPI_DATATYPE_MPI_REAL 0x16
62+
#define OMPI_DATATYPE_MPI_DOUBLE_PRECISION 0x17
6263

6364
/*
64-
* Derived datatypes supposely contiguous
65+
* Derived datatypes supposedly contiguous
6566
*/
66-
#define OMPI_DATATYPE_MPI_COMPLEX 0x17 /* Was COMPLEX_FLOAT */
67-
#define OMPI_DATATYPE_MPI_DOUBLE_COMPLEX 0x18 /* Was COMPLEX_DOUBLE */
68-
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX 0x19 /* Was COMPLEX_LONG_DOUBLE */
69-
#define OMPI_DATATYPE_MPI_2INT 0x1A
70-
#define OMPI_DATATYPE_MPI_2INTEGER 0x1B
71-
#define OMPI_DATATYPE_MPI_2REAL 0x1C
72-
#define OMPI_DATATYPE_MPI_2DBLPREC 0x1D
73-
#define OMPI_DATATYPE_MPI_2COMPLEX 0x1E
74-
#define OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX 0x1F
67+
#define OMPI_DATATYPE_MPI_COMPLEX 0x18 /* Was COMPLEX_FLOAT */
68+
#define OMPI_DATATYPE_MPI_DOUBLE_COMPLEX 0x19 /* Was COMPLEX_DOUBLE */
69+
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX 0x1A /* Was COMPLEX_LONG_DOUBLE */
70+
#define OMPI_DATATYPE_MPI_2INT 0x1B
71+
#define OMPI_DATATYPE_MPI_2INTEGER 0x1C
72+
#define OMPI_DATATYPE_MPI_2REAL 0x1D
73+
#define OMPI_DATATYPE_MPI_2DBLPREC 0x1E
74+
#define OMPI_DATATYPE_MPI_2COMPLEX 0x1F
75+
#define OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX 0x20
7576
/*
7677
* Derived datatypes which will definitively be non contiguous on some architectures.
7778
*/
78-
#define OMPI_DATATYPE_MPI_FLOAT_INT 0x20
79-
#define OMPI_DATATYPE_MPI_DOUBLE_INT 0x21
80-
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_INT 0x22
81-
#define OMPI_DATATYPE_MPI_LONG_INT 0x23
82-
#define OMPI_DATATYPE_MPI_SHORT_INT 0x24
79+
#define OMPI_DATATYPE_MPI_FLOAT_INT 0x21
80+
#define OMPI_DATATYPE_MPI_DOUBLE_INT 0x22
81+
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_INT 0x23
82+
#define OMPI_DATATYPE_MPI_LONG_INT 0x24
83+
#define OMPI_DATATYPE_MPI_SHORT_INT 0x25
8384
/*
8485
* Datatypes from the MPI 2.2 standard
8586
*/
86-
#define OMPI_DATATYPE_MPI_AINT 0x25
87-
#define OMPI_DATATYPE_MPI_OFFSET 0x26
88-
#define OMPI_DATATYPE_MPI_C_BOOL 0x27
89-
#define OMPI_DATATYPE_MPI_C_COMPLEX 0x28
90-
#define OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX 0x29
91-
#define OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX 0x2A
92-
#define OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX 0x2B
87+
#define OMPI_DATATYPE_MPI_AINT 0x26
88+
#define OMPI_DATATYPE_MPI_OFFSET 0x27
89+
#define OMPI_DATATYPE_MPI_C_BOOL 0x28
90+
#define OMPI_DATATYPE_MPI_C_COMPLEX 0x29
91+
#define OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX 0x2A
92+
#define OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX 0x2B
93+
#define OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX 0x2C
9394

94-
#define OMPI_DATATYPE_MPI_LB 0x2C
95-
#define OMPI_DATATYPE_MPI_UB 0x2D
95+
#define OMPI_DATATYPE_MPI_LB 0x2D
96+
#define OMPI_DATATYPE_MPI_UB 0x2E
9697

9798
/*
9899
* Datatypes from the MPI 3.0 standard
99100
*/
100-
#define OMPI_DATATYPE_MPI_COUNT 0x2E
101+
#define OMPI_DATATYPE_MPI_COUNT 0x2F
101102

102103
/*
103104
* Datatypes proposed to the MPI Forum in June 2017 for proposal in
104105
* the MPI 4.0 standard. As of February 2019, it is not accepted yet.
105106
* See https://github.com/mpi-forum/mpi-issues/issues/65
106107
*/
107-
#define OMPI_DATATYPE_MPI_SHORT_FLOAT 0x2F
108-
#define OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX 0x30
108+
#define OMPI_DATATYPE_MPI_SHORT_FLOAT 0x30
109+
#define OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX 0x31
109110

110111
/* This should __ALWAYS__ stay last */
111-
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x31
112+
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x32
112113

113114

114115
#define OMPI_DATATYPE_MPI_MAX_PREDEFINED (OMPI_DATATYPE_MPI_UNAVAILABLE+1)
@@ -340,6 +341,9 @@
340341
/* REAL */
341342
#if OMPI_SIZEOF_FORTRAN_REAL2 == OMPI_SIZEOF_FORTRAN_REAL
342343
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_REAL
344+
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_SHORT_FLOAT) || \
345+
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_OPAL_SHORT_FLOAT_T)
346+
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_SHORT_FLOAT
343347
#elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_FLOAT
344348
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_FLOAT
345349
#elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_DOUBLE
@@ -352,6 +356,9 @@
352356

353357
#if OMPI_SIZEOF_FORTRAN_REAL4 == OMPI_SIZEOF_FORTRAN_REAL
354358
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_REAL
359+
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_SHORT_FLOAT) || \
360+
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_OPAL_SHORT_FLOAT_T)
361+
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_SHORT_FLOAT
355362
#elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_FLOAT
356363
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_FLOAT
357364
#elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_DOUBLE
@@ -364,6 +371,9 @@
364371

365372
#if OMPI_SIZEOF_FORTRAN_REAL8 == OMPI_SIZEOF_FORTRAN_REAL
366373
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_REAL
374+
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_SHORT_FLOAT) || \
375+
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_OPAL_SHORT_FLOAT_T)
376+
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_SHORT_FLOAT
367377
#elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_FLOAT
368378
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_FLOAT
369379
#elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_DOUBLE
@@ -376,6 +386,9 @@
376386

377387
#if OMPI_SIZEOF_FORTRAN_REAL16 == OMPI_SIZEOF_FORTRAN_REAL
378388
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_REAL
389+
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_SHORT_FLOAT) || \
390+
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_OPAL_SHORT_FLOAT_T)
391+
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_SHORT_FLOAT
379392
#elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_FLOAT
380393
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_FLOAT
381394
#elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_DOUBLE

ompi/datatype/ompi_datatype_module.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ ompi_predefined_datatype_t ompi_mpi_ldblcplex = OMPI_DATATYPE_INIT_PREDEFIN
145145
ompi_predefined_datatype_t ompi_mpi_ldblcplex = OMPI_DATATYPE_INIT_UNAVAILABLE (LONG_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_FORTRAN | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
146146
#endif
147147

148+
#if OMPI_HAVE_FORTRAN_COMPLEX4
149+
ompi_predefined_datatype_t ompi_mpi_complex4 = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (OMPI_KIND_FORTRAN_COMPLEX4, COMPLEX4, OMPI_DATATYPE_FLAG_DATA_FORTRAN | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
150+
#else
151+
ompi_predefined_datatype_t ompi_mpi_complex4 = OMPI_DATATYPE_INIT_UNAVAILABLE (COMPLEX4, OMPI_DATATYPE_FLAG_DATA_FORTRAN | OMPI_DATATYPE_FLAG_DATA_COMPLEX);
152+
#endif
153+
148154
#if OMPI_HAVE_FORTRAN_COMPLEX8
149155
ompi_predefined_datatype_t ompi_mpi_complex8 = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (OMPI_KIND_FORTRAN_COMPLEX8, COMPLEX8, OMPI_DATATYPE_FLAG_DATA_FORTRAN | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
150156
#else
@@ -315,6 +321,7 @@ const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX_PREDEF
315321
[OMPI_DATATYPE_MPI_FLOAT] = &ompi_mpi_float.dt,
316322
[OMPI_DATATYPE_MPI_DOUBLE] = &ompi_mpi_double.dt,
317323
[OMPI_DATATYPE_MPI_LONG_DOUBLE] = &ompi_mpi_long_double.dt,
324+
[OMPI_DATATYPE_MPI_COMPLEX4] = &ompi_mpi_complex4.dt,
318325
[OMPI_DATATYPE_MPI_COMPLEX8] = &ompi_mpi_complex8.dt,
319326
[OMPI_DATATYPE_MPI_COMPLEX16] = &ompi_mpi_complex16.dt,
320327
[OMPI_DATATYPE_MPI_COMPLEX32] = &ompi_mpi_complex32.dt,
@@ -633,12 +640,15 @@ int32_t ompi_datatype_init( void )
633640
/* MPI 3.0 types */
634641
MOOG(count, 72);
635642

643+
/* Datatype missing in old Open MPI */
644+
MOOG(complex4, 73);
645+
636646
/* Datatypes proposed to the MPI Forum in June 2017 for proposal in
637647
* the MPI 4.0 standard. As of February 2019, it is not accepted yet.
638648
* See https://github.com/mpi-forum/mpi-issues/issues/65 */
639-
MOOG(short_float, 73);
640-
MOOG(c_short_float_complex, 74);
641-
MOOG(cxx_sfltcplex, 75);
649+
MOOG(short_float, 74);
650+
MOOG(c_short_float_complex, 75);
651+
MOOG(cxx_sfltcplex, 76);
642652

643653
/**
644654
* Now make sure all non-contiguous types are marked as such.

ompi/include/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
1414
# Copyright (c) 2014-2015 Research Organization for Information Science
1515
# and Technology (RIST). All rights reserved.
16+
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
1617
# $COPYRIGHT$
1718
#
1819
# Additional copyrights may follow
@@ -86,7 +87,9 @@ mpif-sizeof.h:
8687
--header=$@ --ierror=mandatory \
8788
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
8889
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
90+
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
8991
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
92+
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
9093
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
9194

9295
#

ompi/include/mpi.h.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* Copyright (c) 2015-2018 Research Organization for Information Science
2121
* and Technology (RIST). All rights reserved.
2222
* Copyright (c) 2017-2018 IBM Corporation. All rights reserved.
23+
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
2324
* $COPYRIGHT$
2425
*
2526
* Additional copyrights may follow
@@ -969,6 +970,7 @@ OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real2;
969970
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real4;
970971
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real8;
971972
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real16;
973+
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex4;
972974
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex8;
973975
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex16;
974976
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex32;
@@ -1109,6 +1111,9 @@ OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub
11091111
#define MPI_INTEGER16 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_integer16)
11101112
#endif
11111113
#define MPI_REAL OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_real)
1114+
#if OMPI_HAVE_FORTRAN_REAL2
1115+
#define MPI_REAL2 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_real2)
1116+
#endif
11121117
#if OMPI_HAVE_FORTRAN_REAL4
11131118
#define MPI_REAL4 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_real4)
11141119
#endif
@@ -1120,6 +1125,9 @@ OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub
11201125
#endif
11211126
#define MPI_DOUBLE_PRECISION OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_dblprec)
11221127
#define MPI_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_cplex)
1128+
#if OMPI_HAVE_FORTRAN_REAL2
1129+
#define MPI_COMPLEX4 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_complex4)
1130+
#endif
11231131
#if OMPI_HAVE_FORTRAN_REAL4
11241132
#define MPI_COMPLEX8 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_complex8)
11251133
#endif

ompi/include/mpif-values.pl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
44
# Copyright (c) 2016-2017 Research Organization for Information Science
55
# and Technology (RIST). All rights reserved.
6-
# Copyright (c) 2016 FUJITSU LIMITED. All rights reserved.
6+
# Copyright (c) 2016-2018 FUJITSU LIMITED. All rights reserved.
77
# $COPYRIGHT$
88
#
99
# Additional copyrights may follow
@@ -195,6 +195,7 @@ sub write_file {
195195
$handles->{MPI_C_DOUBLE_COMPLEX} = 70;
196196
$handles->{MPI_C_LONG_DOUBLE_COMPLEX} = 71;
197197
$handles->{MPI_COUNT} = 72;
198+
$handles->{MPI_COMPLEX4} = 73;
198199

199200
$handles->{MPI_MESSAGE_NO_PROC} = 1;
200201

ompi/mca/coll/portals4/coll_portals4_component.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ ptl_datatype_t ompi_coll_portals4_atomic_datatype [OMPI_DATATYPE_MPI_MAX_PREDEFI
6868
[OMPI_DATATYPE_MPI_FLOAT] = PTL_FLOAT,
6969
[OMPI_DATATYPE_MPI_DOUBLE] = PTL_DOUBLE,
7070
[OMPI_DATATYPE_MPI_LONG_DOUBLE] = COLL_PORTALS4_NO_DTYPE,
71+
[OMPI_DATATYPE_MPI_COMPLEX4] = COLL_PORTALS4_NO_DTYPE,
7172
[OMPI_DATATYPE_MPI_COMPLEX8] = COLL_PORTALS4_NO_DTYPE,
7273
[OMPI_DATATYPE_MPI_COMPLEX16] = COLL_PORTALS4_NO_DTYPE,
7374
[OMPI_DATATYPE_MPI_COMPLEX32] = COLL_PORTALS4_NO_DTYPE,

0 commit comments

Comments
 (0)