|
DIY
3.0
data-parallel out-of-core C++ library
|
DIY is a block-parallel library for writing scalable distributed- and shared-memory parallel algorithms that can run both in- and out-of-core. The same program can be executed with one or more threads per MPI process and with one or more data blocks resident in main memory. The abstraction enabling these capabilities is block-parallelism; blocks and their message queues are mapped onto processing elements (MPI processes or threads) and are migrated between memory and storage by the DIY runtime. Complex communication patterns, including neighbor exchange, merge reduction, swap reduction, and all-to-all exchange, are implemented in DIY.
DIY follows a bulk-synchronous processing (BSP) programming model. A simple program, shown below, consists of the following components:
structs called blocks,master,master.foreach(),master.exchange()diy::Master owns the blocks, put into it using the add() method. Its main two methods are foreach() and exchange(). foreach(f) calls back a function f() with every block. The function is responsible for performing computation and scheduling communication using enqueue()/dequeue() operations. The actual communication is performed by exchange().
The callback functions enqueue_local() and average() in the example below are given the block pointer and a communication proxy for the message exchange between blocks. The callback functions typically enqueue or dequeue messages from the proxy. In this way, information can be received and sent during rounds of message exchange.
More information about getting started creating blocks, assigning them to processes, and decomposing a domain can be found in the Initialization page. Complete examples of working programs can be found in the Examples page.
DIY is available on Github, subject to a variation of a 3-clause BSD license. You can download the latest tarball.
1.8.6