Programming Languages on Power

Power Programming Languages

IBM Power, including the AIX, IBM i, and Linux operating systems, support a wide range of programming languages, catering to both traditional enterprise applications and modern development needs.


#Power

 View Only
  • 1.  Power9 128-bit floating-point operations

    Posted Wed December 05, 2018 03:27 PM

    Originally posted by: khanna


    Hello 

    I'm attempting to experiment with Power9's native "quadruple precision" 128-bit floating-point hardware using XLC/XLF. The data type I'm using is "long double" in C and "real*16" in Fortran. 

    It is difficult to tell whether or not the compiler is using the native 128-bit fp hardware or just doing some software emulation. The performance I get from basic test codes using "long double" data type is 10x slower than "double". So, I suspect that is just through software implementation and not native hardware.

    After some digging .. I noted that I should have a special library "libC128core.a" and special compiler commands like xlc++core128, xlC128core_r, etc. But my install of XLC doesn't come with any of that. (I'm on Linux .. CentOS7). 

    Anyone with feedback? Does anyone have any reference / sample code on how to take advantage of the Power9's native 128-bit fp hardware? 

     

    Thanks!

     

     


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


  • 2.  Re: Power9 128-bit floating-point operations

    Posted Wed December 05, 2018 03:40 PM

    Originally posted by: Rafik_Zurob


    Hello.  The XL compilers currently support the "double double" long double format only.  They do not support the IEEE 128-bit long double format that the POWER 9 hardware supports.


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


  • 3.  Re: Power9 128-bit floating-point operations

    Posted Wed December 05, 2018 04:00 PM

    Originally posted by: khanna


    OK. Do you happen do know if GCC supports it? 


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A


  • 4.  Re: Power9 128-bit floating-point operations

    Posted Wed December 05, 2018 04:10 PM

    Originally posted by: Rafik_Zurob


    It does, but it depends on the GCC version you have.  This page has some information:  https://gcc.gnu.org/gcc-6/changes.html  (e.g. You need -mfloat128 to turn it on).  If you have a newer GCC than that, please check the GCC manual to see if they use different options.


    #C/C++andFortran
    #Ask-Question-Here--General-Compiler-Q-and-A