SlideShare a Scribd company logo
1 of 16
Download to read offline
VORtech
floating point arithmetic
The consistency, accuracy and performance dilemma
Werner Kramer
17-05-2016
17-05-2016
VORtech 20 jaar (en trakteerde kennis)
http://www.meetup.com/VORtech-Scientific-Software-Engineering/
17-05-2016
floating point arithmetic
• IEEE 754 Binary floating-point standard
• Pick two:
• Reproducibility
• Accuracy
• Performance
• Testing results with finite
accuracy
17-05-2016
SIMONA-4315
Results depend on the location of the grid file
SIMONA-4328
Unexpected differences when cleaning roughcombination-
files
PS. The RMM-model is known to be slightly unstable.
17-05-2016
SIMONA-4256
test-models give different results for release2014 and trunk
Change in revision r5784:
waquaref.tab
#
14 RESTART NCHAR = 7 OPT
#
IREP = 1 NAME = EXP_RESTART NCHAR = 3 JREP = 1 TYPE = 3 OPT
IREP = 1 NAME = SDS_RESTART NCHAR = 3 JREP = 1 TYPE = 3 MAND
+IREP = 1 NAME = TIME_EPS NCHAR = 8 JREP = 1 TYPE = 2 DEF = 1e-4
#
Triggered a difference in a matrix factorization (with duplicate eigen values),
which resulted in up to 10 cm difference in the water level.
Differences disappear when compiling with debug flags.
17-05-2016 6
IEEE Floating point number
fraction between 1 and 2 (significand)
most significant bit (MSB) not stored
0.15625 * 2 = 0.31250 0
0.31250 * 2 = 0.62500 0
0.62500 * 2 = 1.25000 1
0.25000 * 2 = 0.50000 0
0.50000 * 2 = 1.00000 1
0. 00101
1. 01 2
biased exponent = exponent + 127
sign bit: 0 = positive, 1 = negative
0. 1562532 bit memory value for a decimal number
17-05-2016 7
Some examples
decimal S exponent fraction
1.000000 0 01111111 00000000000000000000000
-1.000000 1 01111111 00000000000000000000000
0.5000000 0 01111110 00000000000000000000000
0.1000000 0 01111011 10011001100110011001101
0.7578125 0 01111110 10000100000000000000000
0.0000E+00 0 00000000 00000000000000000000000
0.0000E+00 1 00000000 00000000000000000000000
Infinity 0 11111111 00000000000000000000000
-Infinity 1 11111111 00000000000000000000000
(s)NaN * 11111111 (0)1**********************
• 1.0/0.0 =
• 1.0/0.0 =
• 0.0/0.0 = 0.0 × = NaN
• sqrt(-1.) = NaN
17-05-2016
Distribution of values
• Spacing is dependent on the value of the exponent
• Without denormals there would be a gap around zero
17-05-2016 9
Rounding errors
Addition
3.0 +
6.0 1.10 × 2
1.10 × 2 +
1.10 × 2
0.11 × 2 +
10.01 × 2
1.001 × 2 ?
a) round to nearest (roundTiesToEven ) 1.00 × 2 = 8
b) round down (towards ) 1.00 × 2 = 8
c) round up (towards ) 1.01 × 2 = 10
d) round towards zero 1.00 × 2 = 8
17-05-2016
Factors that affect reproducibility
• Floating-point semantics
• Use of higher-precision intermediate results
fused multiply add instruction (fma) A*x + y
• Differences in math libraries (e.g. sin function)
-fimf-arch-precision=(high, medium, low)
• Data alignment changing vectorization
• Parallelism changing operation order
• Implementation differences between processors
-fimf-arch-consistency=true math library gives same results
across processors
17-05-2016
Reassociation
• Addition and multiplication are mathematically associative,
but not computationally associative
• (a+b)+c = a+(b+c)
• (a*b)*c = a*(b*c)
• Divide using multiply by reciprocal x*y => x*(1/y)
• C and C++ disallow reassociation, specify left-to-right order
• Fortran allows reordering as long as parentheses are honored
(–assume protect_parens)
• Compiler may not obey these by default
17-05-2016
Reassociation
integer ::i, n
real, dimension(n) :: A = 1.0
real :: C = -1.0, tiny = 1e-20
do i = 1, n
A(i) = A(i) + C + tiny
end do
original code optimized code
integer ::i, n
real, dimension(n) :: A = 1.0
real :: C = -1.0, tiny = 1e-20
C + tiny
do i = 1, n
A(i) = A(i) + C
end do
-fp-model keyword
• fast : value-unsafe optimizations (default)
• precise(source): value-safe optimizations only
• strict : precise + diable fma
17-05-2016
Vectorization
• Vector operation works on multiple data at once (e.g. 16 byte
block = 4 reals)
• Vectorized math functions are very slightly less accurate but
faster than the scalar versions
• Unaligned data -> both scalar and vector versions are called
• Can change results run-to-run!
• OS stack alignment
• Address Space Layout Randomization
17-05-2016
Vectorization
https://software.intel.com/en-us/articles/what-are-peel-and-remainder-loops-fortran-
vectorization-support
0x00
0x04
0x08
0x0c
0x10
0x14
0x18
0x1c
0x20
0x24
0x28
real(kind=4),
dimension(DIM_A) :: x
16 byte
16 byte
vectorized loop:
vector operation works on 16
byte block at once (SSE2)
do i=1,DIM_A
a(i) = sin(a(i))
end do
remainder:
scalar operation on remaining
array elements
peel loop:
loop iterations in scalar mode
until it reaches a 16 byte
boundary
17-05-2016
SIMONA testing & improvements
Field max(dif) time 99%(dif) rms(dif) mean(dif)
solution_flow.sep.sep 0.001162 1395.00 0.000525 0.000170 0.000119
solution_flow.up.up 0.006302 975.00 0.001386 0.000284 0.000106
solution_flow.vp.vp 0.011412 1185.00 0.002075 0.000657 0.000127
test suite containing a large number of models
test suite has quantify random option -qr
inverts loop when solving matrix system
use -fp-model source to validate code
modifications
change sensitive parts to double precision
release with -fp-model source?
17-05-2016
Technical/legacy
Software correctness is determined by comparison to previous
(baseline) results.
Debugging/porting
When developing and debugging, a higher degree of run-to-run stability
is required to find potential problems.
Legal
Accreditation or approval of software might require exact reproduction of
previously defined results.
Customer perception
Developers may understand the technical issues with reproducibility but
still require reproducible results since end users or customers will be
disconcerted by the inconsistencies.
Why Reproducibility

