mpiext/shortfloat: Add shortfloat
MPI extension
This extension provides additional MPI datatypes `MPIX_SHORT_FLOAT`, `MPIX_C_SHORT_FLOAT_COMPLEX`, and `MPIX_CXX_SHORT_FLOAT_COMPLEX` for `short float` (C/C++), `short float _Complex` (C), and `std::complex<short float>` (C++), respectively, or their alternate types like `_Float16`. See `ompi/mpiext/shortfloat/README.txt` for details. Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
Этот коммит содержится в:
родитель
4d7bde27fb
Коммит
c44599ec13
4
.gitignore
поставляемый
4
.gitignore
поставляемый
@ -300,6 +300,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
|
||||
|
@ -13,12 +13,12 @@ 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_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
|
||||
@ -27,11 +27,13 @@ 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
|
||||
@ -92,6 +94,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
|
||||
|
@ -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};
|
||||
@ -145,3 +145,17 @@ OMPI_DECLSPEC ompi_fortran_08_handle_t OMPI_F08_HANDLE_ALIGNED ompi_f08_mpi_cxx_
|
||||
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.
|
||||
*/
|
||||
#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};
|
||||
#endif
|
||||
|
10
ompi/mpiext/shortfloat/Makefile.am
Обычный файл
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
|
18
ompi/mpiext/shortfloat/README.txt
Обычный файл
18
ompi/mpiext/shortfloat/README.txt
Обычный файл
@ -0,0 +1,18 @@
|
||||
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.
|
||||
|
||||
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
Обычный файл
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
|
17
ompi/mpiext/shortfloat/c/mpiext_shortfloat_c.h
Обычный файл
17
ompi/mpiext/shortfloat/c/mpiext_shortfloat_c.h
Обычный файл
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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)
|
34
ompi/mpiext/shortfloat/configure.m4
Обычный файл
34
ompi/mpiext/shortfloat/configure.m4
Обычный файл
@ -0,0 +1,34 @@
|
||||
# -*- 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
|
||||
])
|
||||
|
||||
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])
|
||||
])
|
||||
|
||||
# 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
Обычный файл
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
|
17
ompi/mpiext/shortfloat/mpif-h/mpiext_shortfloat_mpifh.h
Обычный файл
17
ompi/mpiext/shortfloat/mpif-h/mpiext_shortfloat_mpifh.h
Обычный файл
@ -0,0 +1,17 @@
|
||||
! -*- 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
|
||||
|
||||
parameter (MPIX_SHORT_FLOAT=74)
|
||||
parameter (MPIX_C_SHORT_FLOAT_COMPLEX=75)
|
||||
parameter (MPIX_CXX_SHORT_FLOAT_COMPLEX=76)
|
42
ompi/mpiext/shortfloat/use-mpi-f08/Makefile.am
Обычный файл
42
ompi/mpiext/shortfloat/use-mpi-f08/Makefile.am
Обычный файл
@ -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
|
16
ompi/mpiext/shortfloat/use-mpi-f08/mpiext_shortfloat_usempif08.h
Обычный файл
16
ompi/mpiext/shortfloat/use-mpi-f08/mpiext_shortfloat_usempif08.h
Обычный файл
@ -0,0 +1,16 @@
|
||||
! -*- 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
|
15
ompi/mpiext/shortfloat/use-mpi/Makefile.am
Обычный файл
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
|
12
ompi/mpiext/shortfloat/use-mpi/mpiext_shortfloat_usempi.h
Обычный файл
12
ompi/mpiext/shortfloat/use-mpi/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.
|
Загрузка…
Ссылка в новой задаче
Block a user