47df60717c
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> |
||
---|---|---|
.. | ||
c | ||
mpif-h | ||
use-mpi | ||
use-mpi-f08 | ||
configure.m4 | ||
Makefile.am | ||
README.txt |
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 ...