1 5/19/2015 introduction to parallel programming using opencl zubair nawaz (sesame) giannis ashiotis...
TRANSCRIPT
1 04/18/23
Introduction to Parallel Programming using OpenCL
Zubair Nawaz (SESAME)
Giannis Ashiotis (ESRF)
Contents
• Why Parallel Programming
• Single core and Multicores
• GPU Architecture
• Introduction to OpenCL and pyOpenCL
• Introduction to pyFAI
• Work with pyFAI
2 04/18/23
Why Parallel Programming ?
3 04/18/23
Single Core
4 04/18/23
Multicore
5 04/18/23
CPU Vs GPU
6 04/18/23
CPU Style core
7 04/18/23Credit: Kayvon Fatahalian (Stanford)
Slimming Down
8 04/18/23Credit: Kayvon Fatahalian (Stanford)
More Space: Double the Number of Cores
9 04/18/23Credit: Kayvon Fatahalian (Stanford)
…again
10 04/18/23Credit: Kayvon Fatahalian (Stanford)
And again…
11 04/18/23
Saving yet more space
12 04/18/23
Saving yet more space
13 04/18/23
Gracious amount of parallelism
14 04/18/23
Small or large device
15 04/18/23
Heterogeneous System
16 04/18/23
Installation of OpenCL, pyopencl and pyFAI
17 04/18/23
INTRODUCTION OF PYFAISynchrotron Radiation Application
18 04/18/23
Extra path traveled by incoming waves AY
Extra path traveled by scattered waves XB
X-Ray Diffraction
Constructive interference occurs(AY − XC) = n (n is an integer)
BRAGG’s EQUATION
d
dSin
The path difference between ray 1 and ray 2 = 2d Sin
For constructive interference: n = 2d Sin
Ray 1
Ray 2
Deviation = 2
Powder Diffraction
21 04/18/23
What is a Powder?
• powder = polycrystalline solidlarge number of crystallites of mm length scale
• ideal powders (for diffraction) show random orientation of crystallites
22 04/18/23
Powder Diffraction
a single crystal
23 04/18/23
Tens of crystals hundreds of crystals
Powder Diffraction
24 04/18/23
References
• http://www.matter.org.uk/
25 04/18/23