More Related Content

Viewers also liked

Project Contract for Green Enery
Project Contract for Green EneryProject Contract for Green Enery
Project Contract for Green Eneryardentjava
 
Línea de timpo procesadore
 Línea de timpo procesadore  Línea de timpo procesadore
Línea de timpo procesadore Oscar Bravo
 
ใบความรู้ที่ 7 การสร้างรายงาน (Report)
ใบความรู้ที่ 7 การสร้างรายงาน (Report)ใบความรู้ที่ 7 การสร้างรายงาน (Report)
ใบความรู้ที่ 7 การสร้างรายงาน (Report)krunueng1
 
Byggexpressen ReklamFolder
Byggexpressen ReklamFolderByggexpressen ReklamFolder
Byggexpressen ReklamFolderBjörn Jönsson
 
FormFactor - eForms for Alfresco
FormFactor - eForms for AlfrescoFormFactor - eForms for Alfresco
FormFactor - eForms for AlfrescoMike Priest
 
02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...
02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...
02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...Deltares
 
el islam, inicios, principios y expansión.
el islam, inicios, principios y expansión.el islam, inicios, principios y expansión.
el islam, inicios, principios y expansión.Luis Rico
 
15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...
15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...
15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...Deltares
 
Ebanking slide
Ebanking slideEbanking slide
Ebanking slideTài Vĩnh
 
Floating point units
Floating point unitsFloating point units
Floating point unitsdipugovind
 
Marketing plan for Buildabazaar
Marketing plan for BuildabazaarMarketing plan for Buildabazaar
Marketing plan for BuildabazaarRishabh Singh
 
Ict development in last decade in bangladesh
Ict development in last decade in bangladeshIct development in last decade in bangladesh
Ict development in last decade in bangladeshMamun Rahman
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computersBảo Hoang
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmeticHareem Aslam
 
