Enabling machine learning-ready HPC ensembles with Merlin

J. Luc Peterson, Benjamin Bay, Joe Koning, Peter B. Robinson, Jessica Semler, Jeremy White, Rushil Anirudh, Kevin Athey, Peer-Timo Bremer, Francesco Di Natale, David Fox, Jim A. Gaffney, Sam Ade Jacobs, Bhavya Kailkhura, Bogdan Kustowski, Steve H. Langer, Brian K. Spears, Jayaraman J. Thiagarajan, Brian Van Essen, Jae-Seung Yeom · DOI

Introduction

Modern machine learning (ML) models are data-hungry, often requiring millions of samples to build accurate surrogate models for scientific phenomena. However, a fundamental "architectural tension" exists between ML and traditional High-Performance Computing (HPC). Supercomputers are historically optimized to run a few massive, tightly coupled simulations rather than millions of small, independent ones.

Researchers attempting to run ML-ready ensembles on standard HPC infrastructure typically encounter three major bottlenecks: traditional batch schedulers (like Slurm) struggle with millions of job submissions, simultaneous I/O can overwhelm parallel file systems, and coordinating heterogeneous workflows across CPU and GPU allocations is notoriously difficult. To address these challenges, researchers introduced Merlin, a specialized workflow framework designed to turn supercomputers into high-throughput data factories for AI training.

Methods and Architecture

Merlin is built to handle the complexity of large-scale, distributed scientific workflows through several key technical components:

  • Producer-Consumer Model: Built on top of Celery (utilizing RabbitMQ or Redis), Merlin decouples task definition from execution. "Producers" populate a central queue, while "Workers" running on HPC nodes pull tasks as resources become available. This allows for "surge computing," where workers from different clusters can be added to the same federated resource pool.
  • Shell-Centric Interface: Merlin leverages the Maestro YAML syntax, allowing scientists to define complex directed acyclic graphs (DAGs) using familiar shell commands. This makes it easier to expand a simple parameter study into a massive ensemble.
Expansion of a parameterized Directed Acyclic Graph (DAG) into a large-scale ensemble.
  • Hierarchical Task Generation: To prevent overwhelming the queue server with millions of simultaneous tasks, Merlin employs a tree-like generation algorithm. A single "root" task creates "branch" tasks, which then create "leaf" tasks (the actual simulations). This approach ensures work begins almost immediately and maintains efficient scaling.
  • Multi-Tiered Fault Tolerance: The system tracks task completion at the server, worker, and filesystem levels. If a node fails, tasks are automatically retried or can be manually cleared and resubmitted without restarting the entire ensemble.

Key Results and Scalability

Empirical testing demonstrates that Merlin adds negligible overhead—roughly 30ms per task—which is a tiny fraction of the time required for even the fastest scientific simulations. The hierarchical approach allows the "time to first sample" to remain largely independent of the total ensemble size.

Performance scaling of Merlin's hierarchical task generation, demonstrating O(N ln N) queuing time and high throughput.

Key performance metrics include:

  • Extreme Scalability: Merlin successfully enqueued 40 million simulations in just 100 seconds.
  • High Concurrency: On the Sierra supercomputer, the system managed 61,440 concurrent workers, processing approximately 1 million simulations per hour.
  • Efficiency: The hierarchical generation algorithm follows an $O(N \ln N)$ queuing time, as shown in performance benchmarks.

Real-World Applications

Merlin has been validated through several massive scientific applications:

  • 100M Fusion Dataset: Generated on the Sierra supercomputer, this landmark dataset consists of ~100 million Inertial Confinement Fusion (ICF) simulations (24TB of data), serving as a benchmark for scientific ML.
  • COVID-19 Modeling: A nested workflow using the epicast agent-based model was used to calibrate intervention strategies across multiple metropolitan areas.
  • Dataset Complexity: Compared to the largest physical science datasets in the UCI ML Repository (~11 million samples), Merlin enables datasets an order of magnitude larger and more complex.

Limitations and Future Directions

While powerful, Merlin requires a separate, persistent queue server (RabbitMQ/Redis), which can present administrative or security hurdles in some restrictive HPC environments. Additionally, its feature set for complex data-flow dependencies is still maturing compared to older frameworks like Pegasus.

Future work includes the development of the "Merlin Spellbook," a companion project providing standardized routines for active learning, surrogate building, and automated data packaging. The team also aims to improve integration with containerized environments like Singularity and Podman to streamline deployment across diverse computing sites.

Summary updated

BibTeX
@article{peterson2022enabling,
  author = {J. Luc Peterson and Benjamin Bay and Joe Koning and Peter B. Robinson and Jessica Semler and Jeremy White and Rushil Anirudh and Kevin Athey and Peer-Timo Bremer and Francesco Di Natale and David Fox and Jim A. Gaffney and Sam Ade Jacobs and Bhavya Kailkhura and Bogdan Kustowski and Steve H. Langer and Brian K. Spears and Jayaraman J. Thiagarajan and Brian Van Essen and Jae-Seung Yeom},
  title = {{Enabling machine learning-ready HPC ensembles with Merlin}},
  journal = {Future Generation Computer Systems},
  year = {2022},
  doi = {10.1016/j.future.2022.01.024},
}
Figure