[petsc-dev] fortran literals

William Gropp wgropp at illinois.edu
Fri Sep 2 09:44:03 CDT 2016


The float implementations are the same - but the kind value is not specified in the standard, and the value of kind for single or double (or quad or half) is up to the implementation.  You can’t assume that the numeric kind value that you find on one implementation will mean the same thing (or even be valid at all) on another implementation.

Bill

William Gropp
Acting Director and Chief Scientist, NCSA
Director, Parallel Computing Institute
Thomas M. Siebel Chair in Computer Science
University of Illinois Urbana-Champaign





On Sep 2, 2016, at 9:28 AM, Jeff Hammond <jeff.science at gmail.com> wrote:

> I'm not away of any difference in *float* values in implementations since Cray stopped doing 64b float in the 1990s (I may have the details wrong - I just remember code that calls SGEMM when DGEMM is used otherwise).
> 
> Jörg 
> 
> On Thursday, September 1, 2016, William Gropp <wgropp at illinois.edu> wrote:
> This is true.  The meaning of integer values of kind is up to the implementation, and at least two choices are in use.
> 
> Bill
> 
> William Gropp
> Acting Director and Chief Scientist, NCSA
> Director, Parallel Computing Institute
> Thomas M. Siebel Chair in Computer Science
> University of Illinois Urbana-Champaign
> 
> 
> 
> 
> 
> On Sep 1, 2016, at 6:15 PM, Blaise A Bourdin <bourdin at lsu.edu> wrote:
> 
>> If I recall correctly, fortran does not mandate that "selected_real_kind(5)" means the same across compilers, so that hardcoding kind values may not be portable.
> 
> 
> 
> -- 
> Jeff Hammond
> jeff.science at gmail.com
> http://jeffhammond.github.io/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160902/5eaa08ae/attachment.html>


More information about the petsc-dev mailing list