Secure develpment 2014
Secure develpment 2014Secure develpment 2014
Secure develpment 2014Ariel Evans
 
Floating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAFloating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAAzhar Syed
 
Computer architecture
Computer architecture Computer architecture
Computer architecture Ashish Kumar
 

Viewers also liked (20)

Project Contract for Green Enery
Project Contract for Green EneryProject Contract for Green Enery
Project Contract for Green Enery
 
Línea de timpo procesadore
 Línea de timpo procesadore  Línea de timpo procesadore
Línea de timpo procesadore
 
ใบความรู้ที่ 7 การสร้างรายงาน (Report)
ใบความรู้ที่ 7 การสร้างรายงาน (Report)ใบความรู้ที่ 7 การสร้างรายงาน (Report)
ใบความรู้ที่ 7 การสร้างรายงาน (Report)
 
Byggexpressen ReklamFolder
Byggexpressen ReklamFolderByggexpressen ReklamFolder
Byggexpressen ReklamFolder
 
FormFactor - eForms for Alfresco
FormFactor - eForms for AlfrescoFormFactor - eForms for Alfresco
FormFactor - eForms for Alfresco
 
02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...
02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...
02 - DSD-NL 2016 - Geo Klantendag - Workshop funderingen voor on- en offshore...
 
PHP expression and operator
PHP expression and operatorPHP expression and operator
PHP expression and operator
 
el islam, inicios, principios y expansión.
el islam, inicios, principios y expansión.el islam, inicios, principios y expansión.
el islam, inicios, principios y expansión.
 
15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...
15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...
15 DSD-NL 2016 - Delft-FEWS Gebruikersdag - Config Review - Marc van Dijk & K...
 
Ebanking slide
Ebanking slideEbanking slide
Ebanking slide
 
Floating point units
Floating point unitsFloating point units
Floating point units
 
Marketing plan for Buildabazaar
Marketing plan for BuildabazaarMarketing plan for Buildabazaar
Marketing plan for Buildabazaar
 
Ict development in last decade in bangladesh
Ict development in last decade in bangladeshIct development in last decade in bangladesh
Ict development in last decade in bangladesh
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
 
Chapter 05 computer arithmetic
Chapter 05 computer arithmeticChapter 05 computer arithmetic
Chapter 05 computer arithmetic
 
Bbr security
Bbr securityBbr security
Bbr security
 
Secure develpment 2014
Secure develpment 2014Secure develpment 2014
Secure develpment 2014
 
Floating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAFloating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGA
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 
Computer architecture
Computer architecture Computer architecture
Computer architecture
 

Similar to 02 DSD-NL 2016 - Simona Gebruikersmiddag - Floating point onnauwkeurigheid en gevoeligheid van rekenmodellen - Werner Kramer, VORtech

Universal Coding of the Reals: Alternatives to IEEE Floating Point
Universal Coding of the Reals: Alternatives to IEEE Floating PointUniversal Coding of the Reals: Alternatives to IEEE Floating Point
Universal Coding of the Reals: Alternatives to IEEE Floating Pointinside-BigData.com
 
Week5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptxWeek5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptxfahmi324663
 
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...zeeshanshanzy009
 
03_NumberSystems.pdf
03_NumberSystems.pdf03_NumberSystems.pdf
03_NumberSystems.pdfvijayapraba1
 
Faster R-CNN - PR012
Faster R-CNN - PR012Faster R-CNN - PR012
Faster R-CNN - PR012Jinwon Lee
 
Systems of Counting
Systems of CountingSystems of Counting
Systems of Countingadil raja
 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfKannan Kanagaraj
 
Optical modeling and design of freeform surfaces using anisotropic Radial Bas...
Optical modeling and design of freeform surfaces using anisotropic Radial Bas...Optical modeling and design of freeform surfaces using anisotropic Radial Bas...
Optical modeling and design of freeform surfaces using anisotropic Radial Bas...Milan Maksimovic
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchGreg Makowski
 
Reliable multimedia transmission under noisy condition
Reliable multimedia transmission under noisy conditionReliable multimedia transmission under noisy condition
Reliable multimedia transmission under noisy conditionShahrukh Ali Khan
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksDavid Evans
 
