Introduction
High-Performance Computing (HPC) has traditionally been the domain of "hero runs"—massive, tightly coupled simulations designed to push the limits of supercomputing hardware. However, the rise of Machine Learning (ML) has introduced a new paradigm: the need for millions of smaller, independent simulations to generate training data for surrogate models. Bridging this gap requires a workflow framework capable of handling "ML-ready" scale without overwhelming traditional HPC schedulers or file systems. Merlin is designed to meet this challenge, providing a resilient, high-throughput framework for massive ensemble coordination across heterogeneous resources.
The Challenge of ML-Ready HPC
Standard HPC environments face significant bottlenecks when tasked with ML workflows. Batch schedulers like Slurm or LSF are optimized for a few large jobs, not millions of individual submissions. Furthermore, parallel file systems often struggle with the metadata overhead generated by thousands of concurrent processes accessing small files simultaneously. Finally, ML workflows are inherently heterogeneous, often requiring a mix of CPU-based simulation, GPU-based training, and various post-processing steps that may span different hardware allocations or even different physical machines.
Merlin's Architecture and Methodology
Merlin addresses these issues by adopting a producer-consumer model, decoupling task definition from execution. Built on distributed technologies like Celery (task queuing), RabbitMQ (message broker), and Redis (results backend), Merlin allows for asynchronous task management. Researchers define their workflows using a shell-centric YAML interface, leveraging the bash commands they are already familiar with.
A key feature of Merlin is its ability to expand a high-level workflow definition into a massive ensemble. As shown in Figure 1, a simple Directed Acyclic Graph (DAG) with parameters is expanded into a large-scale set of samples across multiple steps.
To maintain stability at scale, Merlin employs hierarchical task generation. Instead of enqueuing millions of tasks at once, a "parent" task generates "children," which in turn generate "leaves." This recursive approach prevents the task server from being overwhelmed. Additionally, workers are programmed to prioritize consumption (running tasks) over production (creating more tasks), ensuring the system remains balanced and the queue does not grow faster than it can be drained.
Applications and Scalability
The efficacy of Merlin has been demonstrated across several high-impact domains:
- Inertial Confinement Fusion (ICF): Merlin coordinated 100 million simulations, producing 24 TB of data, including 4.8 billion synthetic images and 1.6 billion time-series.
- ICF Optimization: The framework enabled iterative loops using the HYDRA multiphysics code to re-optimize fusion targets under experimental uncertainty.
- COVID-19 Modeling: Merlin facilitated a nested workflow for the epicast epidemiological model, coordinating resources across multiple HPC centers (e.g., NERSC and ORNL) to calibrate parameters against real-world data.
Key Insights and Performance
The core strength of Merlin lies in its decoupling of the task queue from the underlying hardware. This allows "worker farms" to fill gaps in supercomputer schedules dynamically, providing natural resilience; if a node fails, Merlin can identify and resubmit the specific failed task without restarting the entire ensemble.
Performance metrics on the Sierra supercomputer highlight Merlin's capabilities:
- Extreme Throughput: Coordination of 61,440 concurrent workers, processing approximately 1 million simulations per hour.
- Low Overhead: A median system overhead of only 32.8 milliseconds per task, making it efficient for short-lived simulations.
- Massive Enqueuing Speed: Peak enqueuing speeds of 300,000 samples per second, allowing 40 million samples to be queued in roughly 100 seconds.
Conclusion and Future Directions
While Merlin represents a significant step forward, it requires an initial infrastructure investment to set up services like RabbitMQ and Redis in secure HPC environments. Future work focuses on developing more robust APIs for periodic tasks, automated data cleanup tools for massive datasets, and broader compatibility with various workflow description formats beyond the current specification. By standardizing these processes, Merlin aims to become a foundational tool for the next generation of data-driven scientific discovery.
Summary updated