Implementing 2DT on a Multiprocessor

Yosi Ben-Asher, Gudula Rünger, Reinhard Wilhelm, Assaf Schuster

Abstract

This paper presents a framework for implementing 2DT, a parallel functional language paradigm, on multiprocessor systems. By combining local computations with global data transformations, the authors propose a system that maximizes parallelism while minimizing the overhead of communication and process management through "context sharing" and "communication bundling."

Introduction

Parallel functional languages are notoriously difficult to implement efficiently on distributed-memory multiprocessors. The primary challenges include high overhead from small tasks (granularity), slow data movement (communication), and the need for dynamic scaling as array sizes change during execution. The authors address these issues using the 2DT (2-dimensional transformations) paradigm, which splits computation into two distinct levels: local SPMD (Single Program Multiple Data) operations on data chunks and global transformations that handle all necessary communication.

The 2DT Paradigm

The core of the 2DT approach is the separation of local logic from global data movement. Local computations are performed independently on sets of local data, while global transformations manage the redistribution of data across the network.

Local computation F vs. Global transformation G

As illustrated in the figure above, local computation (F) acts on individual data elements ($L_0$ to $L_{m-1}$) without requiring inter-processor communication. Global transformations (G) then take an array of local data and transform it into a new distribution ($K_0$ to $K_{n'-1}$), handling all the complexities of network routing and synchronization. This structured approach allows for a clear separation of concerns between algorithm logic and parallel execution.

Implementation Architecture

The implementation relies on a sophisticated mapping between software logic and hardware through a two-level hierarchy:

  • Virtual Processes (VPs): Every piece of local data is assigned a VP. Conceptually, these VPs perform local computations and participate in global transformations.
  • Abstract Processors (APs): These represent the physical hardware. Each AP manages multiple VPs, allowing the system to scale across different numbers of physical nodes.
  • VAPT (Virtual-to-Abstract-Processor Table): A central data structure that tracks where every VP is located. This allows the system to handle dynamic reallocations—such as when an array is resized—without losing track of data or requiring complex global state updates.

Optimization Strategies

To achieve high performance and minimize the "chattiness" that often plagues parallel functional implementations, the system employs two primary optimization strategies: context sharing and communication bundling.

Context Sharing makes switching between VPs on the same processor "cheap." The system ensures that VPs on the same processor share the same code and common data structures. Only the unique local data and a small process descriptor need to be swapped during a context switch.

Communication Bundling addresses the overhead of small messages. Instead of sending thousands of tiny messages between individual VPs, the APs aggregate all data destined for the same physical neighbor into a single large "bundled" message.

Mapping task graphs to bundled communication phases

This "coarse grain" strategy is depicted in the figure above, where a complex task dependency graph is mapped into a sequence of computation phases separated by explicit communication blocks. This ensures that the network is used efficiently and that the overhead of message headers and routing is minimized.

Key Insights and Results

The paper outlines a design that is inherently topology-independent. The message-preparation phase is designed to be independent of the specific network layout (e.g., hypercube vs. mesh), ensuring the language is portable across different supercomputer architectures. Furthermore, the use of the VAPT allows developers to experiment with different allocation strategies (Random, Multifit, Group-oriented) without changing the underlying execution engine.

While the paper is primarily architectural, it highlights the system's capability to handle complex operations like efficient transposes, dynamic resizing (doubling or halving VPs on the fly), and array partitioning (Split & Glue). An implementation on the iPSC/860 was initiated to validate these strategies in a real-world high-performance computing environment.

Limitations and Future Work

Despite its strengths, the system faces challenges. Breadth-first scheduling offers high parallelism but risks saturating the network with messages from different transformation steps simultaneously. Additionally, the authors note that cost estimation templates must become more dynamic to handle real-world variability. Future work may also include extending these implementation concepts to imperative base languages to broaden the utility of the 2DT paradigm.

Summary updated

BibTeX
@inproceedings{benasher1994implementing,
  author = {Yosi Ben-Asher and Gudula Rünger and Reinhard Wilhelm and Assaf Schuster},
  title = {{Implementing 2DT on a Multiprocessor}},
  booktitle = {CC},
  year = {1994},
  doi = {10.1007/3-540-57877-3\_8},
}
Figure