LIB-DVM library.
Preliminary design
* October 2000 *

- last edited 11.10.00 -


Contents

1 Lib-DVM functions
2 Content of Lib-DVM
3 Approach and principles of implementation


  1. Lib-DVM functions

Lib-DVM is Run-Time System for DVM-programs execution. A parallel Fortran DVM (or C-DVM) program is translated to the program in the standard Fortran 77 (or C) language extended by Lib-DVM function calls, and to be executed according to SPMD model on the each processor program is assigned to the task. Lib-DVM functions, called when the parallel executed, are described in the and are used to document "Lib-DVM. Interface description" perform the following main operations:

  1. Run-Time System initialization and termination.
  2. Creating an abstract machine.
  3. Mapping an abstract machine.
  4. Distributed array creating and deleting.
  5. Mapping a distributed array.
  6. Mapping a parallel loop.
  7. Mapping parallel tasks.
  8. Executing reduction operations.
  9. Renewing shadow edges of distributed arrays.
  10. Creating and loading buffers for access to remote data.
  11. Executing input/output operations.

Besides of the performance of the operations above, Run-Time System must support:

  1. Dealing with the accumulation subsystem of the program execution characteristics on each processor concerned (accumulation subsystem of PPPA).
  2. Dealing with DVM-debugger.
  3. The accumulation of the system trace, that is tracing Run-Time System function calls and communication library calls. The trace is used for debugging DVM-programs, Run-Time System itself, and as the input information for a predictor.
  4. Input of the parameters, controlling the operating of Run-Time System, DVM debugger and the accumulation subsystem of the execution characteristics.

Run-Time System functions should use for message exchange two communication libraries – MPI and PVM.

  1. Content of Lib-DVM

Besides of the functions, described in document "Lib-DVM. Interface description", Lib-DVM contains a lot of functions, providing the execution of the following subsidiary operations:

  1. Message exchange operations.
  2. Dynamic allocation of the memory.
  3. Program synchronization.
  4. Input of the controlling parameters.
  5. System trace accumulation.
  6. Interaction with DVM-debugger and the subsystem of program execution characteristics accumulation.
  1. Approach and principles of implementation

To provide possibility of using different communication libraries, the set of message exchange functions was developed. The implementation of these functions for different communication libraries doesn't require considerable efforts.

  1. Run-Time System initialization and termination.

When Run-Time System is initialized:

When Run-Time System is terminated:

  1. Creating and mapping abstract machine.

It is the preparing operation for data and computation mapping on the processors, implemented through their mapping on an abstract machine.

  1. Distributed array creating and deleting.

When an array is created, the array descriptor is created, but the memory for the array is not allocated. When the array is deleted, its descriptor is deleted and the memory allocated for the array is freed.

  1. Mapping distributed array on an abstract machine.

When the array is mapped, at each processor the memory for the array elements, mapped on the processor, and for shadow edges is allocated.

  1. Mapping a parallel loop on an abstract machine.

The loop iterations, to be executed on the processor and their execution order are determined for each processor.

  1. Mapping parallel tasks on an abstract machine.

The tasks, to be executed on the processor, are determined for each processor. A parallel task startup and completion are performed by special Lib-DVM functions.

  1. Executing reduction operation.

Reduction operations are executed by gathering on the special processor (the central processor of the task) the partial results of the reduction, obtained on the processors, participating in the parallel loop execution. After evaluating the final result on the central processor it is sent to all other processors. Overlapping reduction execution with computations is implemented by parallel process simulation by regular polling for incoming messages.

  1. Renewing shadow edges of the distributed arrays.

Shadow edges renewing is implemented as asynchronous operation. Overlapping the exchanges with computations is implemented by non-blocking exchange operations.

  1. Creating and loading buffers for an access to remote data.

The size of the buffers is determined by examining on each processor the references to remote elements and the range of the loop iterations, executed on the processor. The buffer loading as well as shadow edge renewing can be overlapped with computations.

  1. Executing input/output operations.

The special versions of standard input/output programs are developed for C programs. Input of the information is performed at the input/output processor, using usual input functions. Then the information is sent to other processors in accordance with data distribution. The output data, that are not available on the input/output processor, are transferred to this processor and then are outputted using usual output functions.

Input/output for Fortran programs is implemented by the compiler similarly and special Lib-DVM functions are used for data movement between the buffer of the input/output processor and the processors, where the data are allocated.

  1. Accumulation of the trace of Lib-DVM function calls and communication library calls.

The trace is used for debugging DVM-programs, Run-Time System itself, and it is the input information for the predictor.

The trace contains the information about called functions and their parameters and the information about functioning of Run-Time System internal mechanisms. It can be accumulated in the buffer or in the file. Trace, accumulated in the buffer, is uploaded in the file, when the program is terminated. The events to be traced and the trace modes are specified in the parameter file.