Analysis Systems introduction
Luke Kreczko for SWIFT-HEP WP5
1
Good morning!
2
Key points in HEP Data Analysis
Physics
Last mile of long chain of data recording and processing.
Goals: gain insight and create new knowledge
Computing
Analysis workflow (data + software) depends on experiment, analysis group, subset of data (signal + relevant backgrounds), analysis iteration.
Flexibility is paramount.
3
WP5 key points
Seamless Access to Computing Resources
Ease of access to distributed computing resources through user-friendly interfaces and “industry standards”
Efficiency
Caching for fast iterations, portability for mapping algorithms to hardware accelerators (GPU, FPGA)
4
Anatomy of an analysis workflow
The cycle (oversimplified)
5
data
Task
Task
Task
data
Task
Task
data
Task
data
New idea/extension of existing work
Publication
create/modify code
Run analysis on laptop/cluster/grid
Understand results
New ideas for improvement,
mistakes identified, or updates
One cycle as short as a day or as long as a month
# The eternal loop of research
while True:
idea = find_new_idea_or_use_existing_work()
code = create_or_modify_code(idea)
result = run_analysis_on_any_computer_available(code)
understanding = try_to_understand_results(result)
if understanding.has_aha_moment():
publish_results(understanding)
celebrate() # Optional: do a little dance
else:
groan() # Sigh deeply and prepare for the next iteration
find_coffee() # Important: Refuel the researcher
new_ideas = generate_new_ideas(understanding)
if new_ideas.contains('Eureka'):
break # Break out of the loop to accept your Nobel Prize
else:
feedback = collect_feedback(new_ideas)
apply_feedback_to_idea(feedback)
# Sleep is for the weak; let's do another cycle!
time.sleep(for_how_long='Just a blink, I promise')
# Note: This loop does not account for weekends or holidays (which are often mythical in research)
SWIFT-HEP WP 5 in a nutshell
WP1
Analysis workflow
WP5
6
Analysis step
output
Data lake
DIRAC
caching
data
Task
Task
Task
data
Task
Task
data
Task
data
Caching Opportunities: The intermediate data at various stages of the workflow are opportune points for caching. By storing these results, we can avoid redundant computations in iterative analysis, thus saving time and resources.
SWIFT-HEP WP 5 in a nutshell
WP1
Analysis workflow
WP5
7
Virtual Analysis Facility
Analysis step
output
Data lake
Heterogeneous hardware
Specialised hardware (GPU, FPGA, etc)
DIRAC
portability
caching
GPU
capable
CPU-only
data
Task
Task
Task
data
Task
Task
data
Task
data
Adaptive Algorithms: automatically detect and utilize GPUs, FPGAs, and other accelerators when available.
Fallback Mechanism: In the absence of specialized hardware, algorithms revert to utilizing conventional CPUs without compromising functionality.
Scheduling
with
coffea-casa
8
From coffea-casa docs
Uses Dask and dask-jobqueue
The international view: IRIS-HEP
INFN: a CMS project
9
From Analysis facilities forum (28.07.2022)
SWIFT-HEP + GridPP == experiment agnostic?
10
10
*no relation to IRIS-HEP; **no relation to DIRAC
Shared Jupyter-hub via iris.ac.uk*
Can run on DiRAC**
Data lake
(WP1)
Virtual analysis facility
(WP1)
Roadmap overview
11
Dask to DIRAC interface (dask-dirac)
Connect to data lake (caching)
Specify resource requirements per analysis component (portability)
Data lake to DIRAC (via Rucio)
Virtual analysis facility
DIRAC workflow manager
Via tags (slide 26)
REST API
FileCatalog?
Closes example of what we want to achieve: Dask-based Distributed Analysis Facility (kubernetes slides)
Caching at analysis step level
WP1
WP5
1
2
3
4
Roadmap overview
12
Dask to DIRAC interface (dask-dirac)
Connect to data lake (caching)
Specify resource requirements per analysis component (portability)
Data lake to DIRAC (via Rucio)
Virtual analysis facility
DIRAC workflow manager
Via tags (slide 26)
REST API
FileCatalog?
Closes example of what we want to achieve: Dask-based Distributed Analysis Facility (kubernetes slides)
Caching at analysis step level
WP1
WP5
1
2
3
4
More on this in Sam’s talk
Analysis Grand Challenges
-
The medium for testing
13
Analysis Grand Challenges (IRIS-HEP)
IRIS-HEP are planning to verify work through several analysis grand challenges
Aiming for a realistic workflow, e.g.
→ ACG repo: https://github.com/iris-hep/analysis-grand-challenge
14
SWIFT-HEP Phase 2
15
Phase 2?
Phase 1 is a technology test/prototype
Phase 2 would be the production system:
Jupyter-hub with IRIS IAM on STFC cloud***
Sample of analyses beyond ACGs
Test phase 1 at scale
16
*no relation to IRIS-HEP; **no relation to DIRAC
Shared Jupyter-hub via iris.ac.uk*
Can run on DiRAC**
Data lake
(WP1)
Virtual analysis facility
(WP1)
✅
✅
*** These could also be institutional resources with access to both local and GridPP resources
Phase 2 Roadmap overview
17
Jupyter-hub with IRIS IAM
Workflow converter (to Dask)
Data lake to DIRAC (via Rucio)
Virtual analysis facility
DIRACX workflow manager
REST API
Would also include optimising caching and portability as analysis sample size increases.
In other words: phase 2 is a superset of phase 1.
Dask-dirac interface
WP1
WP5
1
2
4
Summary
and
Outlook
In Phase 1 WP5 aims for a prototype demonstrating the key goals on WP1 deliverables
WP5 is in progress, using AGCs as benchmark - details in Sam’s talk
Phase 2 will look towards a production system:
18
Backup slides
19
INFN: a CMS project
20
From Analysis facilities forum (28.07.2022)
But:
21
Is there a way to standardize this functionality and make it available to everyone?
Dask network layer simplified
22
Dask network layer simplified
23
Dask network layer simplified
24
So where is the problem?
Imagine network boundary between scheduler and workers
Scheduler port is accessible from workers
Worker port is ONLY accessible to scheduler if connection is recycled (part of ESTABLISHED --> firewall OK)
Default Dask operation: this can happen at RANDOM (most likely for small # of workers)
Dask network layer: A general fix
25
We know connections can be recycled and bypass firewall if they are part of an ESTABLISHED connection
We also know of a working solution in our field: The HTCondor Connection Broker
Workers, schedulers, etc connect to a SHARED_PORT
As long as SHARED_PORT is open in firewall on a node accessible to both scheduler and workers --> connection can be established
Most simple solution: Can the Dask Connection proxy be rewritten to hold worker connections?
What are the downsides for 100-1000 worker nodes?
CPU vs accelerators
No clear optimal way yet, first draft will require multiple versions of a “stage”:
26
register:
my_namespace::my_stage:
cpu: my_module.my_stage
gpu: my_module.my_stage_gpu
GPU version is used if a GPU is detected, CPU version otherwise