(Because I'm not member of j3, only Reinhold's or Rich's answers will be visible for j3)
Based on Reinhold's answer, I make my questions more precise:
- Are there already some activities in J3 on this FP16 topic?
- When will the Fortran standard include REAL16 to support the new IEEE FP16 standard?
Best regards
Rolf
----- Original Message -----
> From: "Reinhold Bader" <Reinhold.Bader(a)lrz.de>
> To: "Rolf Rabenseifner" <rabenseifner(a)hlrs.de>, "fortran standards email list for J3" <j3(a)j3-fortran.org>
> Cc: "MPI-WG Fortran working group" <mpiwg-fortran(a)lists.mpi-forum.org>, "Atsushi Hori" <ahori(a)riken.jp>, "Martin Schulz"
> <schulzm(a)llnl.gov>, "MPI WG Point To Point Communications working group" <mpiwg-p2p(a)lists.mpi-forum.org>
> Sent: Friday, June 16, 2017 2:31:03 PM
> Subject: AW: FP16 16-bit-floating-point
> Hello Rolf,
>
> to the best of my knowledge, the answers are as follows:
>
> Q1: Not in the sense of having an explicit name like the REAL32, REAL64, REAL128
> names for specific integer kinds that were added to Fortran 2008.
> However, it is left free to implementors to create a new kind number in the
> implementation that could be returned by SELECTED_REAL_KIND() and,
> if IEEE conforming, by IEEE_SELECTED_REAL_KIND() and consequently all relevant
> IEEE support routines.
>
> Q2: REAL*2 is (like REAL*8) a non-conforming notation (REAL*8 is supported as an
> extension by many implementations), so the answer is no.
> A proper declaration might look like
>
> integer, parameter :: rk = selected_real_kind(2,6) ! at least 2 decimal
> digits and 6 maximal decimal exponent - hope I have this right ...
> real(KIND=rk) :: x
>
> with the following caveats:
> * the KIND that fits the requirement most closely will be used, so it might be
> necessary to use the STORAGE_SIZE intrinsic to check what one gets.
> * KIND numbers are non-portable, so might vary for one and the same kind between
> implementations (at least one compiler I know deviates from all others I know).
>
> I checked three of the compilers I know: they currently do not support FP16.
>
> Regards
> Reinhold
>
>
>> -----Ursprüngliche Nachricht-----
>> Von: Rolf Rabenseifner [mailto:[email protected]]
>> Gesendet: Freitag, 16. Juni 2017 13:53
>> An: fortran standards email list for J3 <j3(a)j3-fortran.org>; Bader, Reinhold
>> <Reinhold.Bader(a)lrz.de>
>> Cc: MPI-WG Fortran working group <mpiwg-fortran(a)lists.mpi-forum.org>;
>> Atsushi Hori <ahori(a)riken.jp>; Martin Schulz <schulzm(a)llnl.gov>; MPI WG
>> Point To Point Communications working group <mpiwg-p2p(a)lists.mpi-
>> forum.org>
>> Betreff: FP16 16-bit-floating-point
>>
>> Hi all together,
>>
>> I'm sitting in the MPI Forum Meeting and we discuss the new IEEE FP16
>> datatype.
>>
>> Questions to the Fortran atandardization body:
>>
>> - Does the Fortran Standardization Body has already a proposal for
>> the new name in Fortran for this IEEE FP16?
>>
>> - Will be REAL*2 identical to IEEE FP16?
>>
>> Best regards
>> Rolf
>>
>> --
>> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner(a)hlrs.de .
>> High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 .
>> University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 .
>> Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner .
> > Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .
--
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner(a)hlrs.de .
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 .
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 .
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner .
Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .
Hello Rolf,
to the best of my knowledge, the answers are as follows:
Q1: Not in the sense of having an explicit name like the REAL32, REAL64, REAL128 names for specific integer kinds that were added to Fortran 2008.
However, it is left free to implementors to create a new kind number in the implementation that could be returned by SELECTED_REAL_KIND() and,
if IEEE conforming, by IEEE_SELECTED_REAL_KIND() and consequently all relevant IEEE support routines.
Q2: REAL*2 is (like REAL*8) a non-conforming notation (REAL*8 is supported as an extension by many implementations), so the answer is no.
A proper declaration might look like
integer, parameter :: rk = selected_real_kind(2,6) ! at least 2 decimal digits and 6 maximal decimal exponent - hope I have this right ...
real(KIND=rk) :: x
with the following caveats:
* the KIND that fits the requirement most closely will be used, so it might be necessary to use the STORAGE_SIZE intrinsic to check what one gets.
* KIND numbers are non-portable, so might vary for one and the same kind between implementations (at least one compiler I know deviates from all others I know).
I checked three of the compilers I know: they currently do not support FP16.
Regards
Reinhold
> -----Ursprüngliche Nachricht-----
> Von: Rolf Rabenseifner [mailto:[email protected]]
> Gesendet: Freitag, 16. Juni 2017 13:53
> An: fortran standards email list for J3 <j3(a)j3-fortran.org>; Bader, Reinhold
> <Reinhold.Bader(a)lrz.de>
> Cc: MPI-WG Fortran working group <mpiwg-fortran(a)lists.mpi-forum.org>;
> Atsushi Hori <ahori(a)riken.jp>; Martin Schulz <schulzm(a)llnl.gov>; MPI WG
> Point To Point Communications working group <mpiwg-p2p(a)lists.mpi-
> forum.org>
> Betreff: FP16 16-bit-floating-point
>
> Hi all together,
>
> I'm sitting in the MPI Forum Meeting and we discuss the new IEEE FP16
> datatype.
>
> Questions to the Fortran atandardization body:
>
> - Does the Fortran Standardization Body has already a proposal for
> the new name in Fortran for this IEEE FP16?
>
> - Will be REAL*2 identical to IEEE FP16?
>
> Best regards
> Rolf
>
> --
> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner(a)hlrs.de .
> High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 .
> University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 .
> Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner .
> Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .
Hi all together,
I'm sitting in the MPI Forum Meeting and we discuss the new IEEE FP16
datatype.
Questions to the Fortran atandardization body:
- Does the Fortran Standardization Body has already a proposal for
the new name in Fortran for this IEEE FP16?
- Will be REAL*2 identical to IEEE FP16?
Best regards
Rolf
--
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner(a)hlrs.de .
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 .
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 .
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner .
Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .