Chapter 3. MPITcl - an enhanced Tcl interpreter

MPITcl provides a Tcl friendly interface to the Message Passing Interface (MPI) library for parallel sequential computing. MPI is a commonly used library for parallel computing. MPITcl is not part of SpecTcl proper, rather it is a separate package. It serves as the basis for parallel batch SpecTcl.

MPItcl is an extended Tcl interpreter with additions that support Tcl scripts as MPI programs.

In this chapter we will:

Note that whle you can package require Tk in an MPITcl script, this will fail in most cluster computing environments as they are intended for batch computing. Finally, refer to the reference section for a full discussion of the MPITcl command ensemble.

3.1. MPI Concepts

MPI programs consist of a single program. Several copies of this single program are run across several cores which may, in turn be distributed across several network nodes.

A Message passing MPI allows copies of the program to exchange messages that consist of well defined data types. MPI further supports dividing the computation into distinct intercommunicating groups. Furthermore, messages have tags assocciated with them that can describe the type of information in the message.

Each instance of a program in an MPI application has one or more ranks. A program instance's rank is just an integer numbered from zero to the size of the group. A program can inquire as to its rank within all groups it belongs to.

Communication within a group is handled via group's communicator. A special communicator is predefined MPI_COMM_WORLD that communicates with all the program instances in an application.