[petsc-dev] quad precision

Barry Smith bsmith at mcs.anl.gov
Wed Mar 16 19:00:36 CDT 2011



On Feb 8, 2011, at 6:31 AM, Jed Brown wrote:

> > GCC now ships with the LGPL-licensed libquadmath library, which provides for targets with a __float128 datatype quad-precision mathematical functions. __float128 is available for targets on 32-bit x86, x86-64 and Itanium architectures. The libquadmath library is automatically built on such targets when building the Fortran compiler.
> 
> http://gcc.gnu.org/gcc-4.6/changes.html#libquadmath
> http://gcc.gnu.org/onlinedocs/libquadmath/
> 
> Looks like this is something that actually works. GCC-4.6 is probably about two months away from a release, but this should be functional now. Perhaps it should be supported by petsc-3.2?

  Done (use ./configure --with-precision=__float128 --download-qblaslapack

barry-smiths-macbook-pro:tutorials barrysmith$ petscmpiexec -n 2 ./ex19 -snes_monitor -ksp_monitor -ksp_rtol 1.e-30 -snes_rtol 1.e-28
lid velocity = Qe, prandtl # = Qe, grashof # = Qe
  0 SNES Function norm 1.461936698223e-01 
    0 KSP Residual norm 1.461936698223e-01 
    1 KSP Residual norm 1.831093524630e-02 
    2 KSP Residual norm 3.842156479462e-03 
    3 KSP Residual norm 1.288406516834e-04 
    4 KSP Residual norm 6.151749539864e-06 
    5 KSP Residual norm 5.304145544729e-07 
    6 KSP Residual norm 1.885113023052e-08 
    7 KSP Residual norm 7.029816194041e-10 
    8 KSP Residual norm 5.197815114974e-11 
    9 KSP Residual norm 1.551090319297e-12 
   10 KSP Residual norm 6.563825928589e-14 
   11 KSP Residual norm 4.237666605992e-15 
   12 KSP Residual norm 1.991927370291e-16 
   13 KSP Residual norm 2.039546156320e-17 
   14 KSP Residual norm 1.399229447695e-17 
   15 KSP Residual norm 1.137432635542e-17 
   16 KSP Residual norm 9.814665753619e-18 
   17 KSP Residual norm 8.761318174145e-18 
   18 KSP Residual norm 7.987316427844e-18 
   19 KSP Residual norm 7.387832309954e-18 
   20 KSP Residual norm 6.905793284234e-18 
   21 KSP Residual norm 6.507264709320e-18 
   22 KSP Residual norm 6.170620606220e-18 
   23 KSP Residual norm 5.881342212029e-18 
   24 KSP Residual norm 5.629271709982e-18 
   25 KSP Residual norm 5.407060816706e-18 
   26 KSP Residual norm 5.209244641147e-18 
   27 KSP Residual norm 5.031663281118e-18 
   28 KSP Residual norm 4.871086689542e-18 
   29 KSP Residual norm 4.724963445290e-18 
   30 KSP Residual norm 1.945800083119e-17 
   31 KSP Residual norm 3.878029318777e-18 
   32 KSP Residual norm 8.021501106718e-19 
   33 KSP Residual norm 3.209251006205e-20 
   34 KSP Residual norm 9.713771954068e-22 
   35 KSP Residual norm 7.628163240222e-23 
   36 KSP Residual norm 4.108476441305e-24 
   37 KSP Residual norm 1.743186899274e-25 
   38 KSP Residual norm 1.115126800943e-26 
   39 KSP Residual norm 6.198813188878e-28 
   40 KSP Residual norm 2.869837519115e-29 
   41 KSP Residual norm 1.515585472682e-30 
   42 KSP Residual norm 5.770691059470e-32 
  1 SNES Function norm 2.507018921541e-05 
    0 KSP Residual norm 2.507018921541e-05 
    1 KSP Residual norm 7.131114735363e-07 
    2 KSP Residual norm 6.965532093127e-08 
    3 KSP Residual norm 8.087355337901e-09 
    4 KSP Residual norm 2.749048294679e-10 
    5 KSP Residual norm 1.113870556134e-11 
    6 KSP Residual norm 4.684216963041e-13 
    7 KSP Residual norm 4.911624900830e-14 
    8 KSP Residual norm 2.475960732046e-15 
    9 KSP Residual norm 1.012965264508e-16 
   10 KSP Residual norm 5.199268899437e-18 
   11 KSP Residual norm 2.361382990671e-19 
   12 KSP Residual norm 1.624218498133e-20 
   13 KSP Residual norm 1.626389274652e-21 
   14 KSP Residual norm 1.086627523198e-21 
   15 KSP Residual norm 8.796270682258e-22 
   16 KSP Residual norm 7.562576022670e-22 
   17 KSP Residual norm 6.738068994025e-22 
   18 KSP Residual norm 6.134859714231e-22 
   19 KSP Residual norm 5.669225669612e-22 
   20 KSP Residual norm 5.295704884674e-22 
   21 KSP Residual norm 4.987454291392e-22 
   22 KSP Residual norm 4.727440148233e-22 
   23 KSP Residual norm 4.504266287687e-22 
   24 KSP Residual norm 4.309981502786e-22 
   25 KSP Residual norm 4.138846776251e-22 
   26 KSP Residual norm 3.986602059865e-22 
   27 KSP Residual norm 3.850009759823e-22 
   28 KSP Residual norm 3.726559420703e-22 
   29 KSP Residual norm 3.614270387400e-22 
   30 KSP Residual norm 1.485730798507e-21 
   31 KSP Residual norm 5.734533095762e-23 
   32 KSP Residual norm 2.917983740862e-24 
   33 KSP Residual norm 2.415955278478e-25 
   34 KSP Residual norm 2.754121553256e-26 
   35 KSP Residual norm 1.530546077890e-27 
   36 KSP Residual norm 1.236527954824e-28 
   37 KSP Residual norm 5.968984750158e-30 
   38 KSP Residual norm 2.679693674423e-31 
   39 KSP Residual norm 2.728339059485e-32 
   40 KSP Residual norm 8.956127952264e-34 
   41 KSP Residual norm 2.732653737468e-35 
   42 KSP Residual norm 1.278928596713e-36 
  2 SNES Function norm 5.123354965471e-13 
    0 KSP Residual norm 5.123354965471e-13 
    1 KSP Residual norm 1.922138659280e-14 
    2 KSP Residual norm 1.916027080380e-15 
    3 KSP Residual norm 1.173166951366e-16 
    4 KSP Residual norm 6.562671109080e-18 
    5 KSP Residual norm 1.982740889768e-19 
    6 KSP Residual norm 1.593609248118e-20 
    7 KSP Residual norm 5.849655936465e-22 
    8 KSP Residual norm 2.871644899437e-23 
    9 KSP Residual norm 8.762292108710e-25 
   10 KSP Residual norm 2.883597656362e-26 
   11 KSP Residual norm 1.508069830626e-27 
   12 KSP Residual norm 9.552654188779e-29 
   13 KSP Residual norm 5.964437523019e-29 
   14 KSP Residual norm 4.773742821457e-29 
   15 KSP Residual norm 4.073114192114e-29 
   16 KSP Residual norm 3.613955807224e-29 
   17 KSP Residual norm 3.281398363062e-29 
   18 KSP Residual norm 3.026482504508e-29 
   19 KSP Residual norm 2.823023108355e-29 
   20 KSP Residual norm 2.655755272176e-29 
   21 KSP Residual norm 2.515082243565e-29 
   22 KSP Residual norm 2.394629606506e-29 
   23 KSP Residual norm 2.289975422292e-29 
   24 KSP Residual norm 2.197943014798e-29 
   25 KSP Residual norm 2.116183578028e-29 
   26 KSP Residual norm 2.042917954989e-29 
   27 KSP Residual norm 1.976770491487e-29 
   28 KSP Residual norm 1.916658520825e-29 
   29 KSP Residual norm 1.861716726173e-29 
   30 KSP Residual norm 7.847792961992e-29 
   31 KSP Residual norm 3.265251638392e-30 
   32 KSP Residual norm 2.554035610120e-31 
   33 KSP Residual norm 1.708749092417e-32 
   34 KSP Residual norm 1.088457747082e-33 
   35 KSP Residual norm 4.004032418947e-35 
   36 KSP Residual norm 3.626864425969e-36 
   37 KSP Residual norm 1.998928979977e-37 
   38 KSP Residual norm 5.929794876014e-39 
   39 KSP Residual norm 3.867971851833e-40 
   40 KSP Residual norm 2.306219660368e-41 
   41 KSP Residual norm 1.109502994834e-42 
   42 KSP Residual norm 7.010253552905e-44 
  3 SNES Function norm 1.676590295787e-28 




More information about the petsc-dev mailing list