- last edited 11.10.00 -
1 Lib-DVM functions
2 Content of Lib-DVM
3 Approach and principles of implementation
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:
Besides of the performance of the operations above, Run-Time System must support:
Run-Time System functions should use for message exchange two communication libraries MPI and PVM.
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:
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.
When Run-Time System is initialized:
- One of the processors concerned (input/output processor) reads the controlling parameters from the files and sends them to the other processors.
- Run-Time System, DVM debugger and accumulation subsystem of the program execution characteristics are tuned according to the input parameters.
- The buffers for the accumulation of the system trace and the program execution characteristics are created on the memory of all the processors concerned.
- Time at all the processors is synchronized.
- The messages, containing main modes of Run-Time System operating and characteristics of its execution environment are reported by a user request.
When Run-Time System is terminated:
- Accumulated system trace and the program execution characteristics are written to the files.
- The user is notified (by his request) about the program completion.
It is the preparing operation for data and computation mapping on the processors, implemented through their mapping on an abstract machine.
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.
When the array is mapped, at each processor the memory for the array elements, mapped on the processor, and for shadow edges is allocated.
The loop iterations, to be executed on the processor and their execution order are determined for each processor.
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.
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.
Shadow edges renewing is implemented as asynchronous operation. Overlapping the exchanges with computations is implemented by non-blocking exchange operations.
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.
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.
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.