1
1

Merge pull request #6205 from kawashima-fj/pr/fp16

Add FP16 datatypes
Этот коммит содержится в:
KAWASHIMA Takahiro 2019-02-08 14:52:13 +09:00 коммит произвёл GitHub
родитель 8451cd70ac ef4c47db1f
Коммит 8bbd201029
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
48 изменённых файлов: 974 добавлений и 105 удалений

4
.gitignore поставляемый
Просмотреть файл

@ -302,6 +302,10 @@ ompi/mpiext/pcollreq/mpif-h/profile/pscan_init_f.c
ompi/mpiext/pcollreq/mpif-h/profile/pscatter_init_f.c
ompi/mpiext/pcollreq/mpif-h/profile/pscatterv_init_f.c
ompi/mpiext/shortfloat/c/mpiext_shortfloat_c.h
ompi/mpiext/shortfloat/mpif-h/mpiext_shortfloat_mpifh.h
ompi/mpiext/shortfloat/use-mpi-f08/mpiext_shortfloat_usempif08.h
ompi/tools/mpisync/mpisync
ompi/tools/mpisync/mpirun_prof
ompi/tools/mpisync/ompi_timing_post

4
README
Просмотреть файл

@ -873,6 +873,10 @@ Open MPI Extensions
because they are not standardized yet. Future versions of Open MPI
will switch to the MPI_ prefix once the MPI Standard which includes
this feature is published. See their man page for more details.
- shortfloat: Provides MPI datatypes MPIX_C_FLOAT16, MPIX_SHORT_FLOAT,
MPIX_SHORT_FLOAT, and MPIX_CXX_SHORT_FLOAT_COMPLEX if corresponding
language types are available. See ompi/mpiext/shortfloat/README.txt
for details.
- affinity: Provides the OMPI_Affinity_str() routine on retrieving
a string that contains what resources a process is bound to. See
its man page for more details.

Просмотреть файл

@ -129,9 +129,13 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [
long*double) ofc_type_kind=C_LONG_DOUBLE ;;
long*long) ofc_type_kind=C_LONG_LONG ;;
short) ofc_type_kind=C_SHORT ;;
short*float) ofc_type_kind=C_SHORT_FLOAT ;;
short*float*_Complex) ofc_type_kind=C_SHORT_FLOAT_COMPLEX ;;
float*_Complex) ofc_type_kind=C_FLOAT_COMPLEX ;;
double*_Complex) ofc_type_kind=C_DOUBLE_COMPLEX ;;
long*double*_Complex) ofc_type_kind=C_LONG_DOUBLE_COMPLEX ;;
opal_short_float_t) ofc_type_kind=C_SHORT_FLOAT ;;
opal_short_float_complex_t) ofc_type_kind=C_SHORT_FLOAT_COMPLEX ;;
*)
# Skip types like "DOUBLE PRECISION"
;;
@ -142,8 +146,9 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [
# See if the value is -1. If so, then just say we don't
# have a match. If the compiler doesn't support
# ISO_C_BINDING, then we'll just fall back to a default
# kind and hope for the best. :-\
# ISO_C_BINDING, C_SHORT_FLOAT, or C_SHORT_FLOAT_COMPLEX,
# then we'll just fall back to a default kind and hope
# for the best. :-\
OMPI_FORTRAN_GET_KIND_VALUE([$ofc_type_kind], 4, [ofc_type_kind_value])
AS_IF([test $ofc_type_kind_value -le 0],
[ofc_have_type=0

Просмотреть файл

@ -18,6 +18,7 @@ dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
dnl Copyright (c) 2014-2017 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
dnl Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
@ -168,15 +169,20 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
[int, int64_t, long long, long], [16], [yes])
OMPI_FORTRAN_CHECK([REAL], [yes],
[float, double, long double], [-1], [yes])
[short float, float, double, long double, opal_short_float_t],
[-1], [yes])
OMPI_FORTRAN_CHECK([REAL*2], [no],
[float, double, long double], [2], [yes])
[short float, float, double, long double, opal_short_float_t],
[2], [yes])
OMPI_FORTRAN_CHECK([REAL*4], [no],
[float, double, long double], [4], [yes])
[short float, float, double, long double, opal_short_float_t],
[4], [yes])
OMPI_FORTRAN_CHECK([REAL*8], [no],
[float, double, long double], [8], [yes])
[short float, float, double, long double, opal_short_float_t],
[8], [yes])
OMPI_FORTRAN_CHECK([REAL*16], [no],
[float, double, long double], [16], [yes])
[short float, float, double, long double, opal_short_float_t],
[16], [yes])
# In some compilers, the bit representation of REAL*16 is not the same
# as the C counterpart that we found. If this is the case, then we
@ -184,9 +190,12 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
OMPI_FORTRAN_CHECK_REAL16_C_EQUIV
OMPI_FORTRAN_CHECK([DOUBLE PRECISION], [yes],
[float, double, long double], [-1], [yes])
[short float, float, double, long double, opal_short_float_t],
[-1], [yes])
OMPI_FORTRAN_CHECK([COMPLEX], [yes], [float _Complex, double _Complex], [-1], [no])
OMPI_FORTRAN_CHECK([COMPLEX], [yes],
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
[-1], [no])
# The complex*N tests are a bit different (note: the complex tests are
# the same as all the rest, because complex is a composite of two
@ -199,21 +208,23 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
# have a back-end C type for it)
# b) compiler supports complex*N
OMPI_FORTRAN_CHECK([COMPLEX*4], [no], [float _Complex], [4], [no])
OMPI_FORTRAN_CHECK([COMPLEX*4], [no],
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
[4], [no])
OMPI_FORTRAN_CHECK([COMPLEX*8], [no],
[float _Complex, double _Complex, long double _Complex],
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
[8], [no])
OMPI_FORTRAN_CHECK([COMPLEX*16], [no],
[float _Complex, double _Complex, long double _Complex],
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
[16], [no])
OMPI_FORTRAN_CHECK([COMPLEX*32], [no],
[float _Complex, double _Complex, long double _Complex],
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
[32], [no])
# Double precision complex types are not standard, but many
# compilers support it. Code should be wrapped with #ifdef
# OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX
OMPI_FORTRAN_CHECK([DOUBLE COMPLEX], [no],
[float _Complex, double _Complex, long double _Complex],
[short float _Complex, float _Complex, double _Complex, long double _Complex, opal_short_float_complex_t],
[-1], [no])
# Regardless of whether we have fortran bindings, or even a

55
config/opal_check_alt_short_float.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,55 @@
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
# Check whether the user wants to use an alternate type of C 'short float'.
# OPAL_CHECK_ALT_SHORT_FLOAT
# ------------------------------------------------------------
AC_DEFUN([OPAL_CHECK_ALT_SHORT_FLOAT], [
AC_CHECK_TYPES(_Float16)
AC_MSG_CHECKING([if want alternate C type of short float])
AC_ARG_ENABLE(alt-short-float,
AC_HELP_STRING([--enable-alt-short-float=TYPE],
[Use an alternate C type TYPE of 'short float' if 'short float' is not available on the C compiler. 'short float' is a new C type proposed for the next C language standard in ISO/IEC JTC 1/SC 22 WG 14 (C WG). (default: "_Float16" if available, disabled otherwise)]))
if test "$enable_alt_short_float" = "yes"; then
AC_MSG_ERROR([--enable-alt-short-float must have an argument.])
elif test "$enable_alt_short_float" = "no"; then
:
elif test "$enable_alt_short_float" != ""; then
opal_short_float_type="$enable_alt_short_float"
opal_short_float_complex_type="$enable_alt_short_float [[2]]"
elif test "$ac_cv_type_short_float" = "yes" && \
test "$ac_cv_type_short_float__Complex" = "yes"; then
opal_short_float_type="short float"
opal_short_float_complex_type="short float _Complex"
elif test "$ac_cv_type__Float16" = "yes"; then
opal_short_float_type="_Float16"
opal_short_float_complex_type="_Float16 [[2]]"
fi
if test "$opal_short_float_type" != ""; then
AC_MSG_RESULT([yes ($opal_short_float_type)])
AC_CHECK_TYPES($opal_short_float_type, [opal_enable_short_float=1], [opal_enable_short_float=0])
if test "$opal_enable_short_float" = 1; then
AC_DEFINE_UNQUOTED(opal_short_float_t, [[$opal_short_float_type]],
[User-selected alternate C type of short float])
AC_DEFINE_UNQUOTED(opal_short_float_complex_t, [[$opal_short_float_complex_type]],
[User-selected alternate C type of short float _Complex])
AC_CHECK_TYPES(opal_short_float_t)
AC_CHECK_TYPES(opal_short_float_complex_t)
AC_CHECK_SIZEOF(opal_short_float_t)
AC_CHECK_SIZEOF(opal_short_float_complex_t)
OPAL_C_GET_ALIGNMENT(opal_short_float_t, OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T)
elif test "$enable_alt_short_float" != ""; then
AC_MSG_ERROR([Alternate C type of short float $opal_short_float_type requested but not available. Aborting])
fi
else
AC_MSG_RESULT([no])
fi
])

Просмотреть файл

@ -25,6 +25,7 @@
# Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
# Copyright (c) 2018 Amazon.com, Inc. or its affiliates.
# All Rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -371,6 +372,27 @@ OPAL_CHECK_IDENT([CC], [CFLAGS], [c], [C])
# Check for some types
#
# 'short float' support of the Intel C++ Compiler (group of C and C++
# compilers), at least versions 18.0 and 19.0, is half-baked. It can
# compile declarations of 'short float' variables and expressions of
# 'sizeof(short float)' but cannot compile casts and operations of
# 'short float' variables. In this situation, 'AC_CHECK_TYPES(short float)'
# defines 'HAVE_SHORT_FLOAT' as 1 and compilation errors occur in
# ompi/mca/op/base/op_base_functions.c. To avoid this error, check it
# using 'AC_COMPILE_IFELSE' and set Autoconf cache variables before
# 'AC_CHECK_TYPES(short float)'. This check can be removed when all
# OMPI-supported Intel C++ Compilers support 'short float' completely
# (or drop it completely).
if test "$opal_cv_c_compiler_vendor" = "intel"; then
AC_MSG_CHECKING([if Intel compiler supports "short float" properly])
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([float f(short float a, short float b) { return (float)(a + b); }])],
[AC_MSG_RESULT([yes])],
[ac_cv_type_short_float="no"
ac_cv_type_short_float__Complex="no"]
AC_MSG_RESULT([no]))
fi
AC_CHECK_TYPES(int8_t)
AC_CHECK_TYPES(uint8_t)
AC_CHECK_TYPES(int16_t)
@ -385,10 +407,12 @@ AC_CHECK_TYPES(uint128_t)
AC_CHECK_TYPES(long long)
AC_CHECK_TYPES(__float128)
AC_CHECK_TYPES(short float)
AC_CHECK_TYPES(long double)
# We only need these types if we're building the OMPI project, but
# OPAL currently doesn't protect for their lack of presence well.
AC_CHECK_HEADERS(complex.h)
AC_CHECK_TYPES(short float _Complex)
AC_CHECK_TYPES(float _Complex)
AC_CHECK_TYPES(double _Complex)
AC_CHECK_TYPES(long double _Complex)
@ -409,6 +433,9 @@ AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
if test "$ac_cv_type_short_float" = yes; then
AC_CHECK_SIZEOF(short float)
fi
AC_CHECK_SIZEOF(float)
AC_CHECK_SIZEOF(double)
AC_CHECK_SIZEOF(long double)
@ -417,6 +444,9 @@ if test "$ac_cv_type___float128" = yes; then
fi
# We only need these types if we're building the OMPI project, but
# OPAL currently doesn't protect for their lack of presence well.
if test "$ac_cv_type_short_float__Complex" = yes; then
AC_CHECK_SIZEOF(short float _Complex)
fi
AC_CHECK_SIZEOF(float _Complex)
AC_CHECK_SIZEOF(double _Complex)
AC_CHECK_SIZEOF(long double _Complex)
@ -459,6 +489,9 @@ OPAL_C_GET_ALIGNMENT(wchar_t, OPAL_ALIGNMENT_WCHAR)
OPAL_C_GET_ALIGNMENT(int, OPAL_ALIGNMENT_INT)
OPAL_C_GET_ALIGNMENT(long, OPAL_ALIGNMENT_LONG)
OPAL_C_GET_ALIGNMENT(long long, OPAL_ALIGNMENT_LONG_LONG)
if test "$ac_cv_type_short_float" = yes; then
OPAL_C_GET_ALIGNMENT(short float, OPAL_ALIGNMENT_SHORT_FLOAT)
fi
OPAL_C_GET_ALIGNMENT(float, OPAL_ALIGNMENT_FLOAT)
OPAL_C_GET_ALIGNMENT(double, OPAL_ALIGNMENT_DOUBLE)
OPAL_C_GET_ALIGNMENT(long double, OPAL_ALIGNMENT_LONG_DOUBLE)
@ -469,6 +502,9 @@ fi
# We only need these types if we're building the OMPI project, but
# OPAL currently doesn't protect for their lack of presence well.
if test "$ac_cv_type_short_float__Complex" = yes; then
OPAL_C_GET_ALIGNMENT(short float _Complex, OPAL_ALIGNMENT_SHORT_FLOAT_COMPLEX)
fi
OPAL_C_GET_ALIGNMENT(float _Complex, OPAL_ALIGNMENT_FLOAT_COMPLEX)
OPAL_C_GET_ALIGNMENT(double _Complex, OPAL_ALIGNMENT_DOUBLE_COMPLEX)
OPAL_C_GET_ALIGNMENT(long double _Complex, OPAL_ALIGNMENT_LONG_DOUBLE_COMPLEX)
@ -476,6 +512,12 @@ OPAL_C_GET_ALIGNMENT(long double _Complex, OPAL_ALIGNMENT_LONG_DOUBLE_COMPLEX)
OPAL_C_GET_ALIGNMENT(void *, OPAL_ALIGNMENT_VOID_P)
OPAL_C_GET_ALIGNMENT(size_t, OPAL_ALIGNMENT_SIZE_T)
#
# Check for an alternate type of C 'short float'
#
OPAL_CHECK_ALT_SHORT_FLOAT
#
# Check for other compiler characteristics
#

