Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Lecture 1

Scientific and Data Computing I

Martin Berzins
School of Computing
What is Scientific Computing?
Scientific
Computing “The purpose of
(scientific)computing is not
Computer numbers but (meaningful)
Science
insight” Hamming 1960s
Physical
Mathematics Domain
Science

Scientific Computing is a multidisciplinary subject going


back to the beginnings of computing and today defining the
some of the largest largest problems That can be computed

2
What is Data Science?
Data science is a multi-
disciplinary field that uses
scientific methods,
processes, algorithms and
systems to extract knowledge
and insights from structured
and unstructured
data.Wikipedia

Data Science challenges may arise


from physical models but may
also arise from non-physical cases
.e.g. www or business activities 3
About Me: Research Areas
• Multidisciplinary across math cs and
engineering
• Derivation and analysis of algorithms
• Incorporation of these ideas into software
• Parallel computing research on software at
scale.
• Use challenging applications problems to drive
this process.
About Me: Typos
• I have a fundamental and longstanding (since
childhood) problem with typos .
• While modern software helps with this it is not
infallible.
• Please help by identifying these when you see
them.
• Please also exhibit some patience.
• If this is a challenge for you then perhaps you
might consider a different class.
GE/ALSTOM
92 meters

O2 concentrations boiler simulation


GE Power 1000MWe “Twin Fireball” boiler
Supply power for 1M people
1mm grid resolution = 9 x 1012 cells and 1014 variables
1000 times larger than largest problems solved today
Overarching Application
• high efficiency advanced ultra-supercritical (AUSC) oxy-
coal tangentially-fired power boiler
• Predict the heat flux – transfer of energy to the water
• Predict the boiler efficiency, exhaust gasses NOx
• Accelerate deployment of new technology
• Use this as the model for any virtual design process.
• Show that extreme scale computing can be used in
engineering design
• Show that engineering uncertainty quantification can be
used at large scale.

Images (from left to right) of


large coal particle
distribution, oxygen
concentration, and
temperature throughout the
boiler.
Parallel Computing
• Such problems can only be solved on large scale parallel
computers
• We use DOE computers Mira and Titan and Lassen.
• Mira has 786K cores , 16 per node
• 4 large runs on the boiler have taken about 400M cpu
hours
• Large scale scientific computing problems are used to
push computer design.
• In 2021 we will reach exascale 10**18 operations per
second
• The fastest machine in the world is the DOE Summit
Machine at Oak Ridge National Lab at 10**17 floating
point operation per second
Significance for 6210
• Such problems involve multiphysics at multiple scales
• Modeling the physics by pdes is considered in SC2
• Such models use a low Mach number approximations
that requires the solution of very large systems of
equations at every time step
• The models of soot particles require the solutions of
nonlinear equations for every particle and also the
approximation of integrals .
• Time integration itself requires the use of methods that
we will consider.
• Uncertainty Quantification plays a big role in this
calculation.
Class Logistics

• Syllabus
• Grading
– Practicum
– Homeworks / Mid term and Final Exams
• Class website: Canvas
• Canvas used for submissions
• Office hours 4.30-5.30pm on Monday (with
some exceptions)
Essential Course Text

All the lecture material and many of


the examples will be taken from this
text.

The book is an advanced


undergraduate text and so the
material will be extended during the
course of the lectures.

As in the book All coding will be in


MATLAB
Background Course Text
The free textbook that comes closest to covering
the topics for the semester is
Numerical Computing with MATLAB by Cleve
Moler will be used
The book is available for free on-line at:
http://www.mathworks.com/moler/chapters.html
or you can purchase a book version at:
http://bookstore.siam.org/ot87/ , or
Amazon.com & elsewhere.
Additional references can be found on the class
website.

13
Enough About Me …
• Tell me About You
Modeling Approaches
• Predictive Capability / Decision-Making
• Approaches
– Discrete Models
– Continuous Models
– Statistical Models

• In this class, we will focus on how to


accurately and efficiently (computationally)
design and implement such models.
Approach in this Class

• Introduction (Chp 1)
• Interpolation / Integration (Chp 5 & 6)
• Root Finding and Optimization (Chp 2 & 8)
• Initial Value Problems (Chp 7)
• Computational Linear Algebra applied to Sci Comp
– Solving Linear Systems (Chp 3)
• Computational Linear Algebra Applied to Data Science
– Decomposition Methods (Chp 4)
– Data Science Techniques (Chp 9)
Chapter 1
• Finite precision arithmetic used by the
computer generates errors that are significant
enough that they may affect the final result.
Unexpected Results Example 2 Summing a Polynomial

Method A calculate (x-1)^6 directly

Method B consider the expanded out form


(x-1)^6 = 1 -6x+15x^2-20x^3+15x^4 -6x^5 +x^6

Why? Well we may not always know what the factors are
of a polynomial.

18
Method A
(x-1)^6

19
Method B
Expansion
of (x-1)^6
into its polynomial
terms

Rounding Errors
give not one zero
but many close to1

20
The Inexact Nature of Floating Point Arithmetic
% The Kahan example. In exact arithmetic f/e = 0/0:
h = 1./2.;
x = 2./3. - h; 1.0/6.0
y = 3./5. - h; 1.0/10.0
e = (x+x+x) - h; 0= 3.0/6.0 – 1.0/2.0
f = (y+y+y+y+y)-h; 0= 5.0/10.0- 1.0/2.0
qq = f/e;
Matlab Results
>e = -1.11022e-16, f= -1.11022e-16
> qq = 1.00000

21
Floating Point Number System

where

b1 b2 b3 bN −1
m =1 + + 2 + 3 +  + N −1
2 2 2 2
and
bk = 0 or 1
Floating Point (continued)
• Properties
– m: This is the mantissa. The bi’s are either zero or
one, and for this reason:
– E: This is the exponent and it is an integer that
satisfies:
– Double-precision:
– IEEE:
Floating Point (continued)
• In Practice:
– Specify two numbers, N and M
– Double-precision: M=53 and N = 11 (i.e. 64 bits)
• Machine “Zero”

• Rule of thumb:
– Single-precision: 1e-7
– Double-precision: 1e-16
Floating Point (continued)
• Realmax

• Realmin

• Rounding
Floating Point Errors

•Adding two numbers with about 8 digits of


precision:

Exact Calculated
𝑥𝑥1 = 3.1415927 × 100 𝑥𝑥1 = 3.1415927 × 100
𝑥𝑥2 = 1.2345678 × 10−4 𝑥𝑥̅2 = 0.0001234 × 100
𝑥𝑥1 + 𝑥𝑥2 = 3.14171615678 × 100 𝑥𝑥1 + 𝑥𝑥̅2 = 3.1417161 × 100

•The extra digits of precision on 𝑥𝑥2 are lost in the


calculation
26
Precision of Floating Point Numbers
• IEEE Standard

sign mantissa exponent decimal


number type
bits bits bits precision

IEEE half precision (half) 1 10 5 4 digits

IEEE single precision (float) 1 23 8 7 digits

IEEE double precision (double) 1 53 11 16 digits

IEEE quadruple precision (quadruple) 1 112 15 34 digits

• Often processors internally support extended


precision on mathematical operations

27
FLOPS

How fast is an addition though?


Error
• Error

• Relative Error

• Iterative error

• Relative iterative error


For Next Time
• Review Chapter 1
• Review Chapter 5 and refamiliarize with
interpolation

You might also like