Catastrophic Cancellation
Catastrophic CancellationCatastrophic Cancellation
Catastrophic CancellationC4Media
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfMdJubayerFaisalEmon
 
error_detection_correction.pptx
error_detection_correction.pptxerror_detection_correction.pptx
error_detection_correction.pptxssuser50f4fd1
 

Similar to 02 DSD-NL 2016 - Simona Gebruikersmiddag - Floating point onnauwkeurigheid en gevoeligheid van rekenmodellen - Werner Kramer, VORtech (20)

Universal Coding of the Reals: Alternatives to IEEE Floating Point
Universal Coding of the Reals: Alternatives to IEEE Floating PointUniversal Coding of the Reals: Alternatives to IEEE Floating Point
Universal Coding of the Reals: Alternatives to IEEE Floating Point
 
IDEA.ppt
IDEA.pptIDEA.ppt
IDEA.ppt
 
Dpsd lecture-notes
Dpsd lecture-notesDpsd lecture-notes
Dpsd lecture-notes
 
Week5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptxWeek5-Faster R-CNN.pptx
Week5-Faster R-CNN.pptx
 
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
IEEE-754 standard format to handle Floating-Point calculations in RISC-V CPUs...
 
03_NumberSystems.pdf
03_NumberSystems.pdf03_NumberSystems.pdf
03_NumberSystems.pdf
 
Faster R-CNN - PR012
Faster R-CNN - PR012Faster R-CNN - PR012
Faster R-CNN - PR012
 
Systems of Counting
Systems of CountingSystems of Counting
Systems of Counting
 
Digital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdfDigital Electronics – Unit I.pdf
Digital Electronics – Unit I.pdf
 
Optical modeling and design of freeform surfaces using anisotropic Radial Bas...
Optical modeling and design of freeform surfaces using anisotropic Radial Bas...Optical modeling and design of freeform surfaces using anisotropic Radial Bas...
Optical modeling and design of freeform surfaces using anisotropic Radial Bas...
 
Heuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient searchHeuristic design of experiments w meta gradient search
Heuristic design of experiments w meta gradient search
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
LeNet-5
LeNet-5LeNet-5
LeNet-5
 
Reliable multimedia transmission under noisy condition
Reliable multimedia transmission under noisy conditionReliable multimedia transmission under noisy condition
Reliable multimedia transmission under noisy condition
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
 
Catastrophic Cancellation
Catastrophic CancellationCatastrophic Cancellation
Catastrophic Cancellation
 
dld 01-introduction
dld 01-introductiondld 01-introduction
dld 01-introduction
 
Course Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdfCourse Name: Digital System Design Number System.pdf
Course Name: Digital System Design Number System.pdf
 
Binary system ppt
Binary system pptBinary system ppt
Binary system ppt
 
error_detection_correction.pptx
error_detection_correction.pptxerror_detection_correction.pptx
error_detection_correction.pptx
 

More from Deltares

DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...
DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...
DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...Deltares
 
DSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - Bosch
DSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - BoschDSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - Bosch
DSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - BoschDeltares
 
DSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de Keijzer
DSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de KeijzerDSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de Keijzer
DSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de KeijzerDeltares
 
DSD-NL 2022 D-GEO Gebruikersdag - van der Meij
DSD-NL 2022 D-GEO Gebruikersdag - van der MeijDSD-NL 2022 D-GEO Gebruikersdag - van der Meij
DSD-NL 2022 D-GEO Gebruikersdag - van der MeijDeltares
 
DSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - Melsen
DSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - MelsenDSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - Melsen
DSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - MelsenDeltares
 
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2Deltares
 
DSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - Meijers
DSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - MeijersDSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - Meijers
DSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - MeijersDeltares
 
DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...
DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...
DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...Deltares
 
DSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - Spruyt
DSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - SpruytDSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - Spruyt
DSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - SpruytDeltares
 
DSD-NL 2022 Proactief watermanagement systeem van Bangkok - Hutten
DSD-NL 2022 Proactief watermanagement systeem van Bangkok - HuttenDSD-NL 2022 Proactief watermanagement systeem van Bangkok - Hutten
DSD-NL 2022 Proactief watermanagement systeem van Bangkok - HuttenDeltares
 
DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...
DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...
DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...Deltares
 
DSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de Lange
DSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de LangeDSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de Lange
DSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de LangeDeltares
 
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de GraaffDSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de GraaffDeltares
 
DSD-NL 2022 D-HYDRO Gebruikersdag - Programma - Melger
DSD-NL 2022 D-HYDRO Gebruikersdag - Programma - MelgerDSD-NL 2022 D-HYDRO Gebruikersdag - Programma - Melger
DSD-NL 2022 D-HYDRO Gebruikersdag - Programma - MelgerDeltares
 
DSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, Weerts
DSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, WeertsDSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, Weerts
DSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, WeertsDeltares
 
DSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO Suite
DSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO SuiteDSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO Suite
DSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO SuiteDeltares
 
DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...
DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...
DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...Deltares
 
DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...
DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...
DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...Deltares
 
DSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, Coster
DSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, CosterDSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, Coster
DSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, CosterDeltares
 
DSD-NL 2021 Casus Leiderdorp - de Waard, Vlaar
DSD-NL 2021 Casus Leiderdorp - de Waard, VlaarDSD-NL 2021 Casus Leiderdorp - de Waard, Vlaar
DSD-NL 2021 Casus Leiderdorp - de Waard, VlaarDeltares
 

More from Deltares (20)

DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...
DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...
DSD-NL 2023 Ontwikkeling van een bias Kalman filter - Laagfrequente correctie...
 
DSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - Bosch
DSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - BoschDSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - Bosch
DSD-NL 2023 Hoogwatertoetsingen met D-HYDRO Suite 1D2D - Bosch
 
DSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de Keijzer
DSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de KeijzerDSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de Keijzer
DSD-NL 2023 Hydraulisch Modelinstrumentarium Aa en Maas - de Keijzer
 
DSD-NL 2022 D-GEO Gebruikersdag - van der Meij
DSD-NL 2022 D-GEO Gebruikersdag - van der MeijDSD-NL 2022 D-GEO Gebruikersdag - van der Meij
DSD-NL 2022 D-GEO Gebruikersdag - van der Meij
 
DSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - Melsen
DSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - MelsenDSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - Melsen
DSD-NL 2022 Keuzes - een workshop voor modelbouwers - Wesselius - Melsen
 
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff2
 
DSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - Meijers
DSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - MeijersDSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - Meijers
DSD-NL 2022 Waterkwaliteitsmodellering met D-HYDRO Suite 1D2D - Meijers
 
DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...
DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...
DSD-NL 2022 D-HYDRO Suite 1D2D, stand van zaken en vooruitblik - Verhoeven - ...
 
DSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - Spruyt
DSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - SpruytDSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - Spruyt
DSD-NL 2022 Highlights van de zesde-generatie RWS modelschematisaties - Spruyt
 
DSD-NL 2022 Proactief watermanagement systeem van Bangkok - Hutten
DSD-NL 2022 Proactief watermanagement systeem van Bangkok - HuttenDSD-NL 2022 Proactief watermanagement systeem van Bangkok - Hutten
DSD-NL 2022 Proactief watermanagement systeem van Bangkok - Hutten
 
DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...
DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...
DSD-NL 2022 Toetsing op wateroverlast voor de Barneveldse en Lunterse Beek - ...
 
DSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de Lange
DSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de LangeDSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de Lange
DSD-NL 2022 Overstromingsberekeningen met D-HYDRO Suite 1D2D - de Lange
 
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de GraaffDSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff
DSD-NL 2022 D-HYDRO modelgeneratie in Limburg - de Graaff
 
DSD-NL 2022 D-HYDRO Gebruikersdag - Programma - Melger
DSD-NL 2022 D-HYDRO Gebruikersdag - Programma - MelgerDSD-NL 2022 D-HYDRO Gebruikersdag - Programma - Melger
DSD-NL 2022 D-HYDRO Gebruikersdag - Programma - Melger
 
DSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, Weerts
DSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, WeertsDSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, Weerts
DSD-NL 2021 Watersysteemanalyses-toetsingen - Horn, Weerts
 
DSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO Suite
DSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO SuiteDSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO Suite
DSD-NL 2021 D-HyDAMO import en verificatie met D-HYDRO Suite
 
DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...
DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...
DSD-NL 2021 Toepassing (semi-)gedistribueerde hydrologie met D-HYDRO Suite - ...
 
DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...
DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...
DSD-NL 2021 Omzetten boezemmodel WS Hunze en Aa’s van SOBEK 2 naar D-HYDRO Su...
 
DSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, Coster
DSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, CosterDSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, Coster
DSD-NL 2021 Casus Stellendam Goeree-Overflakkee - Stigter, Coster
 
DSD-NL 2021 Casus Leiderdorp - de Waard, Vlaar
DSD-NL 2021 Casus Leiderdorp - de Waard, VlaarDSD-NL 2021 Casus Leiderdorp - de Waard, Vlaar
DSD-NL 2021 Casus Leiderdorp - de Waard, Vlaar
 

Recently uploaded

Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfWadeK3
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRDelhi Call girls
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoSérgio Sacani
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...jana861314
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfmuntazimhurra
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxyaramohamed343013
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxpradhanghanshyam7136
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Patrick Diehl
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Lokesh Kothari
 

Recently uploaded (20)

Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
 
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCRStunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
Stunning ➥8448380779▻ Call Girls In Panchshil Enclave Delhi NCR
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
 
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
Traditional Agroforestry System in India- Shifting Cultivation, Taungya, Home...
 
Biological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdfBiological Classification BioHack (3).pdf
Biological Classification BioHack (3).pdf
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
Scheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docxScheme-of-Work-Science-Stage-4 cambridge science.docx
Scheme-of-Work-Science-Stage-4 cambridge science.docx
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptx
 
Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?Is RISC-V ready for HPC workload? Maybe?
Is RISC-V ready for HPC workload? Maybe?
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
Labelling Requirements and Label Claims for Dietary Supplements and Recommend...
 