Просмотреть файл

@ -9,6 +9,7 @@
* reserved.
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -57,7 +58,7 @@ BEGIN_C_DECLS
#define OMPI_DATATYPE_FLAG_DATA_FORTRAN 0xC000
#define OMPI_DATATYPE_FLAG_DATA_LANGUAGE 0xC000
#define OMPI_DATATYPE_MAX_PREDEFINED 47
#define OMPI_DATATYPE_MAX_PREDEFINED 50
#if OMPI_DATATYPE_MAX_PREDEFINED > OPAL_DATATYPE_MAX_SUPPORTED
#error Need to increase the number of supported dataypes by OPAL (value OPAL_DATATYPE_MAX_SUPPORTED).

Просмотреть файл

@ -9,7 +9,7 @@
* reserved.
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016 FUJITSU LIMITED. All rights reserved.
* Copyright (c) 2016-2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -46,61 +46,70 @@
#define OMPI_DATATYPE_MPI_FLOAT 0x09
#define OMPI_DATATYPE_MPI_DOUBLE 0x0A
#define OMPI_DATATYPE_MPI_LONG_DOUBLE 0x0B
#define OMPI_DATATYPE_MPI_COMPLEX8 0x0C
#define OMPI_DATATYPE_MPI_COMPLEX16 0x0D
#define OMPI_DATATYPE_MPI_COMPLEX32 0x0E
#define OMPI_DATATYPE_MPI_WCHAR 0x0F
#define OMPI_DATATYPE_MPI_PACKED 0x10
#define OMPI_DATATYPE_MPI_COMPLEX4 0x0C
#define OMPI_DATATYPE_MPI_COMPLEX8 0x0D
#define OMPI_DATATYPE_MPI_COMPLEX16 0x0E
#define OMPI_DATATYPE_MPI_COMPLEX32 0x0F
#define OMPI_DATATYPE_MPI_WCHAR 0x10
#define OMPI_DATATYPE_MPI_PACKED 0x11
#define OMPI_DATATYPE_MPI_BOOL 0x11
#define OMPI_DATATYPE_MPI_BOOL 0x12
#define OMPI_DATATYPE_MPI_LOGICAL 0x12
#define OMPI_DATATYPE_MPI_CHARACTER 0x13
#define OMPI_DATATYPE_MPI_INTEGER 0x14
#define OMPI_DATATYPE_MPI_REAL 0x15
#define OMPI_DATATYPE_MPI_DOUBLE_PRECISION 0x16
#define OMPI_DATATYPE_MPI_LOGICAL 0x13
#define OMPI_DATATYPE_MPI_CHARACTER 0x14
#define OMPI_DATATYPE_MPI_INTEGER 0x15
#define OMPI_DATATYPE_MPI_REAL 0x16
#define OMPI_DATATYPE_MPI_DOUBLE_PRECISION 0x17
/*
* Derived datatypes supposely contiguous
* Derived datatypes supposedly contiguous
*/
#define OMPI_DATATYPE_MPI_COMPLEX 0x17 /* Was COMPLEX_FLOAT */
#define OMPI_DATATYPE_MPI_DOUBLE_COMPLEX 0x18 /* Was COMPLEX_DOUBLE */
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX 0x19 /* Was COMPLEX_LONG_DOUBLE */
#define OMPI_DATATYPE_MPI_2INT 0x1A
#define OMPI_DATATYPE_MPI_2INTEGER 0x1B
#define OMPI_DATATYPE_MPI_2REAL 0x1C
#define OMPI_DATATYPE_MPI_2DBLPREC 0x1D
#define OMPI_DATATYPE_MPI_2COMPLEX 0x1E
#define OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX 0x1F
#define OMPI_DATATYPE_MPI_COMPLEX 0x18 /* Was COMPLEX_FLOAT */
#define OMPI_DATATYPE_MPI_DOUBLE_COMPLEX 0x19 /* Was COMPLEX_DOUBLE */
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_COMPLEX 0x1A /* Was COMPLEX_LONG_DOUBLE */
#define OMPI_DATATYPE_MPI_2INT 0x1B
#define OMPI_DATATYPE_MPI_2INTEGER 0x1C
#define OMPI_DATATYPE_MPI_2REAL 0x1D
#define OMPI_DATATYPE_MPI_2DBLPREC 0x1E
#define OMPI_DATATYPE_MPI_2COMPLEX 0x1F
#define OMPI_DATATYPE_MPI_2DOUBLE_COMPLEX 0x20
/*
* Derived datatypes which will definitively be non contiguous on some architectures.
*/
#define OMPI_DATATYPE_MPI_FLOAT_INT 0x20
#define OMPI_DATATYPE_MPI_DOUBLE_INT 0x21
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_INT 0x22
#define OMPI_DATATYPE_MPI_LONG_INT 0x23
#define OMPI_DATATYPE_MPI_SHORT_INT 0x24
#define OMPI_DATATYPE_MPI_FLOAT_INT 0x21
#define OMPI_DATATYPE_MPI_DOUBLE_INT 0x22
#define OMPI_DATATYPE_MPI_LONG_DOUBLE_INT 0x23
#define OMPI_DATATYPE_MPI_LONG_INT 0x24
#define OMPI_DATATYPE_MPI_SHORT_INT 0x25
/*
* Datatypes from the MPI 2.2 standard
*/
#define OMPI_DATATYPE_MPI_AINT 0x25
#define OMPI_DATATYPE_MPI_OFFSET 0x26
#define OMPI_DATATYPE_MPI_C_BOOL 0x27
#define OMPI_DATATYPE_MPI_C_COMPLEX 0x28
#define OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX 0x29
#define OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX 0x2A
#define OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX 0x2B
#define OMPI_DATATYPE_MPI_AINT 0x26
#define OMPI_DATATYPE_MPI_OFFSET 0x27
#define OMPI_DATATYPE_MPI_C_BOOL 0x28
#define OMPI_DATATYPE_MPI_C_COMPLEX 0x29
#define OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX 0x2A
#define OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX 0x2B
#define OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX 0x2C
#define OMPI_DATATYPE_MPI_LB 0x2C
#define OMPI_DATATYPE_MPI_UB 0x2D
#define OMPI_DATATYPE_MPI_LB 0x2D
#define OMPI_DATATYPE_MPI_UB 0x2E
/*
* Datatypes from the MPI 3.0 standard
*/
#define OMPI_DATATYPE_MPI_COUNT 0x2E
#define OMPI_DATATYPE_MPI_COUNT 0x2F
/*
* Datatypes proposed to the MPI Forum in June 2017 for proposal in
* the MPI 4.0 standard. As of February 2019, it is not accepted yet.
* See https://github.com/mpi-forum/mpi-issues/issues/65
*/
#define OMPI_DATATYPE_MPI_SHORT_FLOAT 0x30
#define OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX 0x31
/* This should __ALWAYS__ stay last */
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x2F
#define OMPI_DATATYPE_MPI_UNAVAILABLE 0x32
#define OMPI_DATATYPE_MPI_MAX_PREDEFINED (OMPI_DATATYPE_MPI_UNAVAILABLE+1)
@ -332,6 +341,9 @@
/* REAL */
#if OMPI_SIZEOF_FORTRAN_REAL2 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_REAL
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_SHORT_FLOAT) || \
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_OPAL_SHORT_FLOAT_T)
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_SHORT_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL2 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL2 == SIZEOF_DOUBLE
@ -344,6 +356,9 @@
#if OMPI_SIZEOF_FORTRAN_REAL4 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_REAL
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_SHORT_FLOAT) || \
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_OPAL_SHORT_FLOAT_T)
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_SHORT_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL4 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL4 == SIZEOF_DOUBLE
@ -356,6 +371,9 @@
#if OMPI_SIZEOF_FORTRAN_REAL8 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_REAL
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_SHORT_FLOAT) || \
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_OPAL_SHORT_FLOAT_T)
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_SHORT_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL8 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL8 == SIZEOF_DOUBLE
@ -368,6 +386,9 @@
#if OMPI_SIZEOF_FORTRAN_REAL16 == OMPI_SIZEOF_FORTRAN_REAL
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_REAL
#elif (defined(HAVE_SHORT_FLOAT) && OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_SHORT_FLOAT) || \
(defined(HAVE_OPAL_SHORT_FLOAT_T) && OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_OPAL_SHORT_FLOAT_T)
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_SHORT_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_FLOAT
# define OMPI_DATATYPE_MPI_REAL16 OMPI_DATATYPE_MPI_FLOAT
#elif OMPI_SIZEOF_FORTRAN_REAL16 == SIZEOF_DOUBLE
@ -382,6 +403,7 @@
* C++ datatypes, these map to C datatypes.
*/
#define OMPI_DATATYPE_MPI_CXX_BOOL OMPI_DATATYPE_MPI_C_BOOL
#define OMPI_DATATYPE_MPI_CXX_SHORT_FLOAT_COMPLEX OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX
#define OMPI_DATATYPE_MPI_CXX_FLOAT_COMPLEX OMPI_DATATYPE_MPI_C_FLOAT_COMPLEX
#define OMPI_DATATYPE_MPI_CXX_DOUBLE_COMPLEX OMPI_DATATYPE_MPI_C_DOUBLE_COMPLEX
#define OMPI_DATATYPE_MPI_CXX_LONG_DOUBLE_COMPLEX OMPI_DATATYPE_MPI_C_LONG_DOUBLE_COMPLEX
@ -438,7 +460,7 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE( UNAVAILABLE, NAME, FLAGS )
/*
* Initilization for these types is deferred until runtime.
* Initialization for these types is deferred until runtime.
*
* Using this macro implies that at this point not all informations needed
* to fill up the datatype are known. We fill them with zeros and then later
@ -570,6 +592,26 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
#define OMPI_DATATYPE_INITIALIZER_UNSIGNED_LONG_LONG OPAL_DATATYPE_INITIALIZER_UINT16
#endif
#if defined(HAVE_SHORT_FLOAT)
#if SIZEOF_SHORT_FLOAT == 2
#define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT OPAL_DATATYPE_INITIALIZER_FLOAT2
#elif SIZEOF_SHORT_FLOAT == 4
#define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT OPAL_DATATYPE_INITIALIZER_FLOAT4
#elif SIZEOF_SHORT_FLOAT == 8
#define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT OPAL_DATATYPE_INITIALIZER_FLOAT8
#endif
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) /* HAVE_SHORT_FLOAT */
#if SIZEOF_OPAL_SHORT_FLOAT_T == 2
#define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT OPAL_DATATYPE_INITIALIZER_FLOAT2
#elif SIZEOF_OPAL_SHORT_FLOAT_T == 4
#define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT OPAL_DATATYPE_INITIALIZER_FLOAT4
#elif SIZEOF_OPAL_SHORT_FLOAT_T == 8
#define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT OPAL_DATATYPE_INITIALIZER_FLOAT8
#endif
#else /* HAVE_SHORT_FLOAT */
#define OMPI_DATATYPE_INITIALIZER_SHORT_FLOAT OPAL_DATATYPE_INITIALIZER_UNAVAILABLE
#endif /* HAVE_SHORT_FLOAT */
#if SIZEOF_FLOAT == 2
#define OMPI_DATATYPE_INITIALIZER_FLOAT OPAL_DATATYPE_INITIALIZER_FLOAT2
#elif SIZEOF_FLOAT == 4
@ -604,6 +646,7 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
#define OMPI_DATATYPE_INITIALIZER_WCHAR OPAL_DATATYPE_INITIALIZER_WCHAR
#define OMPI_DATATYPE_INITIALIZER_C_SHORT_FLOAT_COMPLEX OPAL_DATATYPE_INITIALIZER_SHORT_FLOAT_COMPLEX
#define OMPI_DATATYPE_INITIALIZER_C_FLOAT_COMPLEX OPAL_DATATYPE_INITIALIZER_FLOAT_COMPLEX
#define OMPI_DATATYPE_INITIALIZER_C_DOUBLE_COMPLEX OPAL_DATATYPE_INITIALIZER_DOUBLE_COMPLEX
#define OMPI_DATATYPE_INITIALIZER_C_LONG_DOUBLE_COMPLEX OPAL_DATATYPE_INITIALIZER_LONG_DOUBLE_COMPLEX
@ -615,7 +658,7 @@ extern const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX
#define OMPI_DATATYPE_FIRST_TYPE OPAL_DATATYPE_MAX_PREDEFINED
/*
* Derived datatypes supposely contiguous
* Derived datatypes supposedly contiguous
*/
#define OMPI_DATATYPE_2INT (OMPI_DATATYPE_FIRST_TYPE+6)
#define OMPI_DATATYPE_2INTEGER (OMPI_DATATYPE_FIRST_TYPE+7)

Просмотреть файл

