1
1
openmpi/ompi/mpiext/shortfloat
Jeff Squyres 47df60717c check_alt_short_float: ensure compiler supports math
Even if the compiler supports an "alternate" short float type (e.g.,
_Float16), check to make sure that the compiler will correctly link
applications that perform mathematical operations on that type.

Carefully choose the mathematical test in the configure check to
ensure the mathematical operation is not removed by compiler
optimization (when setting CFLAGS=-O1 or higher).

Out of the box, clang 6.0.x and 7.0.x will fail to link applications
that try to perform addition (and other mathematical operations) on
_Float16 variables (an additional CLI flag is required to enable
software emulation of _Float16).  If we detect a situation where the
type is supported by a sample program fails to link and the basename
of $CC is "clang", emit a warning and point the user to a relevant
README.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Signed-off-by: KAWASHIMA Takahiro <t-kawashima@fujitsu.com>
2020-06-17 08:38:42 -07:00
..
c mpiext/shortfloat: do not build an empty library 2019-04-18 13:42:18 -04:00
mpif-h mpiext/shortfloat: do not build an empty library 2019-04-18 13:42:18 -04:00
use-mpi mpiext/shortfloat: Add shortfloat MPI extension 2019-02-01 13:01:14 +09:00
use-mpi-f08 fortran/use-mpi-f08: revamp constant declarations 2019-10-28 10:01:17 +09:00
configure.m4 configury: fix a typo in mpiext/shortfloat 2019-11-29 11:09:54 +09:00
Makefile.am mpiext/shortfloat: Add shortfloat MPI extension 2019-02-01 13:01:14 +09:00
README.txt check_alt_short_float: ensure compiler supports math 2020-06-17 08:38:42 -07:00

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.

NOTE: The Clang 6.0.x and 7.0.x compilers support the "_Float16" type
(via software emulation), but require an additional linker flag to
function properly.  If you wish to enable Clang 6.0.x or 7.0.x's
software emulation of _Float16, use the following CLI options to Open
MPI configure script:

    ./configure \
        LDFLAGS=--rtlib=compiler-rt \
        --with-wrapper-ldflags=--rtlib=compiler-rt ...