Streaming Realtime Workflows at the Light Sources
Harinarayan Krishnan, Computer Systems Engineer Computational Research Division, Data Analysis & Visualization Group
Streaming Realtime Workflows at the Light Sources Harinarayan - - PowerPoint PPT Presentation
Streaming Realtime Workflows at the Light Sources Harinarayan Krishnan, Computer Systems Engineer Computational Research Division, Data Analysis & Visualization Group What is a workflow? A workflow consists of an orchestrated and
Harinarayan Krishnan, Computer Systems Engineer Computational Research Division, Data Analysis & Visualization Group
A workflow consists of an orchestrated and repeatable pattern
resources into processes that transform materials, provide services, or process information.
Page
http://www.gridprovenance.org/applications/DLR.html
Page
https://www.researchgate.net/publication/320237199_Development_of_Advanced_Analysis_Toolkit_for_Turbulent_Bubbly_Flow_Sim ulations/figures?lo=1
Realtime Steering
Page
https://www.semanticscholar.org/paper/Improved-%24%24T_%7B2%7D%5E%7B*%7D%24%24-T-2-% E2%88%97-determination-in-23Na%2C-Niesporek-Umathum/c16507726ba126426a58db5172aa222a57b50e13/figure/2
Page 7
Max IV, Lund, Sweden ALS, Berkeley, US SSRL/LCLS, Stanford, US Sprint8/SACLA, Japan Elettra/FERMI, Trieste, Italy PSI, Switzerland …and many more
Page
Page
Page
Page
“Under the ideal situation, where we have very high- contrast samples, we’ll be able to image at the x-ray wavelength, which nobody else can do. COSMIC is going to bring x-ray microscopy much closer to the capabilities of electron microscopy, but with the added benefit of x-rays, which is that you can penetrate lots of material.” ~ David Shapiro (COSMIC, ALS)
Page
We start with a use case: Ptychography is one of the most data intensive beamlines.
12
Page
Page
Ptychography is similar to Scanning Microscope but trades greater complexity for higher resolution
14
Page
Overlap and average frames. FFT For each pixel replace magnitude with experimental value Inverse FFT Multiply Object with Probes
Iterationi
Zone Plate Lens
Ptychography Frame Stack
X-ray Beam Scan Direction
Diffraction Pattern
Scanned Sample CCD Detector
Final Output
15
Page
SHARP: Scalable Heterogeneous Adaptive Real-time Ptychography
CAMERA developed SHARP: A collection of algorithms packaged as useable software for Ptychographic reconstruction
RAAR: Relaxed Averaged Alternating Reflections ADMM: Alternating Direction of Method of Multipliers
16
Ptychography image using the same data. Traditional STXM image. SEM image .
Resolution of about 10 nm.
Page
US researchers have used soft X-ray Ptychography to image structures at 5 nm scale. The resolution, obtained at Berkeley Lab's Advanced Light Source, is the highest resolution ever achieved with X-ray microscopy
https://microscopy-analysis.com/editorials/editorial-listings/us-researchers-claim-x-ray-microscopy-record
US researchers claim X-ray microscope record
Page 18
Experiment Control 1 Trigger Reconstruction 4 CXI file Framegrabber / Camera control 2 UDP TIFF Pre-processing 3 metadata 5
Page 19
Experiment Control 1 Trigger Reconstruction 4 Framegrabber / Camera control 2 UDP Pre-processing 3 5 1 frame / second
time / sample setup (s) 600
samples or time points / user
25 time/ user setup (s) 1200 Total: 1200 + (600*25) 4.5 Hours!
time / scan (detection AND exposure): 300 (s)
feature is found.
Reconstruction can only run after all frames have been acquired! ~Minutes
Page 20
Experiment Control 1 Trigger SHARP reconstruction 4 Framegrabber / Camera control 2 UDP Pre-processing 3 5 TIFF TIFF TIFF
Page
Overlap and average frames. FFT For each pixel replace magnitude with experimental value lFFT Multiply Object with Probes
Zone Plate Lens
Ptychography Frame Stack
X-ray Beam Scan Direction
Diffraction Pattern
Scanned Sample CCD Detector
Outputi Iterationi
21
Page
Overlap and average frames. FFT For each pixel replace magnitude with experimental value lFFT Multiply Object with Probes
Zone Plate Lens
Ptychography Frame Stack
X-ray Beam Scan Direction
Diffraction Pattern
Scanned Sample CCD Detector
Outputj Iterationj
22
Page
Overlap and average frames. FFT For each pixel replace magnitude with experimental value lFFT Multiply Object with Probes
Zone Plate Lens
Ptychography Frame Stack
X-ray Beam Scan Direction
Diffraction Pattern
Scanned Sample CCD Detector
Outputk Iterationk
23
Page
Overlap and average frames. FFT For each pixel replace magnitude with experimental value lFFT Multiply Object with Probes
Zone Plate Lens
Ptychography Frame Stack
X-ray Beam Scan Direction
Diffraction Pattern
Scanned Sample CCD Detector
Final Output Iterationn
24
Page
What
When
analysis, or iterative analysis
26
Page
pipelines
27
Page
User Facilities Compute Resources Algorithms Performance
28
Page 29
What it is: A distributed task execution library
batch systems. Enables developers to create and run custom workflow environments
Page 30
Page 31
1.Identify and setup resources 2.Launch services 3.Connect network 4.Execute graph Execution steps
Handler / event loop Task 1 Task 2 Task N
User / local computer Compute cluster Experiment / data acquisition
Page
remote event loop remote event loop
32
User / local computer Compute cluster Experiment / data acquisition
1.Identify and setup resources 2.Launch services 3.Connect network 4.Execute graph Execution steps
master event loop
Page
Graphical User Interface (GUI)
remote event loop
frame grabber exp. contr
remote event loop
process images ptych
P
33
User / local computer Compute cluster Experiment / data acquisition
1.Identify and setup resources 2.Launch services 3.Connect network 4.Execute graph Execution steps
master event loop
remot e contr
elog
Control Network
Page
Graphical User Interface (GUI)
remote event loop
frame grabber exp. contr
remote event loop
process images ptych
P
34
User / local computer Compute cluster Experiment / data acquisition
Execution steps
master event loop
remot e contr
elog
1.Identify and setup resources 2.Launch services 3.Connect network 4.Execute graph
Data Network
Page
Graphical User Interface (GUI)
remote event loop
frame grabber exp. contr
remote event loop
process images ptych
P
35
User / local computer Compute cluster Experiment / data acquisition
Execution steps
master event loop
remot e contr
elog
1.Identify and setup resources 2.Launch services 3.Connect network 4.Execute Graph
10G Network Visualize Results Write Output
Page 36
Page
(GUI)
master event loop
Dask Client
remote event loop
Dask Server
38
User / local computer Compute cluster
Execution steps 1.Send Workflow 2.Execute Tasks 3.Dynamically decide which tasks to execute next
Write Output
Dask Workers Dask Workers Dask Workers Tomogram Stream Task N Task 3 Task 2 Task 2 Task 2
Conditional
Task N
Experiment / data acquisition
Page
Graphical User Interface
master event loop
Dask Client
remote event loop
Dask Server
39
User / local computer Compute cluster Experiment / data acquisition
Execution steps 1.Send Workflow 2.Execute Graph 3.Return result 4.Visualization updates
Write Output
Dask Workers Dask Workers Dask Workers
1.Read 2.Normalize 3.Remote Outlier 4.Remove Stripe 5.Padding 6.Reconstruction 7.Crop 8.Circular Mask 9.Output
Tomography
Page 40
Scalable Execution: Grazing-incidence small-angle scattering (GISAXS)
User / local computer
Compute cluster
Execution steps
1.Locally Construct Model 2.Run algorithm at Compute Facility 3.Return result
Write Output
(GUI)
master event loop
Dask Client
remote event loop
Dask Server
Model1
Dask Workers Dask Workers
Piz-Daint
(GUI)
master event loop
Dask Client
remote event loop
Dask Server
Modelj
Dask Workers Dask Workers
(GUI)
master event loop
Dask Client
remote event loop
Dask Server
Modeln
Dask Workers Dask Workers Dask Workers
Over 200+ Miles!
Page
Page
https://www.nature.com/articles/s41467-018-03401-x Ptycho-Tomography scan resolving chemical states in three dimensions at 11 nm spatial resolution
Page 43
A framework for real-time data processing
Nanosurveyor: a framework for real-time data processing Advanced Structural and Chemical Imaging 3:7 (2017).
Page