@ -17,7 +17,7 @@
* reserved.
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016 FUJITSU LIMITED. All rights reserved.
* Copyright (c) 2016-2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -49,9 +49,9 @@ int32_t ompi_datatype_number_of_predefined_data = 0;
* The following initialization of C, C++ and Fortran types is fairly complex,
* based on the OPAL-datatypes.
* ompi_datatypes.h
* \-------> ompi_datatypes_internal.h (Macros defining type-number and initalization)
* \-------> ompi_datatypes_internal.h (Macros defining type-number and initialization)
* opal_datatypes.h
* \-------> opal_datatypes_internal.h (Macros defining type-number and initalization)
* \-------> opal_datatypes_internal.h (Macros defining type-number and initialization)
*
* The Macros in the OMPI Layer differ in that:
* Additionally to OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE, we have a OMPI_DATATYPE_INIT_PREDEFINED,
@ -82,6 +82,11 @@ ompi_predefined_datatype_t ompi_mpi_long = OMPI_DATATYPE_INIT_PREDEFIN
ompi_predefined_datatype_t ompi_mpi_unsigned_long = OMPI_DATATYPE_INIT_PREDEFINED (UNSIGNED_LONG, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT );
ompi_predefined_datatype_t ompi_mpi_long_long_int = OMPI_DATATYPE_INIT_PREDEFINED (LONG_LONG_INT, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT );
ompi_predefined_datatype_t ompi_mpi_unsigned_long_long = OMPI_DATATYPE_INIT_PREDEFINED (UNSIGNED_LONG_LONG, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_INT );
#if defined(HAVE_SHORT_FLOAT) || defined(HAVE_OPAL_SHORT_FLOAT_T)
ompi_predefined_datatype_t ompi_mpi_short_float = OMPI_DATATYPE_INIT_PREDEFINED (SHORT_FLOAT, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_FLOAT );
#else
ompi_predefined_datatype_t ompi_mpi_short_float = OMPI_DATATYPE_INIT_UNAVAILABLE (SHORT_FLOAT, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_FLOAT );
#endif /* HAVE_SHORT_FLOAT */
ompi_predefined_datatype_t ompi_mpi_float = OMPI_DATATYPE_INIT_PREDEFINED (FLOAT, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_FLOAT );
ompi_predefined_datatype_t ompi_mpi_double = OMPI_DATATYPE_INIT_PREDEFINED (DOUBLE, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_FLOAT );
ompi_predefined_datatype_t ompi_mpi_long_double = OMPI_DATATYPE_INIT_PREDEFINED (LONG_DOUBLE, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_FLOAT );
@ -101,12 +106,22 @@ ompi_predefined_datatype_t ompi_mpi_cxx_bool = OMPI_DATATYPE_INIT_PREDEFIN
/*
* Complex datatypes for C (base types), C++, and fortran
*/
#if defined(HAVE_SHORT_FLOAT__COMPLEX) || defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
ompi_predefined_datatype_t ompi_mpi_c_short_float_complex = OMPI_DATATYPE_INIT_PREDEFINED (C_SHORT_FLOAT_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
#else
ompi_predefined_datatype_t ompi_mpi_c_short_float_complex = OMPI_DATATYPE_INIT_UNAVAILABLE (C_SHORT_FLOAT_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
#endif /* HAVE_SHORT_FLOAT__COMPLEX */
ompi_predefined_datatype_t ompi_mpi_c_float_complex = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (C_FLOAT_COMPLEX, C_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
ompi_predefined_datatype_t ompi_mpi_c_complex = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (C_FLOAT_COMPLEX, C_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
ompi_predefined_datatype_t ompi_mpi_c_double_complex = OMPI_DATATYPE_INIT_PREDEFINED (C_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
ompi_predefined_datatype_t ompi_mpi_c_long_double_complex = OMPI_DATATYPE_INIT_PREDEFINED (C_LONG_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_C | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
/* The C++ complex datatypes are the same as the C datatypes */
#if defined(HAVE_SHORT_FLOAT__COMPLEX) || defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
ompi_predefined_datatype_t ompi_mpi_cxx_sfltcplex = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (C_SHORT_FLOAT_COMPLEX, CXX_SHORT_FLOAT_COMPLEX, OMPI_DATATYPE_FLAG_DATA_CPP | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
#else
ompi_predefined_datatype_t ompi_mpi_cxx_sfltcplex = OMPI_DATATYPE_INIT_UNAVAILABLE (CXX_SHORT_FLOAT_COMPLEX, OMPI_DATATYPE_FLAG_DATA_CPP | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
#endif /* HAVE_SHORT_FLOAT__COMPLEX */
ompi_predefined_datatype_t ompi_mpi_cxx_cplex = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (C_FLOAT_COMPLEX, CXX_FLOAT_COMPLEX, OMPI_DATATYPE_FLAG_DATA_CPP | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
ompi_predefined_datatype_t ompi_mpi_cxx_dblcplex = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (C_DOUBLE_COMPLEX, CXX_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_CPP | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
ompi_predefined_datatype_t ompi_mpi_cxx_ldblcplex = OMPI_DATATYPE_INIT_PREDEFINED_BASIC_TYPE (C_LONG_DOUBLE_COMPLEX, CXX_LONG_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_CPP | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
@ -130,6 +145,12 @@ ompi_predefined_datatype_t ompi_mpi_ldblcplex = OMPI_DATATYPE_INIT_PREDEFIN
ompi_predefined_datatype_t ompi_mpi_ldblcplex = OMPI_DATATYPE_INIT_UNAVAILABLE (LONG_DOUBLE_COMPLEX, OMPI_DATATYPE_FLAG_DATA_FORTRAN | OMPI_DATATYPE_FLAG_DATA_COMPLEX );
#endif
#if OMPI_HAVE_FORTRAN_COMPLEX4
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 );
#else
ompi_predefined_datatype_t ompi_mpi_complex4 = OMPI_DATATYPE_INIT_UNAVAILABLE (COMPLEX4, OMPI_DATATYPE_FLAG_DATA_FORTRAN | OMPI_DATATYPE_FLAG_DATA_COMPLEX);
#endif
#if OMPI_HAVE_FORTRAN_COMPLEX8
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 );
#else
@ -300,6 +321,7 @@ const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX_PREDEF
[OMPI_DATATYPE_MPI_FLOAT] = &ompi_mpi_float.dt,
[OMPI_DATATYPE_MPI_DOUBLE] = &ompi_mpi_double.dt,
[OMPI_DATATYPE_MPI_LONG_DOUBLE] = &ompi_mpi_long_double.dt,
[OMPI_DATATYPE_MPI_COMPLEX4] = &ompi_mpi_complex4.dt,
[OMPI_DATATYPE_MPI_COMPLEX8] = &ompi_mpi_complex8.dt,
[OMPI_DATATYPE_MPI_COMPLEX16] = &ompi_mpi_complex16.dt,
[OMPI_DATATYPE_MPI_COMPLEX32] = &ompi_mpi_complex32.dt,
@ -347,6 +369,12 @@ const ompi_datatype_t* ompi_datatype_basicDatatypes[OMPI_DATATYPE_MPI_MAX_PREDEF
/* MPI 3.0 types */
[OMPI_DATATYPE_MPI_COUNT] = &ompi_mpi_count.dt,
/* Datatypes proposed to the MPI Forum in June 2017 for proposal in
* the MPI 4.0 standard. As of February 2019, it is not accepted yet.
* See https://github.com/mpi-forum/mpi-issues/issues/65 */
[OMPI_DATATYPE_MPI_SHORT_FLOAT] = &ompi_mpi_short_float.dt,
[OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX] = &ompi_mpi_c_short_float_complex.dt,
[OMPI_DATATYPE_MPI_UNAVAILABLE] = &ompi_mpi_unavailable.dt,
};
@ -612,6 +640,16 @@ int32_t ompi_datatype_init( void )
/* MPI 3.0 types */
MOOG(count, 72);
/* Datatype missing in old Open MPI */
MOOG(complex4, 73);
/* Datatypes proposed to the MPI Forum in June 2017 for proposal in
* the MPI 4.0 standard. As of February 2019, it is not accepted yet.
* See https://github.com/mpi-forum/mpi-issues/issues/65 */
MOOG(short_float, 74);
MOOG(c_short_float_complex, 75);
MOOG(cxx_sfltcplex, 76);
/**
* Now make sure all non-contiguous types are marked as such.
*/

Просмотреть файл

@ -13,6 +13,7 @@
# Copyright (c) 2009-2011 Oak Ridge National Labs. All rights reserved.
# Copyright (c) 2014-2015 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -86,7 +87,9 @@ mpif-sizeof.h:
--header=$@ --ierror=mandatory \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
#

Просмотреть файл

@ -20,6 +20,7 @@
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017-2018 IBM Corporation. All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -969,6 +970,7 @@ OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real2;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real4;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real8;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_real16;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex4;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex8;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_complex16;
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
#define MPI_INTEGER16 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_integer16)
#endif
#define MPI_REAL OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_real)
#if OMPI_HAVE_FORTRAN_REAL2
#define MPI_REAL2 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_real2)
#endif
#if OMPI_HAVE_FORTRAN_REAL4
#define MPI_REAL4 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_real4)
#endif
@ -1120,6 +1125,9 @@ OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_ub
#endif
#define MPI_DOUBLE_PRECISION OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_dblprec)
#define MPI_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_cplex)
#if OMPI_HAVE_FORTRAN_REAL2
#define MPI_COMPLEX4 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_complex4)
#endif
#if OMPI_HAVE_FORTRAN_REAL4
#define MPI_COMPLEX8 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_complex8)
#endif

Просмотреть файл

@ -3,7 +3,7 @@
# Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2016-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 FUJITSU LIMITED. All rights reserved.
# Copyright (c) 2016-2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -195,6 +195,7 @@ $handles->{MPI_C_FLOAT_COMPLEX} = $handles->{MPI_C_COMPLEX};
$handles->{MPI_C_DOUBLE_COMPLEX} = 70;
$handles->{MPI_C_LONG_DOUBLE_COMPLEX} = 71;
$handles->{MPI_COUNT} = 72;
$handles->{MPI_COMPLEX4} = 73;
$handles->{MPI_MESSAGE_NO_PROC} = 1;

Просмотреть файл

@ -27,8 +27,9 @@ extern mca_coll_hcoll_dtype_t zero_dte_mapping;
#define OPAL_DATATYPE_FLOAT8 16
#define OPAL_DATATYPE_FLOAT12 17
#define OPAL_DATATYPE_FLOAT16 18
#define OPAL_DATATYPE_FLOAT_COMPLEX 19
#define OPAL_DATATYPE_DOUBLE_COMPLEX 20
#define OPAL_DATATYPE_SHORT_FLOAT_COMPLEX 19
#define OPAL_DATATYPE_FLOAT_COMPLEX 20
#define OPAL_DATATYPE_DOUBLE_COMPLEX 21
total 15 types
*/
@ -56,37 +57,42 @@ static dte_data_representation_t* ompi_datatype_2_dte_data_rep[OMPI_DATATYPE_MAX
&DTE_UINT32, /*OPAL_DATATYPE_UINT4 11 */
&DTE_UINT64, /*OPAL_DATATYPE_UINT8 12 */
&DTE_UINT128, /*OPAL_DATATYPE_UINT16 13 */
&DTE_ZERO, /*OPAL_DATATYPE_FLOAT2 14 */
#if defined(DTE_FLOAT16)
&DTE_FLOAT16, /*OPAL_DATATYPE_FLOAT2 14 */
#else
&DTE_ZERO,
#endif
&DTE_FLOAT32, /*OPAL_DATATYPE_FLOAT4 15 */
&DTE_FLOAT64, /*OPAL_DATATYPE_FLOAT8 16 */
&DTE_FLOAT96, /*OPAL_DATATYPE_FLOAT12 17 */
&DTE_FLOAT128, /*OPAL_DATATYPE_FLOAT16 18 */
&DTE_ZERO, /*OPAL_DATATYPE_SHORT_FLOAT_COMPLEX 19 */
#if defined(DTE_FLOAT32_COMPLEX)
&DTE_FLOAT32_COMPLEX, /*OPAL_DATATYPE_COMPLEX8 19 */
&DTE_FLOAT32_COMPLEX, /*OPAL_DATATYPE_FLOAT_COMPLEX 20 */
#else
&DTE_ZERO,
#endif
#if defined(DTE_FLOAT64_COMPLEX)
&DTE_FLOAT64_COMPLEX, /*OPAL_DATATYPE_COMPLEX32 20 */
&DTE_FLOAT64_COMPLEX, /*OPAL_DATATYPE_DOUBLE_COMPLEX 21 */
#else
&DTE_ZERO,
#endif
#if defined(DTE_FLOAT128_COMPLEX)
&DTE_FLOAT128_COMPLEX, /*OPAL_DATATYPE_COMPLEX64 21 */
&DTE_FLOAT128_COMPLEX, /*OPAL_DATATYPE_LONG_DOUBLE_COMPLEX 22 */
#else
&DTE_ZERO,
#endif
#if defined(DTE_BOOL)
&DTE_BOOL, /*OPAL_DATATYPE_BOOL 22 */
&DTE_BOOL, /*OPAL_DATATYPE_BOOL 23 */
#else
&DTE_ZERO,
#endif
#if defined(DTE_WCHAR)
&DTE_WCHAR, /*OPAL_DATATYPE_WCHAR 23 */
&DTE_WCHAR, /*OPAL_DATATYPE_WCHAR 24 */
#else
&DTE_ZERO,
#endif
&DTE_ZERO /*OPAL_DATATYPE_UNAVAILABLE 24 */
&DTE_ZERO /*OPAL_DATATYPE_UNAVAILABLE 25 */
};
enum {

Просмотреть файл

@ -68,6 +68,7 @@ ptl_datatype_t ompi_coll_portals4_atomic_datatype [OMPI_DATATYPE_MPI_MAX_PREDEFI
[OMPI_DATATYPE_MPI_FLOAT] = PTL_FLOAT,
[OMPI_DATATYPE_MPI_DOUBLE] = PTL_DOUBLE,
[OMPI_DATATYPE_MPI_LONG_DOUBLE] = COLL_PORTALS4_NO_DTYPE,
[OMPI_DATATYPE_MPI_COMPLEX4] = COLL_PORTALS4_NO_DTYPE,
[OMPI_DATATYPE_MPI_COMPLEX8] = COLL_PORTALS4_NO_DTYPE,
[OMPI_DATATYPE_MPI_COMPLEX16] = COLL_PORTALS4_NO_DTYPE,
[OMPI_DATATYPE_MPI_COMPLEX32] = COLL_PORTALS4_NO_DTYPE,
@ -116,6 +117,12 @@ ptl_datatype_t ompi_coll_portals4_atomic_datatype [OMPI_DATATYPE_MPI_MAX_PREDEFI
/* MPI 3.0 types */
[OMPI_DATATYPE_MPI_COUNT] = COLL_PORTALS4_NO_DTYPE,
/* Datatypes proposed to the MPI Forum in June 2017 for proposal in
* the MPI 4.0 standard. As of February 2019, it is not accepted yet.
* See https://github.com/mpi-forum/mpi-issues/issues/65 */
[OMPI_DATATYPE_MPI_SHORT_FLOAT] = COLL_PORTALS4_NO_DTYPE,
[OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX] = COLL_PORTALS4_NO_DTYPE,
[OMPI_DATATYPE_MPI_UNAVAILABLE] = COLL_PORTALS4_NO_DTYPE,
};

Просмотреть файл

@ -13,6 +13,7 @@
* Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -102,6 +103,49 @@
} \
}
/*
* Define a function to calculate sum of complex numbers using a real
* number floating-point type (float, double, etc.). This macro is used
* when the compiler supports a real number floating-point type but does
* not supports the corresponding complex number type.
*/
#define COMPLEX_SUM_FUNC(type_name, type) \
static void ompi_op_base_2buff_sum_##type_name(void *in, void *out, int *count, \
struct ompi_datatype_t **dtype, \
struct ompi_op_base_module_1_0_0_t *module) \
{ \
int i; \
type (*a)[2] = (type (*)[2]) in; \
type (*b)[2] = (type (*)[2]) out; \
for (i = 0; i < *count; ++i, ++a, ++b) { \
(*b)[0] += (*a)[0]; \
(*b)[1] += (*a)[1]; \
} \
}
/*
* Define a function to calculate product of complex numbers using a real
* number floating-point type (float, double, etc.). This macro is used
* when the compiler supports a real number floating-point type but does
* not supports the corresponding complex number type.
*/
#define COMPLEX_PROD_FUNC(type_name, type) \
static void ompi_op_base_2buff_prod_##type_name(void *in, void *out, int *count, \
struct ompi_datatype_t **dtype, \
struct ompi_op_base_module_1_0_0_t *module) \
{ \
int i; \
type (*a)[2] = (type (*)[2]) in; \
type (*b)[2] = (type (*)[2]) out; \
type c[2]; \
for (i = 0; i < *count; ++i, ++a, ++b) { \
c[0] = (*a)[0] * (*b)[0] - (*a)[1] * (*b)[1]; \
c[1] = (*a)[0] * (*b)[1] + (*a)[1] * (*b)[0]; \
(*b)[0] = c[0]; \
(*b)[1] = c[1]; \
} \
}
/*************************************************************************
* Max
*************************************************************************/
@ -137,6 +181,11 @@ FUNC_FUNC(max, fortran_integer8, ompi_fortran_integer8_t)
FUNC_FUNC(max, fortran_integer16, ompi_fortran_integer16_t)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
FUNC_FUNC(max, short_float, short float)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
FUNC_FUNC(max, short_float, opal_short_float_t)
#endif
FUNC_FUNC(max, float, float)
FUNC_FUNC(max, double, double)
FUNC_FUNC(max, long_double, long double)
@ -195,6 +244,11 @@ FUNC_FUNC(min, fortran_integer8, ompi_fortran_integer8_t)
FUNC_FUNC(min, fortran_integer16, ompi_fortran_integer16_t)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
FUNC_FUNC(min, short_float, short float)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
FUNC_FUNC(min, short_float, opal_short_float_t)
#endif
FUNC_FUNC(min, float, float)
FUNC_FUNC(min, double, double)
FUNC_FUNC(min, long_double, long double)
@ -250,6 +304,11 @@ OP_FUNC(sum, fortran_integer8, ompi_fortran_integer8_t, +=)
OP_FUNC(sum, fortran_integer16, ompi_fortran_integer16_t, +=)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
OP_FUNC(sum, short_float, short float, +=)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
OP_FUNC(sum, short_float, opal_short_float_t, +=)
#endif
OP_FUNC(sum, float, float, +=)
OP_FUNC(sum, double, double, +=)
OP_FUNC(sum, long_double, long double, +=)
@ -272,6 +331,11 @@ OP_FUNC(sum, fortran_real8, ompi_fortran_real8_t, +=)
OP_FUNC(sum, fortran_real16, ompi_fortran_real16_t, +=)
#endif
/* Complex */
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
OP_FUNC(sum, c_short_float_complex, short float _Complex, +=)
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
COMPLEX_SUM_FUNC(c_short_float_complex, opal_short_float_t)
#endif
OP_FUNC(sum, c_float_complex, float _Complex, +=)
OP_FUNC(sum, c_double_complex, double _Complex, +=)
OP_FUNC(sum, c_long_double_complex, long double _Complex, +=)
@ -309,6 +373,11 @@ OP_FUNC(prod, fortran_integer8, ompi_fortran_integer8_t, *=)
OP_FUNC(prod, fortran_integer16, ompi_fortran_integer16_t, *=)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
OP_FUNC(prod, short_float, short float, *=)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
OP_FUNC(prod, short_float, opal_short_float_t, *=)
#endif
OP_FUNC(prod, float, float, *=)
OP_FUNC(prod, double, double, *=)
OP_FUNC(prod, long_double, long double, *=)
@ -331,6 +400,11 @@ OP_FUNC(prod, fortran_real8, ompi_fortran_real8_t, *=)
OP_FUNC(prod, fortran_real16, ompi_fortran_real16_t, *=)
#endif
/* Complex */
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
OP_FUNC(prod, c_short_float_complex, short float _Complex, *=)
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
COMPLEX_PROD_FUNC(c_short_float_complex, opal_short_float_t)
#endif
OP_FUNC(prod, c_float_complex, float _Complex, *=)
OP_FUNC(prod, c_double_complex, double _Complex, *=)
OP_FUNC(prod, c_long_double_complex, long double _Complex, *=)
@ -656,6 +730,50 @@ LOC_FUNC(minloc, long_double_int, <)
} \
}
/*
* Define a function to calculate sum of complex numbers using a real
* number floating-point type (float, double, etc.). This macro is used
* when the compiler supports a real number floating-point type but does
* not supports the corresponding complex number type.
*/
#define COMPLEX_SUM_FUNC_3BUF(type_name, type) \
static void ompi_op_base_3buff_sum_##type_name(void * restrict in1, \
void * restrict in2, void * restrict out, int *count, \
struct ompi_datatype_t **dtype, \
struct ompi_op_base_module_1_0_0_t *module) \
{ \
int i; \
type (*a1)[2] = (type (*)[2]) in1; \
type (*a2)[2] = (type (*)[2]) in2; \
type (*b)[2] = (type (*)[2]) out; \
for (i = 0; i < *count; ++i, ++a1, ++a2, ++b) { \
(*b)[0] = (*a1)[0] + (*a2)[0]; \
(*b)[1] = (*a1)[1] + (*a2)[1]; \
} \
}
/*
* Define a function to calculate product of complex numbers using a real
* number floating-point type (float, double, etc.). This macro is used
* when the compiler supports a real number floating-point type but does
* not supports the corresponding complex number type.
*/
#define COMPLEX_PROD_FUNC_3BUF(type_name, type) \
static void ompi_op_base_3buff_prod_##type_name(void * restrict in1, \
void * restrict in2, void * restrict out, int *count, \
struct ompi_datatype_t **dtype, \
struct ompi_op_base_module_1_0_0_t *module) \
{ \
int i; \
type (*a1)[2] = (type (*)[2]) in1; \
type (*a2)[2] = (type (*)[2]) in2; \
type (*b)[2] = (type (*)[2]) out; \
for (i = 0; i < *count; ++i, ++a1, ++a2, ++b) { \
(*b)[0] = (*a1)[0] * (*a2)[0] - (*a1)[1] * (*a2)[1]; \
(*b)[1] = (*a1)[0] * (*a2)[1] + (*a1)[1] * (*a2)[0]; \
} \
}
/*************************************************************************
* Max
*************************************************************************/
@ -691,6 +809,11 @@ FUNC_FUNC_3BUF(max, fortran_integer8, ompi_fortran_integer8_t)
FUNC_FUNC_3BUF(max, fortran_integer16, ompi_fortran_integer16_t)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
FUNC_FUNC_3BUF(max, short_float, short float)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
FUNC_FUNC_3BUF(max, short_float, opal_short_float_t)
#endif
FUNC_FUNC_3BUF(max, float, float)
FUNC_FUNC_3BUF(max, double, double)
FUNC_FUNC_3BUF(max, long_double, long double)
@ -749,6 +872,11 @@ FUNC_FUNC_3BUF(min, fortran_integer8, ompi_fortran_integer8_t)
FUNC_FUNC_3BUF(min, fortran_integer16, ompi_fortran_integer16_t)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
FUNC_FUNC_3BUF(min, short_float, short float)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
FUNC_FUNC_3BUF(min, short_float, opal_short_float_t)
#endif
FUNC_FUNC_3BUF(min, float, float)
FUNC_FUNC_3BUF(min, double, double)
FUNC_FUNC_3BUF(min, long_double, long double)
@ -804,6 +932,11 @@ OP_FUNC_3BUF(sum, fortran_integer8, ompi_fortran_integer8_t, +)
OP_FUNC_3BUF(sum, fortran_integer16, ompi_fortran_integer16_t, +)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
OP_FUNC_3BUF(sum, short_float, short float, +)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
OP_FUNC_3BUF(sum, short_float, opal_short_float_t, +)
#endif
OP_FUNC_3BUF(sum, float, float, +)
OP_FUNC_3BUF(sum, double, double, +)
OP_FUNC_3BUF(sum, long_double, long double, +)
@ -826,6 +959,11 @@ OP_FUNC_3BUF(sum, fortran_real8, ompi_fortran_real8_t, +)
OP_FUNC_3BUF(sum, fortran_real16, ompi_fortran_real16_t, +)
#endif
/* Complex */
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
OP_FUNC_3BUF(sum, c_short_float_complex, short float _Complex, +)
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
COMPLEX_SUM_FUNC_3BUF(c_short_float_complex, opal_short_float_t)
#endif
OP_FUNC_3BUF(sum, c_float_complex, float _Complex, +)
OP_FUNC_3BUF(sum, c_double_complex, double _Complex, +)
OP_FUNC_3BUF(sum, c_long_double_complex, long double _Complex, +)
@ -863,6 +1001,11 @@ OP_FUNC_3BUF(prod, fortran_integer8, ompi_fortran_integer8_t, *)
OP_FUNC_3BUF(prod, fortran_integer16, ompi_fortran_integer16_t, *)
#endif
/* Floating point */
#if defined(HAVE_SHORT_FLOAT)
OP_FUNC_3BUF(prod, short_float, short float, *)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
OP_FUNC_3BUF(prod, short_float, opal_short_float_t, *)
#endif
OP_FUNC_3BUF(prod, float, float, *)
OP_FUNC_3BUF(prod, double, double, *)
OP_FUNC_3BUF(prod, long_double, long double, *)
@ -885,6 +1028,11 @@ OP_FUNC_3BUF(prod, fortran_real8, ompi_fortran_real8_t, *)
OP_FUNC_3BUF(prod, fortran_real16, ompi_fortran_real16_t, *)
#endif
/* Complex */
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
OP_FUNC_3BUF(prod, c_short_float_complex, short float _Complex, *)
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
COMPLEX_PROD_FUNC_3BUF(c_short_float_complex, opal_short_float_t)
#endif
OP_FUNC_3BUF(prod, c_float_complex, float _Complex, *)
OP_FUNC_3BUF(prod, c_double_complex, double _Complex, *)
OP_FUNC_3BUF(prod, c_long_double_complex, long double _Complex, *)
@ -1240,12 +1388,22 @@ LOC_FUNC_3BUF(minloc, long_double_int, <)
/** Floating point, including all the Fortran reals *********************/
#if defined(HAVE_SHORT_FLOAT) || defined(HAVE_OPAL_SHORT_FLOAT_T)
#define SHORT_FLOAT(name, ftype) ompi_op_base_##ftype##_##name##_short_float
#else
#define SHORT_FLOAT(name, ftype) NULL
#endif
#define FLOAT(name, ftype) ompi_op_base_##ftype##_##name##_float
#define DOUBLE(name, ftype) ompi_op_base_##ftype##_##name##_double
#define LONG_DOUBLE(name, ftype) ompi_op_base_##ftype##_##name##_long_double
#define FLOATING_POINT(name, ftype) \
[OMPI_OP_BASE_TYPE_FLOAT] = ompi_op_base_##ftype##_##name##_float, \
[OMPI_OP_BASE_TYPE_DOUBLE] = ompi_op_base_##ftype##_##name##_double, \
[OMPI_OP_BASE_TYPE_SHORT_FLOAT] = SHORT_FLOAT(name, ftype), \
[OMPI_OP_BASE_TYPE_FLOAT] = FLOAT(name, ftype), \
[OMPI_OP_BASE_TYPE_DOUBLE] = DOUBLE(name, ftype), \
FLOATING_POINT_FORTRAN_REAL(name, ftype), \
[OMPI_OP_BASE_TYPE_DOUBLE_PRECISION] = FLOATING_POINT_FORTRAN_DOUBLE_PRECISION(name, ftype), \
[OMPI_OP_BASE_TYPE_LONG_DOUBLE] = ompi_op_base_##ftype##_##name##_long_double
[OMPI_OP_BASE_TYPE_LONG_DOUBLE] = LONG_DOUBLE(name, ftype)
/** Fortran logical *****************************************************/
@ -1262,11 +1420,17 @@ LOC_FUNC_3BUF(minloc, long_double_int, <)
/** Complex *****************************************************/
#if defined(HAVE_SHORT_FLOAT__COMPLEX) || defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
#define SHORT_FLOAT_COMPLEX(name, ftype) ompi_op_base_##ftype##_##name##_c_short_float_complex
#else
#define SHORT_FLOAT_COMPLEX(name, ftype) NULL
#endif
#define FLOAT_COMPLEX(name, ftype) ompi_op_base_##ftype##_##name##_c_float_complex
#define DOUBLE_COMPLEX(name, ftype) ompi_op_base_##ftype##_##name##_c_double_complex
#define LONG_DOUBLE_COMPLEX(name, ftype) ompi_op_base_##ftype##_##name##_c_long_double_complex
#define COMPLEX(name, ftype) \
[OMPI_OP_BASE_TYPE_C_SHORT_FLOAT_COMPLEX] = SHORT_FLOAT_COMPLEX(name, ftype), \
[OMPI_OP_BASE_TYPE_C_FLOAT_COMPLEX] = FLOAT_COMPLEX(name, ftype), \
[OMPI_OP_BASE_TYPE_C_DOUBLE_COMPLEX] = DOUBLE_COMPLEX(name, ftype), \
[OMPI_OP_BASE_TYPE_C_LONG_DOUBLE_COMPLEX] = LONG_DOUBLE_COMPLEX(name, ftype)

Просмотреть файл

@ -16,6 +16,7 @@
* Copyright (c) 2007-2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -131,6 +132,8 @@ enum {
/** Fortran integer*16 */
OMPI_OP_BASE_TYPE_INTEGER16,
/** Floating point: short float */
OMPI_OP_BASE_TYPE_SHORT_FLOAT,
/** Floating point: float */
OMPI_OP_BASE_TYPE_FLOAT,
/** Floating point: double */
@ -156,6 +159,8 @@ enum {
OMPI_OP_BASE_TYPE_BOOL,
/** Complex */
/* short float complex */
OMPI_OP_BASE_TYPE_C_SHORT_FLOAT_COMPLEX,
/* float complex */
OMPI_OP_BASE_TYPE_C_FLOAT_COMPLEX,
/* double complex */

Просмотреть файл

@ -51,6 +51,7 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
{
uint64_t key;
int p_key, r_key;
int sflt_dig = 3, sflt_max_10_exp = +5, sflt_min_10_exp = -4;
OPAL_CR_NOOP_PROGRESS();
@ -87,7 +88,9 @@ int MPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype)
if ( (LDBL_DIG < p) || (LDBL_MAX_10_EXP < r) || (-LDBL_MIN_10_EXP < r) ) *newtype = &ompi_mpi_datatype_null.dt;
else if( (DBL_DIG < p) || (DBL_MAX_10_EXP < r) || (-DBL_MIN_10_EXP < r) ) *newtype = &ompi_mpi_ldblcplex.dt;
else if( (FLT_DIG < p) || (FLT_MAX_10_EXP < r) || (-FLT_MIN_10_EXP < r) ) *newtype = &ompi_mpi_dblcplex.dt;
else *newtype = &ompi_mpi_cplex.dt;
else if( ! OMPI_HAVE_FORTRAN_COMPLEX4 ||
(sflt_dig < p) || (sflt_max_10_exp < r) || (-sflt_min_10_exp < r) ) *newtype = &ompi_mpi_cplex.dt;
else *newtype = &ompi_mpi_complex4.dt;
if( *newtype != &ompi_mpi_datatype_null.dt ) {
ompi_datatype_t* datatype;

Просмотреть файл

@ -51,6 +51,7 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
{
uint64_t key;
int p_key, r_key;
int sflt_dig = 3, sflt_max_10_exp = +5, sflt_min_10_exp = -4;
OPAL_CR_NOOP_PROGRESS();
@ -87,7 +88,9 @@ int MPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype)
if ( (LDBL_DIG < p) || (LDBL_MAX_10_EXP < r) || (-LDBL_MIN_10_EXP < r) ) *newtype = &ompi_mpi_datatype_null.dt;
else if( (DBL_DIG < p) || (DBL_MAX_10_EXP < r) || (-DBL_MIN_10_EXP < r) ) *newtype = &ompi_mpi_long_double.dt;
else if( (FLT_DIG < p) || (FLT_MAX_10_EXP < r) || (-FLT_MIN_10_EXP < r) ) *newtype = &ompi_mpi_double.dt;
else *newtype = &ompi_mpi_float.dt;
else if( ! OMPI_HAVE_FORTRAN_REAL2 ||
(sflt_dig < p) || (sflt_max_10_exp < r) || (-sflt_min_10_exp < r) ) *newtype = &ompi_mpi_float.dt;
else *newtype = &ompi_mpi_real2.dt;
if( *newtype != &ompi_mpi_datatype_null.dt ) {
ompi_datatype_t* datatype;

Просмотреть файл

@ -32,13 +32,16 @@ my $ierror_arg;
my $maxrank_arg;
my $generate_arg;
my $mpi_arg;
my $mpi_real2;
my $mpi_real16;
my $mpi_complex4;
my $mpi_complex32;
my $pmpi_arg;
my $help_arg = 0;
&Getopt::Long::Configure("bundling");
my $ok = Getopt::Long::GetOptions("complex32=i" => \$mpi_complex32,
"complex4=i" => \$mpi_complex4,
"header=s" => \$header_arg,
"impl=s" => \$impl_arg,
"ierror=s" => \$ierror_arg,
@ -47,6 +50,7 @@ my $ok = Getopt::Long::GetOptions("complex32=i" => \$mpi_complex32,
"mpi" => \$mpi_arg,
"pmpi" => \$pmpi_arg,
"real16=i" => \$mpi_real16,
"real2=i" => \$mpi_real2,
"help|h" => \$help_arg);
die "Must specify header and/or impl filenames to output"
@ -60,8 +64,9 @@ die "max array rank must be >= 4 and <=15"
die "Must specify --pmpi and/or --mpi if --impl is specified"
if (defined($generate_arg) && $generate_arg &&
(defined($impl_arg) && !defined($mpi_arg) && !defined($pmpi_arg)));
die "Must specify real16 and complex32"
if (!defined($mpi_real16) || !defined($mpi_complex32));
die "Must specify real2, real16, complex4, and complex32"
if (!defined($mpi_real2) || !defined($mpi_real16) ||
!defined($mpi_complex4) || !defined($mpi_complex32));
#############################################################################
@ -148,11 +153,13 @@ sub generate {
for my $size (qw/8 16 32 64/) {
queue_sub("integer(int${size})", "int${size}", "int${size}");
}
for my $size (qw/32 64 128/) {
if ($size != 128 || $mpi_real16 == 1) {
for my $size (qw/16 32 64 128/) {
if (!($size == 16 && $mpi_real2 == 0) &&
!($size == 128 &&$mpi_real16 == 0)) {
queue_sub("real(real${size})", "real${size}", "real${size}");
}
if ($size != 128 || $mpi_complex32 == 1) {
if (!($size == 16 && $mpi_complex4 == 0) &&
!($size == 128 && $mpi_complex32 == 0)) {
queue_sub("complex(real${size})", "complex${size}", "real${size}");
}
}

Просмотреть файл

@ -13,24 +13,28 @@ ompi_f08_mpi_bxor
ompi_f08_mpi_byte
ompi_f08_mpi_c_bool
ompi_f08_mpi_c_complex
ompi_f08_mpi_count
ompi_f08_mpi_c_double_complex
ompi_f08_mpi_c_float16
ompi_f08_mpi_c_float_complex
ompi_f08_mpi_c_long_double_complex
ompi_f08_mpi_c_short_float_complex
ompi_f08_mpi_char
ompi_f08_mpi_character
ompi_f08_mpi_c_long_double_complex
ompi_f08_mpi_comm_null
ompi_f08_mpi_comm_self
ompi_f08_mpi_comm_world
ompi_f08_mpi_complex
ompi_f08_mpi_complex16
ompi_f08_mpi_complex32
ompi_f08_mpi_complex4
ompi_f08_mpi_complex8
ompi_f08_mpi_count
ompi_f08_mpi_cxx_bool
ompi_f08_mpi_cxx_complex
ompi_f08_mpi_cxx_double_complex
ompi_f08_mpi_cxx_float_complex
ompi_f08_mpi_cxx_long_double_complex
ompi_f08_mpi_cxx_short_float_complex
ompi_f08_mpi_datatype_null
ompi_f08_mpi_double
ompi_f08_mpi_double_complex
@ -91,6 +95,7 @@ ompi_f08_mpi_real8
ompi_f08_mpi_replace
ompi_f08_mpi_request_null
ompi_f08_mpi_short
ompi_f08_mpi_short_float
ompi_f08_mpi_short_int
ompi_f08_mpi_signed_char
ompi_f08_mpi_sum

Просмотреть файл

@ -17,6 +17,7 @@
# Copyright (c) 2015-2017 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -120,7 +121,9 @@ sizeof_f.f90:
--impl=$@ --ierror=mandatory --mpi \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
if BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER

Просмотреть файл

@ -17,6 +17,7 @@
# reserved.
# Copyright (c) 2015-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -442,7 +443,9 @@ psizeof_f.f90:
--impl=$@ --ierror=mandatory --pmpi \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
#

Просмотреть файл

@ -10,7 +10,7 @@
# Copyright (c) 2015-2018 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
# Copyright (c) 2017-2018 FUJITSU LIMITED. All rights reserved.
#
# $COPYRIGHT$
#
@ -59,7 +59,9 @@ sizeof_f08.h:
--header=$@ --ierror=optional \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
sizeof_f08.f90: $(top_builddir)/config.status
@ -69,7 +71,9 @@ sizeof_f08.f90:
--impl=$@ --ierror=optional --mpi \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
profile/psizeof_f08.f90: $(top_builddir)/config.status
@ -79,7 +83,9 @@ profile/psizeof_f08.f90:
--impl=$@ --ierror=optional --pmpi \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
CLEANFILES += sizeof_f08.h sizeof_f08.f90 profile/psizeof_f08.f90

Просмотреть файл

@ -67,7 +67,7 @@ OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_win_
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_file_null = {OMPI_MPI_FILE_NULL};
/*
* common block items from ompi/include/mpif-common.h
* common block items from ompi/include/mpif-handles.h
*/
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_aint = {OMPI_MPI_AINT};
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_byte = {OMPI_MPI_BYTE};
@ -144,3 +144,20 @@ OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_c_bo
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_cxx_bool = {OMPI_MPI_CXX_BOOL};
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_count = {OMPI_MPI_COUNT};
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_offset = {OMPI_MPI_OFFSET};
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_complex4 = {OMPI_MPI_COMPLEX4};
/*
* Handles not defined in ompi/include/mpif-handles.h but defined
* in 'shortfloat' MPI extensions (ompi/mpiext/shortfloat)
*
* OMPI_MPI_* macros are not defined in ompi/include/mpif-values.pl
* because they should not be included in mpif.h. So immediate values
* defined in ompi/datatype/ompi_datatype_module.c are used here.
* ompi_f08_mpi_c_float16 is a synonym for ompi_f08_mpi_short_float.
*/
#if defined(HAVE_SHORT_FLOAT) || defined(HAVE_OPAL_SHORT_FLOAT_T)
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_short_float = {74};
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_c_short_float_complex = {75};
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_cxx_short_float_complex = {76};
OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_c_float16 = {74};
#endif

Просмотреть файл

@ -202,6 +202,7 @@ module mpi_f08_types
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_cxx_bool") OMPI_PROTECTED :: MPI_CXX_BOOL
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_count") OMPI_PROTECTED :: MPI_COUNT
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_offset") OMPI_PROTECTED :: MPI_OFFSET
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_complex4") OMPI_PROTECTED :: MPI_COMPLEX4
!... Special sentinel constants
!------------------------------

Просмотреть файл

@ -5,6 +5,7 @@
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
#
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -76,7 +77,9 @@ mpi-ignore-tkr-sizeof.h:
--header=$@ --ierror=mandatory \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
mpi-ignore-tkr-sizeof.f90: $(top_builddir)/config.status
@ -86,7 +89,9 @@ mpi-ignore-tkr-sizeof.f90:
--impl=$@ --ierror=mandatory --mpi --pmpi \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
#

Просмотреть файл

@ -16,6 +16,7 @@
# Copyright (c) 2014-2016 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# Copyright (c) 2016 IBM Corporation. All rights reserved.
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -120,7 +121,9 @@ mpi-tkr-sizeof.h:
--header=$@ --ierror=mandatory \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
mpi-tkr-sizeof.f90: $(top_builddir)/config.status
@ -130,7 +133,9 @@ mpi-tkr-sizeof.f90:
--impl=$@ --ierror=mandatory --mpi --pmpi \
--maxrank=$(OMPI_FORTRAN_MAX_ARRAY_RANK) \
--generate=$(OMPI_FORTRAN_BUILD_SIZEOF) \
--real2=$(OMPI_HAVE_FORTRAN_REAL2) \
--real16=$(OMPI_HAVE_FORTRAN_REAL16) \
--complex4=$(OMPI_HAVE_FORTRAN_COMPLEX4) \
--complex32=$(OMPI_HAVE_FORTRAN_COMPLEX32)
#

Просмотреть файл

@ -10,6 +10,7 @@
! Copyright (c) 2004-2005 The Regents of the University of California.
! All rights reserved.
! Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
! Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
@ -33,6 +34,7 @@ integer :: OMPI_SIZEOF_F90_REAL4
integer :: OMPI_SIZEOF_F90_REAL8
integer :: OMPI_SIZEOF_F90_REAL16
integer :: OMPI_SIZEOF_F90_COMPLEX4
integer :: OMPI_SIZEOF_F90_COMPLEX8
integer :: OMPI_SIZEOF_F90_COMPLEX16
integer :: OMPI_SIZEOF_F90_COMPLEX32
@ -51,6 +53,7 @@ parameter(OMPI_SIZEOF_F90_REAL4 = @OMPI_SIZEOF_FORTRAN_REAL4@)
parameter(OMPI_SIZEOF_F90_REAL8 = @OMPI_SIZEOF_FORTRAN_REAL8@)
parameter(OMPI_SIZEOF_F90_REAL16 = @OMPI_SIZEOF_FORTRAN_REAL16@)
parameter(OMPI_SIZEOF_F90_COMPLEX4 = @OMPI_SIZEOF_FORTRAN_COMPLEX4@)
parameter(OMPI_SIZEOF_F90_COMPLEX8 = @OMPI_SIZEOF_FORTRAN_COMPLEX8@)
parameter(OMPI_SIZEOF_F90_COMPLEX16 = @OMPI_SIZEOF_FORTRAN_COMPLEX16@)
parameter(OMPI_SIZEOF_F90_COMPLEX32 = @OMPI_SIZEOF_FORTRAN_COMPLEX32@)

10
ompi/mpiext/shortfloat/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,10 @@
#
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
SUBDIRS = c mpif-h use-mpi use-mpi-f08

25
ompi/mpiext/shortfloat/README.txt Обычный файл
Просмотреть файл

@ -0,0 +1,25 @@
Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
$COPYRIGHT$
This extension provides additional MPI datatypes MPIX_SHORT_FLOAT,
MPIX_C_SHORT_FLOAT_COMPLEX, and MPIX_CXX_SHORT_FLOAT_COMPLEX, which
are proposed with the MPI_ prefix in June 2017 for proposal in the
MPI 4.0 standard. As of February 2019, it is not accepted yet.
https://github.com/mpi-forum/mpi-issues/issues/65
Each MPI datatype corresponds to the C/C++ type 'short float', the C type
'short float _Complex', and the C++ type 'std::complex<short float>',
respectively.
In addition, this extension provides a datatype MPIX_C_FLOAT16 for
the C type _Float16, which is defined in ISO/IEC JTC 1/SC 22/WG 14
N1945 (ISO/IEC TS 18661-3:2015). This name and meaning are same as
that of MPICH.
https://github.com/pmodels/mpich/pull/3455
This extension is enabled only if the C compiler supports 'short float'
or '_Float16', or the '--enable-alt-short-float=TYPE' option is passed
to the configure script.

22
ompi/mpiext/shortfloat/c/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,22 @@
#
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Convenience libtool library that will be slurped up into libmpi.la.
noinst_LTLIBRARIES = libmpiext_shortfloat_c.la
# This is where the top-level header file (that is included in
# <mpi-ext.h>) must be installed.
ompidir = $(ompiincludedir)/mpiext
# This is the header file that is installed.
ompi_HEADERS = mpiext_shortfloat_c.h
# Sources for the convenience libtool library.
libmpiext_shortfloat_c_la_SOURCES = $(ompi_HEADERS)
libmpiext_shortfloat_c_la_LDFLAGS = -module -avoid-version

Просмотреть файл

@ -0,0 +1,21 @@
/*
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_short_float;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_c_short_float_complex;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t ompi_mpi_cxx_sfltcplex;
#define MPIX_SHORT_FLOAT OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_short_float)
#define MPIX_C_SHORT_FLOAT_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_c_short_float_complex)
#define MPIX_CXX_SHORT_FLOAT_COMPLEX OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_cxx_sfltcplex)
#if @OMPI_MPIX_SHORT_FLOAT_IS_C_FLOAT16@
#define MPIX_C_FLOAT16 OMPI_PREDEFINED_GLOBAL(MPI_Datatype, ompi_mpi_short_float)
#endif

43
ompi/mpiext/shortfloat/configure.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,43 @@
# -*- shell-script -*-
#
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# OMPI_MPIEXT_shortfloat_CONFIG([action-if-found], [action-if-not-found])
# -----------------------------------------------------------
AC_DEFUN([OMPI_MPIEXT_shortfloat_CONFIG],[
AC_CONFIG_FILES([
ompi/mpiext/shortfloat/Makefile
ompi/mpiext/shortfloat/c/Makefile
ompi/mpiext/shortfloat/mpif-h/Makefile
ompi/mpiext/shortfloat/use-mpi/Makefile
ompi/mpiext/shortfloat/use-mpi-f08/Makefile
ompi/mpiext/shortfloat/c/mpiext_shortfloat_c.h
ompi/mpiext/shortfloat/mpif-h/mpiext_shortfloat_mpifh.h
ompi/mpiext/shortfloat/use-mpi-f08/mpiext_shortfloat_usempif08.h
])
AS_IF([{ test "$ENABLE_shortfloat" = "1" || \
test "$ENABLE_EXT_ALL" = "1"; } && \
{ test "$ac_cv_type_short_float" = "yes" || \
test "$ac_cv_type_opal_short_float_t" = "yes"; }],
[$1],
[$2])
AS_IF([test "$opal_short_float_type" = "_Float16"],
[AC_SUBST([OMPI_MPIX_SHORT_FLOAT_IS_C_FLOAT16], 1)
AC_SUBST([OMPI_MPIX_C_FLOAT16_FORTRAN_COMMENT_OUT], [])],
[AC_SUBST([OMPI_MPIX_SHORT_FLOAT_IS_C_FLOAT16], 0),
AC_SUBST([OMPI_MPIX_C_FLOAT16_FORTRAN_COMMENT_OUT], [!])])
])
# The mpi_f08_ext module should not include mpiext_shortfloat_mpifh.h
# because types of a datatype are different between the mpi_ext module
# and the mpi_f08_ext module. The former is integer and the latter is
# type(mpi_datatype).
AC_DEFUN([OMPI_MPIEXT_shortfloat_INCLUDE_MPIFH_IN_USEMPIF08], [0])

36
ompi/mpiext/shortfloat/mpif-h/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,36 @@
#
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Convenience libtool library that will be slurped up into libmpi_mpifh.la.
noinst_LTLIBRARIES =
# Directory where the header file to be included in mpif-ext.h must be
# installed.
ompidir = $(ompiincludedir)/mpiext
# If we are, build the convenience libtool library that will be
# slurped up into libmpi_mpifh.la.
noinst_LTLIBRARIES += libmpiext_shortfloat_mpifh.la
# Just like noinst_LTLIBRARIES, set this macro to empty and
# conditionally add to it later.
ompi_HEADERS =
# Use the Automake conditional to know if we're building the mpif.h
# bindings.
if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS
# This is the header file that is installed.
ompi_HEADERS += mpiext_shortfloat_mpifh.h
# Sources for the convenience libtool library.
libmpiext_shortfloat_mpifh_la_SOURCES = $(ompi_HEADERS)
libmpiext_shortfloat_mpifh_la_LDFLAGS = -module -avoid-version
endif

Просмотреть файл

@ -0,0 +1,19 @@
! -*- fortran -*-
!
! Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
!
! $HEADER$
!
integer MPIX_SHORT_FLOAT
integer MPIX_C_SHORT_FLOAT_COMPLEX
integer MPIX_CXX_SHORT_FLOAT_COMPLEX
@OMPI_MPIX_C_FLOAT16_FORTRAN_COMMENT_OUT@ integer MPIX_C_FLOAT16
parameter (MPIX_SHORT_FLOAT=74)
parameter (MPIX_C_SHORT_FLOAT_COMPLEX=75)
parameter (MPIX_CXX_SHORT_FLOAT_COMPLEX=76)
@OMPI_MPIX_C_FLOAT16_FORTRAN_COMMENT_OUT@ parameter (MPIX_C_FLOAT16=74)

Просмотреть файл

@ -0,0 +1,42 @@
#
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# This file builds the use_mpi_f08-based bindings for MPI extensions. It
# is optional in MPI extensions.
# We must set these #defines and include paths so that the inner OMPI
# MPI prototype header files do the Right Thing.
AM_FCFLAGS = $(OMPI_FC_MODULE_FLAG)$(top_builddir)/ompi/mpi/fortran/use-mpi-f08/mod \
-I$(top_srcdir) $(FCFLAGS_f90)
# Note that the mpi_f08-based bindings are optional -- they can only
# be built if OMPI is also building the Fortran-based bindings. So we
# initially set some Makefile macros to empty, and then conditionally
# add to them later.
noinst_LTLIBRARIES =
# Use the Automake conditional to know if we're building the "use mpi_f08"
# bindings.
if OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS
# If we are, build the convenience libtool library that will be
# slurped up into libmpi_usempif08.la.
noinst_LTLIBRARIES += libmpiext_shortfloat_usempif08.la
# Note that no header files are installed; instead,
# mpiext_shortfloat_usempif08.h is automatically slurped up into the
# mpi_f08_ext module. It must be listed so that it is included in
# dist tarballs.
noinst_HEADERS = mpiext_shortfloat_usempif08.h
# Sources for the convenience libtool library.
libmpiext_shortfloat_usempif08_la_SOURCES = $(ompi_HEADERS)
libmpiext_shortfloat_usempif08_la_LDFLAGS = -module -avoid-version
endif

Просмотреть файл

@ -0,0 +1,20 @@
! -*- fortran -*-
!
! Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
!
! $HEADER$
!
! This whole file will be included in the mpi_f08_ext module interface
! section.
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_short_float") OMPI_PROTECTED :: MPIX_SHORT_FLOAT
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_c_short_float_complex") OMPI_PROTECTED :: MPIX_C_SHORT_FLOAT_COMPLEX
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_cxx_short_float_complex") OMPI_PROTECTED :: MPIX_CXX_SHORT_FLOAT_COMPLEX
#if @OMPI_MPIX_SHORT_FLOAT_IS_C_FLOAT16@
type(MPI_Datatype), bind(C, name="ompi_f08_mpi_c_float16") OMPI_PROTECTED :: MPIX_C_FLOAT16
#endif

15
ompi/mpiext/shortfloat/use-mpi/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,15 @@
#
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# There's nothing to build or install for the "use mpi" bindings for
# this MPI extension. However, we must list the header file that will
# be slurped up to be part of the mpi_ext Fortran module so that it is
# included in dist tarballs.
noinst_HEADERS = mpiext_shortfloat_usempi.h

Просмотреть файл

@ -0,0 +1,12 @@
! -*- fortran -*-
!
! Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
! $COPYRIGHT$
!
! Additional copyrights may follow
!
! $HEADER$
!
! This file is needed to put variables defined in mpiext_shortfloat_mpifh.h
! into the mpi_ext module file.

Просмотреть файл

@ -16,6 +16,7 @@
* reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -144,6 +145,10 @@ int ompi_op_init(void)
ompi_op_ddt_map[OMPI_DATATYPE_MPI_DOUBLE] = OMPI_OP_BASE_TYPE_DOUBLE;
ompi_op_ddt_map[OMPI_DATATYPE_MPI_LONG_DOUBLE] = OMPI_OP_BASE_TYPE_LONG_DOUBLE;
#if OMPI_HAVE_FORTRAN_COMPLEX4
ompi_op_ddt_map[OMPI_DATATYPE_MPI_COMPLEX4] = FORTRAN_COMPLEX_OP_TYPE(OMPI_KIND_FORTRAN_COMPLEX4);
#endif
#if OMPI_HAVE_FORTRAN_COMPLEX8
ompi_op_ddt_map[OMPI_DATATYPE_MPI_COMPLEX8] = FORTRAN_COMPLEX_OP_TYPE(OMPI_KIND_FORTRAN_COMPLEX8);
#endif
@ -217,6 +222,12 @@ int ompi_op_init(void)
#warning Unsupported definition for MPI_COUNT
#endif
/* Datatypes proposed to the MPI Forum in June 2017 for proposal in
* the MPI 4.0 standard. As of February 2019, it is not accepted yet.
* See https://github.com/mpi-forum/mpi-issues/issues/65 */
ompi_op_ddt_map[OMPI_DATATYPE_MPI_SHORT_FLOAT] = OMPI_OP_BASE_TYPE_SHORT_FLOAT;
ompi_op_ddt_map[OMPI_DATATYPE_MPI_C_SHORT_FLOAT_COMPLEX] = OMPI_OP_BASE_TYPE_C_SHORT_FLOAT_COMPLEX;
/* Create the intrinsic ops */
if (OMPI_SUCCESS !=

Просмотреть файл

@ -15,6 +15,7 @@
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright (c) 2009 University of Houston. All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -106,11 +107,13 @@ OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_integer4_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_integer8_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_integer16_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_real_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_real2_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_real4_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_real8_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_real16_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_dblprec_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_cplex_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_complex4_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_complex8_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_complex16_addr;
OMPI_DECLSPEC extern struct ompi_predefined_datatype_t *ompi_mpi_complex32_addr;

Просмотреть файл

@ -23,6 +23,7 @@
* Copyright (c) 2016-2018 Mellanox Technologies Ltd. All rights reserved.
*
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -158,11 +159,13 @@ ompi_predefined_datatype_t *ompi_mpi_integer4_addr = &ompi_mpi_integer4;
ompi_predefined_datatype_t *ompi_mpi_integer8_addr = &ompi_mpi_integer8;
ompi_predefined_datatype_t *ompi_mpi_integer16_addr = &ompi_mpi_integer16;
ompi_predefined_datatype_t *ompi_mpi_real_addr = &ompi_mpi_real;
ompi_predefined_datatype_t *ompi_mpi_real2_addr = &ompi_mpi_real2;
ompi_predefined_datatype_t *ompi_mpi_real4_addr = &ompi_mpi_real4;
ompi_predefined_datatype_t *ompi_mpi_real8_addr = &ompi_mpi_real8;
ompi_predefined_datatype_t *ompi_mpi_real16_addr = &ompi_mpi_real16;
ompi_predefined_datatype_t *ompi_mpi_dblprec_addr = &ompi_mpi_dblprec;
ompi_predefined_datatype_t *ompi_mpi_cplex_addr = &ompi_mpi_cplex;
ompi_predefined_datatype_t *ompi_mpi_complex4_addr = &ompi_mpi_complex4;
ompi_predefined_datatype_t *ompi_mpi_complex8_addr = &ompi_mpi_complex8;
ompi_predefined_datatype_t *ompi_mpi_complex16_addr = &ompi_mpi_complex16;
ompi_predefined_datatype_t *ompi_mpi_complex32_addr = &ompi_mpi_complex32;

Просмотреть файл

@ -15,6 +15,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Intel, Inc. All rights reserved
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -372,8 +373,14 @@ void ompi_info_do_config(bool want_all)
opal_info_out_int("C short size", "compiler:c:sizeof:short", sizeof(short));
opal_info_out_int("C int size", "compiler:c:sizeof:int", sizeof(int));
opal_info_out_int("C long size", "compiler:c:sizeof:long", sizeof(long));
#if defined(HAVE_SHORT_FLOAT)
opal_info_out_int("C short float size", "compiler:c:sizeof:short_float", sizeof(short float));
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
opal_info_out_int("C short float size", "compiler:c:sizeof:short_float", sizeof(opal_short_float_t));
#endif
opal_info_out_int("C float size", "compiler:c:sizeof:float", sizeof(float));
opal_info_out_int("C double size", "compiler:c:sizeof:double", sizeof(double));
opal_info_out_int("C long double size", "compiler:c:sizeof:long_double", sizeof(long double));
opal_info_out_int("C pointer size", "compiler:c:sizeof:pointer", sizeof(void *));
opal_info_out_int("C char align", "compiler:c:align:char", OPAL_ALIGNMENT_CHAR);
#if OMPI_BUILD_CXX_BINDINGS
@ -385,8 +392,14 @@ void ompi_info_do_config(bool want_all)
opal_info_out("C bool align", "compiler:c:align:bool", "skipped");
#endif
opal_info_out_int("C int align", "compiler:c:align:int", OPAL_ALIGNMENT_INT);
#if defined(HAVE_SHORT_FLOAT)
opal_info_out_int("C short float align", "compiler:c:align:short_float", OPAL_ALIGNMENT_SHORT_FLOAT);
#elif defined(HAVE_OPAL_SHORT_FLOAT_T)
opal_info_out_int("C short float align", "compiler:c:align:short_float", OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T);
#endif
opal_info_out_int("C float align", "compiler:c:align:float", OPAL_ALIGNMENT_FLOAT);
opal_info_out_int("C double align", "compiler:c:align:double", OPAL_ALIGNMENT_DOUBLE);
opal_info_out_int("C long double align", "compiler:c:align:long_double", OPAL_ALIGNMENT_LONG_DOUBLE);
}
opal_info_out("C++ compiler", "compiler:cxx:command", OMPI_CXX);
@ -482,6 +495,8 @@ void ompi_info_do_config(bool want_all)
opal_info_out("Fort have integer16", "compiler:fortran:have:integer16",
OMPI_HAVE_FORTRAN_INTEGER16 ? "yes" : "no");
opal_info_out("Fort have real2", "compiler:fortran:have:real2",
OMPI_HAVE_FORTRAN_REAL2 ? "yes" : "no");
opal_info_out("Fort have real4", "compiler:fortran:have:real4",
OMPI_HAVE_FORTRAN_REAL4 ? "yes" : "no");
opal_info_out("Fort have real8", "compiler:fortran:have:real8",
@ -489,6 +504,8 @@ void ompi_info_do_config(bool want_all)
opal_info_out("Fort have real16", "compiler:fortran:have:real16",
OMPI_HAVE_FORTRAN_REAL16 && OMPI_REAL16_MATCHES_C ? "yes" : "no");
opal_info_out("Fort have complex4", "compiler:fortran:have:complex4",
OMPI_HAVE_FORTRAN_COMPLEX4 ? "yes" : "no");
opal_info_out("Fort have complex8", "compiler:fortran:have:complex8",
OMPI_HAVE_FORTRAN_COMPLEX8 ? "yes" : "no");
opal_info_out("Fort have complex16", "compiler:fortran:have:complex16",
@ -509,6 +526,8 @@ void ompi_info_do_config(bool want_all)
opal_info_out_int("Fort real size", "compiler:fortran:sizeof:real",
OMPI_SIZEOF_FORTRAN_REAL);
opal_info_out_int("Fort real2 size", "compiler:fortran:sizeof:real2",
OMPI_HAVE_FORTRAN_REAL2 ? OMPI_SIZEOF_FORTRAN_REAL2 : -1);
opal_info_out_int("Fort real4 size", "compiler:fortran:sizeof:real4",
OMPI_HAVE_FORTRAN_REAL4 ? OMPI_SIZEOF_FORTRAN_REAL4 : -1);
opal_info_out_int("Fort real8 size", "compiler:fortran:sizeof:real8",
@ -525,6 +544,8 @@ void ompi_info_do_config(bool want_all)
opal_info_out_int("Fort dbl cplx size",
"compiler:fortran:sizeof:double_complex",
OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_SIZEOF_FORTRAN_DOUBLE_COMPLEX : -1);
opal_info_out_int("Fort cplx4 size", "compiler:fortran:sizeof:complex4",
OMPI_HAVE_FORTRAN_COMPLEX4 ? OMPI_SIZEOF_FORTRAN_COMPLEX4 : -1);
opal_info_out_int("Fort cplx8 size", "compiler:fortran:sizeof:complex8",
OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_SIZEOF_FORTRAN_COMPLEX8 : -1);
opal_info_out_int("Fort cplx16 size", "compiler:fortran:sizeof:complex16",
@ -547,6 +568,8 @@ void ompi_info_do_config(bool want_all)
opal_info_out_int("Fort real align", "compiler:fortran:align:real",
OMPI_ALIGNMENT_FORTRAN_REAL);
opal_info_out_int("Fort real2 align", "compiler:fortran:align:real2",
OMPI_HAVE_FORTRAN_REAL2 ? OMPI_ALIGNMENT_FORTRAN_REAL2 : -1);
opal_info_out_int("Fort real4 align", "compiler:fortran:align:real4",
OMPI_HAVE_FORTRAN_REAL4 ? OMPI_ALIGNMENT_FORTRAN_REAL4 : -1);
opal_info_out_int("Fort real8 align", "compiler:fortran:align:real8",
@ -563,6 +586,8 @@ void ompi_info_do_config(bool want_all)
opal_info_out_int("Fort dbl cplx align",
"compiler:fortran:align:double_complex",
OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX ? OMPI_ALIGNMENT_FORTRAN_DOUBLE_COMPLEX : -1);
opal_info_out_int("Fort cplx4 align", "compiler:fortran:align:complex4",
OMPI_HAVE_FORTRAN_COMPLEX4 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX4 : -1);
opal_info_out_int("Fort cplx8 align", "compiler:fortran:align:complex8",
OMPI_HAVE_FORTRAN_COMPLEX8 ? OMPI_ALIGNMENT_FORTRAN_COMPLEX8 : -1);
opal_info_out_int("Fort cplx16 align", "compiler:fortran:align:complex16",

Просмотреть файл

@ -7,6 +7,7 @@
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -149,59 +150,88 @@ COPY_CONTIGUOUS_BYTES( bytes, 8 )
COPY_CONTIGUOUS_BYTES( bytes, 16 )
#endif
#if SIZEOF_FLOAT == 2
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 2
COPY_TYPE( float_2, short float, 1 )
#elif SIZEOF_FLOAT == 2
COPY_TYPE( float_2, float, 1 )
#elif SIZEOF_DOUBLE == 2
COPY_TYPE( float_2, double, 1 )
#elif SIZEOF_LONG_DOUBLE == 2
COPY_TYPE( float_2, long double, 1 )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 2
COPY_TYPE( float_2, opal_short_float_t, 1 )
#else
/* #error No basic type for copy function for opal_datatype_float2 found */
#define copy_float_2 NULL
#endif
#if SIZEOF_FLOAT == 4
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 4
COPY_TYPE( float_4, short float, 1 )
#elif SIZEOF_FLOAT == 4
COPY_TYPE( float_4, float, 1 )
#elif SIZEOF_DOUBLE == 4
COPY_TYPE( float_4, double, 1 )
#elif SIZEOF_LONG_DOUBLE == 4
COPY_TYPE( float_4, long double, 1 )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 4
COPY_TYPE( float_4, opal_short_float_t, 1 )
#else
#error No basic type for copy function for opal_datatype_float4 found
#endif
#if SIZEOF_FLOAT == 8
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 8
COPY_TYPE( float_8, short float, 1 )
#elif SIZEOF_FLOAT == 8
COPY_TYPE( float_8, float, 1 )
#elif SIZEOF_DOUBLE == 8
COPY_TYPE( float_8, double, 1 )
#elif SIZEOF_LONG_DOUBLE == 8
COPY_TYPE( float_8, long double, 1 )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 8
COPY_TYPE( float_8, opal_short_float_t, 1 )
#else
#error No basic type for copy function for opal_datatype_float8 found
#endif
#if SIZEOF_FLOAT == 12
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 12
COPY_TYPE( float_12, short float, 1 )
#elif SIZEOF_FLOAT == 12
COPY_TYPE( float_12, float, 1 )
#elif SIZEOF_DOUBLE == 12
COPY_TYPE( float_12, double, 1 )
#elif SIZEOF_LONG_DOUBLE == 12
COPY_TYPE( float_12, long double, 1 )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 12
COPY_TYPE( float_12, opal_short_float_t, 1 )
#else
/* #error No basic type for copy function for opal_datatype_float12 found */
#define copy_float_12 NULL
#endif
#if SIZEOF_FLOAT == 16
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 16
COPY_TYPE( float_16, short float, 1 )
#elif SIZEOF_FLOAT == 16
COPY_TYPE( float_16, float, 1 )
#elif SIZEOF_DOUBLE == 16
COPY_TYPE( float_16, double, 1 )
#elif SIZEOF_LONG_DOUBLE == 16
COPY_TYPE( float_16, long double, 1 )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 16
COPY_TYPE( float_16, opal_short_float_t, 1 )
#else
/* #error No basic type for copy function for opal_datatype_float16 found */
#define copy_float_16 NULL
#endif
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
COPY_TYPE ( short_float_complex, short float _Complex, 1)
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
COPY_TYPE ( short_float_complex, opal_short_float_complex_t, 1)
#else
/* #error No basic type for copy function for opal_datatype_short_float_complex found */
#define copy_short_float_complex NULL
#endif
COPY_TYPE ( float_complex, float _Complex, 1)
COPY_TYPE ( double_complex, double _Complex, 1)
@ -245,6 +275,7 @@ conversion_fct_t opal_datatype_copy_functions[OPAL_DATATYPE_MAX_PREDEFINED] = {
(conversion_fct_t)copy_float_8, /* OPAL_DATATYPE_FLOAT8 */
(conversion_fct_t)copy_float_12, /* OPAL_DATATYPE_FLOAT12 */
(conversion_fct_t)copy_float_16, /* OPAL_DATATYPE_FLOAT16 */
(conversion_fct_t)copy_short_float_complex, /* OPAL_DATATYPE_SHORT_FLOAT_COMPLEX */
(conversion_fct_t)copy_float_complex, /* OPAL_DATATYPE_FLOAT_COMPLEX */
(conversion_fct_t)copy_double_complex, /* OPAL_DATATYPE_DOUBLE_COMPLEX */
(conversion_fct_t)copy_long_double_complex, /* OPAL_DATATYPE_LONG_DOUBLE_COMPLEX */

Просмотреть файл

@ -6,6 +6,7 @@
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
* Copyright (c) 2015-2018 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -366,61 +367,90 @@ COPY_TYPE_HETEROGENEOUS(int16, int128_t)
#endif
#if SIZEOF_FLOAT == 2
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 2
COPY_TYPE_HETEROGENEOUS( float2, short float )
#elif SIZEOF_FLOAT == 2
COPY_TYPE_HETEROGENEOUS( float2, float )
#elif SIZEOF_DOUBLE == 2
COPY_TYPE_HETEROGENEOUS( float2, double )
#elif SIZEOF_LONG_DOUBLE == 2
COPY_TYPE_HETEROGENEOUS( float2, long double )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 2
COPY_TYPE_HETEROGENEOUS( float2, opal_short_float_t )
#else
/* #error No basic type for copy function for opal_datatype_float2 found */
#define copy_float2_heterogeneous NULL
#endif
#if SIZEOF_FLOAT == 4
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 4
COPY_TYPE_HETEROGENEOUS( float4, short float )
#elif SIZEOF_FLOAT == 4
COPY_TYPE_HETEROGENEOUS( float4, float )
#elif SIZEOF_DOUBLE == 4
COPY_TYPE_HETEROGENEOUS( float4, double )
#elif SIZEOF_LONG_DOUBLE == 4
COPY_TYPE_HETEROGENEOUS( float4, long double )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 4
COPY_TYPE_HETEROGENEOUS( float4, opal_short_float_t )
#else
/* #error No basic type for copy function for opal_datatype_float4 found */
#define copy_float4_heterogeneous NULL
#endif
#if SIZEOF_FLOAT == 8
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 8
COPY_TYPE_HETEROGENEOUS( float8, short float )
#elif SIZEOF_FLOAT == 8
COPY_TYPE_HETEROGENEOUS( float8, float )
#elif SIZEOF_DOUBLE == 8
COPY_TYPE_HETEROGENEOUS( float8, double )
#elif SIZEOF_LONG_DOUBLE == 8
COPY_TYPE_HETEROGENEOUS( float8, long double )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 8
COPY_TYPE_HETEROGENEOUS( float8, opal_short_float_t )
#else
/* #error No basic type for copy function for opal_datatype_float8 found */
#define copy_float8_heterogeneous NULL
#endif
#if SIZEOF_FLOAT == 12
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 12
COPY_TYPE_HETEROGENEOUS( float12, short float )
#elif SIZEOF_FLOAT == 12
COPY_TYPE_HETEROGENEOUS( float12, float )
#elif SIZEOF_DOUBLE == 12
COPY_TYPE_HETEROGENEOUS( float12, double )
#elif SIZEOF_LONG_DOUBLE == 12
COPY_TYPE_HETEROGENEOUS( float12, long double )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 12
COPY_TYPE_HETEROGENEOUS( float12, opal_short_float_t )
#else
/* #error No basic type for copy function for opal_datatype_float12 found */
#define copy_float12_heterogeneous NULL
#endif
#if SIZEOF_FLOAT == 16
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 16
COPY_TYPE_HETEROGENEOUS( float16, short float )
#elif SIZEOF_FLOAT == 16
COPY_TYPE_HETEROGENEOUS( float16, float )
#elif SIZEOF_DOUBLE == 16
COPY_TYPE_HETEROGENEOUS( float16, double )
#elif SIZEOF_LONG_DOUBLE == 16
COPY_TYPE_HETEROGENEOUS_INTERNAL( float16, long double, 1)
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 16
COPY_TYPE_HETEROGENEOUS( float16, opal_short_float_t )
#else
/* #error No basic type for copy function for opal_datatype_float16 found */
#define copy_float16_heterogeneous NULL
#endif
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
COPY_2SAMETYPE_HETEROGENEOUS( short_float_complex, short float _Complex )
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
COPY_2SAMETYPE_HETEROGENEOUS( short_float_complex, opal_short_float_complex_t )
#else
/* #error No basic type for copy function for opal_datatype_short_float_complex found */
#define copy_short_float_complex_heterogeneous NULL
#endif
COPY_2SAMETYPE_HETEROGENEOUS( float_complex, float )
COPY_2SAMETYPE_HETEROGENEOUS( double_complex, double )
@ -450,6 +480,7 @@ conversion_fct_t opal_datatype_heterogeneous_copy_functions[OPAL_DATATYPE_MAX_PR
[OPAL_DATATYPE_FLOAT8] = (conversion_fct_t) copy_float8_heterogeneous,
[OPAL_DATATYPE_FLOAT12] = (conversion_fct_t) copy_float12_heterogeneous,
[OPAL_DATATYPE_FLOAT16] = (conversion_fct_t) copy_float16_heterogeneous,
[OPAL_DATATYPE_SHORT_FLOAT_COMPLEX] = (conversion_fct_t) copy_short_float_complex_heterogeneous,
[OPAL_DATATYPE_FLOAT_COMPLEX] = (conversion_fct_t) copy_float_complex_heterogeneous,
[OPAL_DATATYPE_DOUBLE_COMPLEX] = (conversion_fct_t) copy_double_complex_heterogeneous,
[OPAL_DATATYPE_LONG_DOUBLE_COMPLEX] = (conversion_fct_t) copy_long_double_complex_heterogeneous,

Просмотреть файл

@ -18,6 +18,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -51,7 +52,7 @@ BEGIN_C_DECLS
* This must match the same definition as in opal_datatype_internal.h
*/
#if !defined(OPAL_DATATYPE_MAX_PREDEFINED)
#define OPAL_DATATYPE_MAX_PREDEFINED 25
#define OPAL_DATATYPE_MAX_PREDEFINED 26
#endif
/*
* No more than this number of _Basic_ datatypes in C/CPP or Fortran
@ -60,7 +61,7 @@ BEGIN_C_DECLS
*
* BEWARE: This constant should reflect whatever the OMPI-layer needs.
*/
#define OPAL_DATATYPE_MAX_SUPPORTED 47
#define OPAL_DATATYPE_MAX_SUPPORTED 50
/* flags for the datatypes. */
@ -170,6 +171,7 @@ OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float4; /* in bytes
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float8; /* in bytes */
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float12; /* in bytes */
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float16; /* in bytes */
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_short_float_complex;
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_float_complex;
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_double_complex;
OPAL_DECLSPEC extern const opal_datatype_t opal_datatype_long_double_complex;

Просмотреть файл

@ -16,6 +16,7 @@
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -120,12 +121,13 @@ static inline void DUMP( char* fmt __opal_attribute_unused_tmp__, ... )
#define OPAL_DATATYPE_FLOAT8 16
#define OPAL_DATATYPE_FLOAT12 17
#define OPAL_DATATYPE_FLOAT16 18
#define OPAL_DATATYPE_FLOAT_COMPLEX 19
#define OPAL_DATATYPE_DOUBLE_COMPLEX 20
#define OPAL_DATATYPE_LONG_DOUBLE_COMPLEX 21
#define OPAL_DATATYPE_BOOL 22
#define OPAL_DATATYPE_WCHAR 23
#define OPAL_DATATYPE_UNAVAILABLE 24
#define OPAL_DATATYPE_SHORT_FLOAT_COMPLEX 19
#define OPAL_DATATYPE_FLOAT_COMPLEX 20
#define OPAL_DATATYPE_DOUBLE_COMPLEX 21
#define OPAL_DATATYPE_LONG_DOUBLE_COMPLEX 22
#define OPAL_DATATYPE_BOOL 23
#define OPAL_DATATYPE_WCHAR 24
#define OPAL_DATATYPE_UNAVAILABLE 25
#ifndef OPAL_DATATYPE_MAX_PREDEFINED
#define OPAL_DATATYPE_MAX_PREDEFINED (OPAL_DATATYPE_UNAVAILABLE+1)
@ -351,56 +353,84 @@ struct opal_datatype_t;
#define OPAL_DATATYPE_INITIALIZER_UINT16(FLAGS) OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( INT16, FLAGS )
#endif
#if SIZEOF_FLOAT == 2
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 2
#define OPAL_DATATYPE_INITIALIZER_FLOAT2(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( short float, OPAL_ALIGNMENT_SHORT_FLOAT, FLOAT2, FLAGS )
#elif SIZEOF_FLOAT == 2
#define OPAL_DATATYPE_INITIALIZER_FLOAT2(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( float, OPAL_ALIGNMENT_FLOAT, FLOAT2, FLAGS )
#elif SIZEOF_DOUBLE == 2
#define OPAL_DATATYPE_INITIALIZER_FLOAT2(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( double, OPAL_ALIGNMENT_DOUBLE, FLOAT2, FLAGS )
#elif SIZEOF_LONG_DOUBLE == 2
#define OPAL_DATATYPE_INITIALIZER_FLOAT2(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( long double, OPAL_ALIGNMENT_LONG_DOUBLE, FLOAT2, FLAGS )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 2
#define OPAL_DATATYPE_INITIALIZER_FLOAT2(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( opal_short_float_t, OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T, FLOAT2, FLAGS )
#else
#define OPAL_DATATYPE_INITIALIZER_FLOAT2(FLAGS) OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( FLOAT2, FLAGS )
#endif
#if SIZEOF_FLOAT == 4
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 4
#define OPAL_DATATYPE_INITIALIZER_FLOAT4(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( short float, OPAL_ALIGNMENT_SHORT_FLOAT, FLOAT4, FLAGS )
#elif SIZEOF_FLOAT == 4
#define OPAL_DATATYPE_INITIALIZER_FLOAT4(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( float, OPAL_ALIGNMENT_FLOAT, FLOAT4, FLAGS )
#elif SIZEOF_DOUBLE == 4
#define OPAL_DATATYPE_INITIALIZER_FLOAT4(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( double, OPAL_ALIGNMENT_DOUBLE, FLOAT4, FLAGS )
#elif SIZEOF_LONG_DOUBLE == 4
#define OPAL_DATATYPE_INITIALIZER_FLOAT4(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( long double, OPAL_ALIGNMENT_LONG_DOUBLE, FLOAT4, FLAGS )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 4
#define OPAL_DATATYPE_INITIALIZER_FLOAT4(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( opal_short_float_t, OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T, FLOAT4, FLAGS )
#else
#define OPAL_DATATYPE_INITIALIZER_FLOAT4(FLAGS) OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( FLOAT4, FLAGS )
#endif
#if SIZEOF_FLOAT == 8
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 8
#define OPAL_DATATYPE_INITIALIZER_FLOAT8(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( short float, OPAL_ALIGNMENT_SHORT_FLOAT, FLOAT8, FLAGS )
#elif SIZEOF_FLOAT == 8
#define OPAL_DATATYPE_INITIALIZER_FLOAT8(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( float, OPAL_ALIGNMENT_FLOAT, FLOAT8, FLAGS )
#elif SIZEOF_DOUBLE == 8
#define OPAL_DATATYPE_INITIALIZER_FLOAT8(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( double, OPAL_ALIGNMENT_DOUBLE, FLOAT8, FLAGS )
#elif SIZEOF_LONG_DOUBLE == 8
#define OPAL_DATATYPE_INITIALIZER_FLOAT8(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( long double, OPAL_ALIGNMENT_LONG_DOUBLE, FLOAT8, FLAGS )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 8
#define OPAL_DATATYPE_INITIALIZER_FLOAT8(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( opal_short_float_t, OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T, FLOAT8, FLAGS )
#else
#define OPAL_DATATYPE_INITIALIZER_FLOAT8(FLAGS) OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( FLOAT8, FLAGS )
#endif
#if SIZEOF_FLOAT == 12
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 12
#define OPAL_DATATYPE_INITIALIZER_FLOAT12(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( short float, OPAL_ALIGNMENT_SHORT_FLOAT, FLOAT12, FLAGS )
#elif SIZEOF_FLOAT == 12
#define OPAL_DATATYPE_INITIALIZER_FLOAT12(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( float, OPAL_ALIGNMENT_FLOAT, FLOAT12, FLAGS )
#elif SIZEOF_DOUBLE == 12
#define OPAL_DATATYPE_INITIALIZER_FLOAT12(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( double, OPAL_ALIGNMENT_DOUBLE, FLOAT12, FLAGS )
#elif SIZEOF_LONG_DOUBLE == 12
#define OPAL_DATATYPE_INITIALIZER_FLOAT12(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( long double, OPAL_ALIGNMENT_LONG_DOUBLE, FLOAT12, FLAGS )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 12
#define OPAL_DATATYPE_INITIALIZER_FLOAT12(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( opal_short_float_t, OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T, FLOAT12, FLAGS )
#else
#define OPAL_DATATYPE_INITIALIZER_FLOAT12(FLAGS) OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( FLOAT12, FLAGS )
#endif
#if SIZEOF_FLOAT == 16
#if defined(HAVE_SHORT_FLOAT) && SIZEOF_SHORT_FLOAT == 16
#define OPAL_DATATYPE_INITIALIZER_FLOAT16(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( short float, OPAL_ALIGNMENT_SHORT_FLOAT, FLOAT16, FLAGS )
#elif SIZEOF_FLOAT == 16
#define OPAL_DATATYPE_INITIALIZER_FLOAT16(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( float, OPAL_ALIGNMENT_FLOAT, FLOAT16, FLAGS )
#elif SIZEOF_DOUBLE == 16
#define OPAL_DATATYPE_INITIALIZER_FLOAT16(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( double, OPAL_ALIGNMENT_DOUBLE, FLOAT16, FLAGS )
#elif SIZEOF_LONG_DOUBLE == 16
#define OPAL_DATATYPE_INITIALIZER_FLOAT16(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( long double, OPAL_ALIGNMENT_LONG_DOUBLE, FLOAT16, FLAGS )
#elif defined(HAVE_OPAL_SHORT_FLOAT_T) && SIZEOF_OPAL_SHORT_FLOAT_T == 16
#define OPAL_DATATYPE_INITIALIZER_FLOAT16(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( opal_short_float_t, OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T, FLOAT16, FLAGS )
#else
#define OPAL_DATATYPE_INITIALIZER_FLOAT16(FLAGS) OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( FLOAT16, FLAGS )
#endif
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
#define OPAL_DATATYPE_INITIALIZER_SHORT_FLOAT_COMPLEX(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( short float _Complex, OPAL_ALIGNMENT_SHORT_FLOAT_COMPLEX, SHORT_FLOAT_COMPLEX, FLAGS )
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
#define OPAL_DATATYPE_INITIALIZER_SHORT_FLOAT_COMPLEX(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( opal_short_float_complex_t, OPAL_ALIGNMENT_OPAL_SHORT_FLOAT_T, SHORT_FLOAT_COMPLEX, FLAGS )
#else
#define OPAL_DATATYPE_INITIALIZER_SHORT_FLOAT_COMPLEX(FLAGS) OPAL_DATATYPE_INITIALIZER_UNAVAILABLE_NAMED( SHORT_FLOAT_COMPLEX, FLAGS)
#endif
#define OPAL_DATATYPE_INITIALIZER_FLOAT_COMPLEX(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( float _Complex, OPAL_ALIGNMENT_FLOAT_COMPLEX, FLOAT_COMPLEX, FLAGS )
#define OPAL_DATATYPE_INITIALIZER_DOUBLE_COMPLEX(FLAGS) OPAL_DATATYPE_INIT_BASIC_DATATYPE( double _Complex, OPAL_ALIGNMENT_DOUBLE_COMPLEX, DOUBLE_COMPLEX, FLAGS )

Просмотреть файл

@ -19,6 +19,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2018 Triad National Security, LLC. All rights
* reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -75,6 +76,7 @@ OPAL_DECLSPEC const opal_datatype_t opal_datatype_float4 = OPAL_DATATYPE_IN
OPAL_DECLSPEC const opal_datatype_t opal_datatype_float8 = OPAL_DATATYPE_INITIALIZER_FLOAT8(0);
OPAL_DECLSPEC const opal_datatype_t opal_datatype_float12 = OPAL_DATATYPE_INITIALIZER_FLOAT12(0);
OPAL_DECLSPEC const opal_datatype_t opal_datatype_float16 = OPAL_DATATYPE_INITIALIZER_FLOAT16(0);
OPAL_DECLSPEC const opal_datatype_t opal_datatype_short_float_complex = OPAL_DATATYPE_INITIALIZER_SHORT_FLOAT_COMPLEX(0);
OPAL_DECLSPEC const opal_datatype_t opal_datatype_float_complex = OPAL_DATATYPE_INITIALIZER_FLOAT_COMPLEX(0);
OPAL_DECLSPEC const opal_datatype_t opal_datatype_double_complex = OPAL_DATATYPE_INITIALIZER_DOUBLE_COMPLEX(0);
OPAL_DECLSPEC const opal_datatype_t opal_datatype_long_double_complex = OPAL_DATATYPE_INITIALIZER_LONG_DOUBLE_COMPLEX(0);
@ -105,6 +107,13 @@ OPAL_DECLSPEC const size_t opal_datatype_local_sizes[OPAL_DATATYPE_MAX_PREDEFINE
[OPAL_DATATYPE_FLOAT8] = 8, /* sizeof (float8) */
[OPAL_DATATYPE_FLOAT12] = 12, /* sizeof (float12) */
[OPAL_DATATYPE_FLOAT16] = 16, /* sizeof (float16) */
#if defined(HAVE_SHORT_FLOAT__COMPLEX)
[OPAL_DATATYPE_SHORT_FLOAT_COMPLEX] = sizeof(short float _Complex),
#elif defined(HAVE_OPAL_SHORT_FLOAT_COMPLEX_T)
[OPAL_DATATYPE_SHORT_FLOAT_COMPLEX] = sizeof(opal_short_float_complex_t),
#else
[OPAL_DATATYPE_SHORT_FLOAT_COMPLEX] = 4, /* typical sizeof(short float _Complex) */
#endif
[OPAL_DATATYPE_FLOAT_COMPLEX] = sizeof(float _Complex),
[OPAL_DATATYPE_DOUBLE_COMPLEX] = sizeof(double _Complex),
[OPAL_DATATYPE_LONG_DOUBLE_COMPLEX] = sizeof(long double _Complex),
@ -136,6 +145,7 @@ OPAL_DECLSPEC const opal_datatype_t* opal_datatype_basicDatatypes[OPAL_DATATYPE_
[OPAL_DATATYPE_FLOAT8] = &opal_datatype_float8,
[OPAL_DATATYPE_FLOAT12] = &opal_datatype_float12,
[OPAL_DATATYPE_FLOAT16] = &opal_datatype_float16,
[OPAL_DATATYPE_SHORT_FLOAT_COMPLEX] = &opal_datatype_short_float_complex,
[OPAL_DATATYPE_FLOAT_COMPLEX] = &opal_datatype_float_complex,
[OPAL_DATATYPE_DOUBLE_COMPLEX] = &opal_datatype_double_complex,
[OPAL_DATATYPE_LONG_DOUBLE_COMPLEX] = &opal_datatype_long_double_complex,