02 DSD-NL 2016 - Simona Gebruikersmiddag - Floating point onnauwkeurigheid en gevoeligheid van rekenmodellen - Werner Kramer, VORtech

  • 1. VORtech floating point arithmetic The consistency, accuracy and performance dilemma Werner Kramer 17-05-2016
  • 2. 17-05-2016 VORtech 20 jaar (en trakteerde kennis) http://www.meetup.com/VORtech-Scientific-Software-Engineering/
  • 3. 17-05-2016 floating point arithmetic • IEEE 754 Binary floating-point standard • Pick two: • Reproducibility • Accuracy • Performance • Testing results with finite accuracy
  • 4. 17-05-2016 SIMONA-4315 Results depend on the location of the grid file SIMONA-4328 Unexpected differences when cleaning roughcombination- files PS. The RMM-model is known to be slightly unstable.
  • 5. 17-05-2016 SIMONA-4256 test-models give different results for release2014 and trunk Change in revision r5784: waquaref.tab # 14 RESTART NCHAR = 7 OPT # IREP = 1 NAME = EXP_RESTART NCHAR = 3 JREP = 1 TYPE = 3 OPT IREP = 1 NAME = SDS_RESTART NCHAR = 3 JREP = 1 TYPE = 3 MAND +IREP = 1 NAME = TIME_EPS NCHAR = 8 JREP = 1 TYPE = 2 DEF = 1e-4 # Triggered a difference in a matrix factorization (with duplicate eigen values), which resulted in up to 10 cm difference in the water level. Differences disappear when compiling with debug flags.
  • 6. 17-05-2016 6 IEEE Floating point number fraction between 1 and 2 (significand) most significant bit (MSB) not stored 0.15625 * 2 = 0.31250 0 0.31250 * 2 = 0.62500 0 0.62500 * 2 = 1.25000 1 0.25000 * 2 = 0.50000 0 0.50000 * 2 = 1.00000 1 0. 00101 1. 01 2 biased exponent = exponent + 127 sign bit: 0 = positive, 1 = negative 0. 1562532 bit memory value for a decimal number
  • 7. 17-05-2016 7 Some examples decimal S exponent fraction 1.000000 0 01111111 00000000000000000000000 -1.000000 1 01111111 00000000000000000000000 0.5000000 0 01111110 00000000000000000000000 0.1000000 0 01111011 10011001100110011001101 0.7578125 0 01111110 10000100000000000000000 0.0000E+00 0 00000000 00000000000000000000000 0.0000E+00 1 00000000 00000000000000000000000 Infinity 0 11111111 00000000000000000000000 -Infinity 1 11111111 00000000000000000000000 (s)NaN * 11111111 (0)1********************** • 1.0/0.0 = • 1.0/0.0 = • 0.0/0.0 = 0.0 × = NaN • sqrt(-1.) = NaN
  • 8. 17-05-2016 Distribution of values • Spacing is dependent on the value of the exponent • Without denormals there would be a gap around zero
  • 9. 17-05-2016 9 Rounding errors Addition 3.0 + 6.0 1.10 × 2 1.10 × 2 + 1.10 × 2 0.11 × 2 + 10.01 × 2 1.001 × 2 ? a) round to nearest (roundTiesToEven ) 1.00 × 2 = 8 b) round down (towards ) 1.00 × 2 = 8 c) round up (towards ) 1.01 × 2 = 10 d) round towards zero 1.00 × 2 = 8
  • 10. 17-05-2016 Factors that affect reproducibility • Floating-point semantics • Use of higher-precision intermediate results fused multiply add instruction (fma) A*x + y • Differences in math libraries (e.g. sin function) -fimf-arch-precision=(high, medium, low) • Data alignment changing vectorization • Parallelism changing operation order • Implementation differences between processors -fimf-arch-consistency=true math library gives same results across processors
  • 11. 17-05-2016 Reassociation • Addition and multiplication are mathematically associative, but not computationally associative • (a+b)+c = a+(b+c) • (a*b)*c = a*(b*c) • Divide using multiply by reciprocal x*y => x*(1/y) • C and C++ disallow reassociation, specify left-to-right order • Fortran allows reordering as long as parentheses are honored (–assume protect_parens) • Compiler may not obey these by default
  • 12. 17-05-2016 Reassociation integer ::i, n real, dimension(n) :: A = 1.0 real :: C = -1.0, tiny = 1e-20 do i = 1, n A(i) = A(i) + C + tiny end do original code optimized code integer ::i, n real, dimension(n) :: A = 1.0 real :: C = -1.0, tiny = 1e-20 C + tiny do i = 1, n A(i) = A(i) + C end do -fp-model keyword • fast : value-unsafe optimizations (default) • precise(source): value-safe optimizations only • strict : precise + diable fma
  • 13. 17-05-2016 Vectorization • Vector operation works on multiple data at once (e.g. 16 byte block = 4 reals) • Vectorized math functions are very slightly less accurate but faster than the scalar versions • Unaligned data -> both scalar and vector versions are called • Can change results run-to-run! • OS stack alignment • Address Space Layout Randomization
  • 14. 17-05-2016 Vectorization https://software.intel.com/en-us/articles/what-are-peel-and-remainder-loops-fortran- vectorization-support 0x00 0x04 0x08 0x0c 0x10 0x14 0x18 0x1c 0x20 0x24 0x28 real(kind=4), dimension(DIM_A) :: x 16 byte 16 byte vectorized loop: vector operation works on 16 byte block at once (SSE2) do i=1,DIM_A a(i) = sin(a(i)) end do remainder: scalar operation on remaining array elements peel loop: loop iterations in scalar mode until it reaches a 16 byte boundary
  • 15. 17-05-2016 SIMONA testing & improvements Field max(dif) time 99%(dif) rms(dif) mean(dif) solution_flow.sep.sep 0.001162 1395.00 0.000525 0.000170 0.000119 solution_flow.up.up 0.006302 975.00 0.001386 0.000284 0.000106 solution_flow.vp.vp 0.011412 1185.00 0.002075 0.000657 0.000127 test suite containing a large number of models test suite has quantify random option -qr inverts loop when solving matrix system use -fp-model source to validate code modifications change sensitive parts to double precision release with -fp-model source?
  • 16. 17-05-2016 Technical/legacy Software correctness is determined by comparison to previous (baseline) results. Debugging/porting When developing and debugging, a higher degree of run-to-run stability is required to find potential problems. Legal Accreditation or approval of software might require exact reproduction of previously defined results. Customer perception Developers may understand the technical issues with reproducibility but still require reproducible results since end users or customers will be disconcerted by the inconsistencies. Why Reproducibility