The CHT-MPI library implementation
CHT-MPI: an MPI-based Chunks and Tasks library implementation
This is the page of the CHT-MPI library implementation.
CHT-MPI uses the Message Passing Interface (MPI) for communication between worker processes. Different worker processes may run on separate compute nodes in a cluster. Within each node, the CHT-MPI implementation parallelizes the work using pthreads.
For an example of a commonly used MPI implementation that can be used with CHT-MPI, see Open MPI: http://www.open-mpi.org/
CHT-MPI distributes tasks across the worker processes using work stealing. Chunks are by default stored on the same worker process where they were created, and a chunk cache mechanism is used to reduce the need for communication. See section 3 in the original Chunks and Tasks article for further details.
Compiling and running a Chunks and Tasks program using CHT-MPI
Because CHT-MPI is based on MPI, you need to compile your code using an MPI wrapper compiler like mpiCC or mpicxx.
You compile and link your code into two executable files: the main executable (parent program) and a worker program. When the parent program is executed, it can spawn new processes each of which will execute the worker program. Both parent and worker programs are linked with the CHT-MPI library file "libcht.a".
To run the program, use mpirun. Since CHT-MPI uses dynamic process creation by default, you only start one process, the parent process, and the worker processes will be created dynamically while the program is running. So, you use "mpirun -np 1", like this:
An advantage of dynamic process management is that it in principle allows for dynamically adapting the amount of resources used while the program is running.
Compiling and running a sample program
As a specific example, here follows a description of how to compile and run the Fibonacci sample code using CHT-MPI. We assume here that the CHT-MPI and Fibonacci sample source code packages cht-mpi-2.0.tar.gz and sample-fibonacci.tar.gz are placed in the user's home directory, in this example /home/elias/. First, unpack and build the CHT-MPI library:Source code
To download CHT-MPI source code, please follow this link: source code download
Click here to return to the Library implementations page.