pred_guid-e (1158366)
Текст из файла
8
Predictor of DVM-programs execution
User’s guide.
October 1999
Keldysh Institute of Applied Mathematics
Russia Academy of Sciences
Table of contents
1 Introduction 3
2 Trace file generation 3
3 Representation of the program as an hierarchy of intervals 3
4 Setting flags for LIB-DVM 4
5 Compilation and execution of the program 4
6 Preparation of the processor system configuration file 5
7 Predictor command line options 6
8 Results of Predictor’s work 6
9 Protocol of Predictor’s work 8
1Introduction
The predictor is intended for performance analysis and performance debugging of DVM-programs without usage of a real parallel computer (access to which is usually limited or complicated). With the predictor user can get the predicted temporal characteristics of execution of his program on MPP or workstation cluster in more or less detail.
The predictor is the system for processing the trace information gathered by LIB-DVM system during program execution on a workstation and consists of two major components: trace interpreter (PRESAGE) and time estimator (RATER). The trace interpretation, using trace information and user-defined parameters, calculates and displays extrapolated time characteristics for program execution on MPP or on workstation cluster, calling functions of time estimator, which simulates parallel DVM-program execution. In fact, time estimator is a model of LIB-DVM library, low level message passing system and hardware.
The performance of parallel programs on multiprocessor computers with distributed memory is determined by the following major factors:
-
program parallelism - a part of parallel calculations in the total volume of calculations;
-
balance of processor load during parallel calculations;
-
time needed for execution of interprocessor communications;
-
degree of overlapping of interprocessor communications with calculations.
2Trace file generation
Before running the Predictor it is necessary to execute the analysed DVM-program on a workstation in order to collect the trace information (trace file), which is used by the Predictor as input data. Collecting the trace information consists of the following stages:
-
Splitting the program into intervals (mark the program parts which are especially interesting for user).
-
Setting necessary flags for LIB-DVM for creating trace file during the program execution.
-
Program compilation and execution.
3Representation of the program as an hierarchy of intervals
Interval is a sequence of program operators, for which the prediction of various time characteristics is performed as for the separate information item. The whole program is an interval of the highest (zero) level. This interval can contain several intervals of the next (first) level. Parallel loop, sequential loop, and any operator sequence marked by the programmer can be considered as an interval. First level intervals can contain second level intervals etc. Each parallel loop is considered as a separate interval and called parallel interval. Parallel interval can contain intervals of the lower levels, these low level intervals are also called parallel intervals. If an interval is not parallel and contains only sequential calculations, it is called sequential. An interval is called combined if it contains (taking into consideration the lower-level intervals) both parallel and sequential calculations.
Time characteristics are extrapolated not only for the whole program, but also for each interval in it. Repeated execution of an interval can be considered as the execution of a separate program containing the multiplied interval operator sequence, which was executed during the real parallel program execution, on the same processors. Actually, the characteristics of intervals which are executed many times, are calculated during each execution of the intervals. Intervals that belong to the same higher level interval are identified by the source file name and a line number, which corresponds to the beginning of the interval, and optionally by some integer number attributed to the interval by the programmer.
For example, it is possible to define every iteration of the loop as a separate interval by marking the loop body as an interval and using the loop index as an integer expression. Alike, it is possible to receive characteristics of odd or even loop iterations or characteristics of the procedure execution with defined parameter values.
Interval program splitting is controlled on it’s compilation. Programmer can set some compilation regime that it will be such intervals as sequential loops, containing parallel loops, or all sequential loops in the hole program, or marked program operators. Compiler’s options, that control program splitting on intervals are explained in accordance user manuals (see “C-DVM compiler user guide”, “Fortran-DVM compiler user guide”).
4Setting flags for LIB-DVM
As it is noted in the installation guide, dvm.bat and usr.par files should be copied into a directory for DVM program translation and execution. Parameters
| Is_DVM_TRACE=1 | /* trace on/off */ |
of the usr.par file set trace accumulation mode.
5Compilation and execution of the program
After splitting the program into intervals and setting the LIB-DVM mode it is necessary to perform the following steps:
-
Conversion of the program;
-
Compilation;
-
Execution.
For convenience, this steps can be performed with the next commands:
-
For convertation, compilation and linking DVM-program there are commands:
dvm c <C-DVM-program name>
dvm f <F-DVM-program name>
-
To run the program with trace accumulation it can be used command:
dvm runpred < DVM- program name>
As a result of program execution file <DVM-program name>.ptr is created in the current directory.
6Preparation of the processor system configuration file
The input data for modelling time characteristics of the program execution is not only the trace of the program execution on one processor, but also configuration information that describe target machine.
Conceptually, the work of the Predictor consists of three basic stages:
-
reading the trace; getting information about the interval structure, about the sequence and nesting of the support system function calls, about input and output function call parameters, and also about the time of each call execution;
-
modelling the program execution which is based on the program execution structure received on the previous stage; calculation of the necessary time characteristics of the program execution on each interval;
-
writing the calculated characteristics into HTML-files.
Configuration information in file “predictor.par” defines the characteristics of the modelled multiprocessor system and has the following structure:
// Topology (rank and extension of each dimension)
Topology[] = {1, 1}
// System type: network of work stations or firm of transputers
SystemType = network
// Communication characteristics
Tstart = 75
Tbyte = 0.2
// Comparative processors performance
ProcPower = 1.0
Lines beginning from “//” are comments. The parameter Topology defines the virtual processor system topology, its rank and size in each dimension. If the value of the parameter SystemType is network, it means that the processor system is the network of workstations, and the value transputer means that the modelled virtual machine is the transputer system. To calculate the time of transmission of n bytes the linear approximation is used:
T = Tstart + n * Tbyte,
where
| Tstart | - start time of the data transmission settings (in mksec), |
ProcPower - defines the ratio of the productivity of the processor on which the Predictor is running to the productivity of the processor on which the parallel program will be run.
Order of the parameters is not essential.
7Predictor command line options
To start the Predictor the following command line is used:
predictor <par_file> <trace_file> <html_dir> [<processor>]
where
| <par_file> | - parameter file name; |
| <trace_file> | - name of the file with trace information; |
| <html_dir> | - name of the directory where HTML-pages with the program results are output |
| <processor> | - processor topology i.e. extension in every dimension of processors mesh. This parameter is like to Topology parameter in the configuration file and override one. |
All command line parameters are compulsory.
For accommodative Predictor run there is a command
dvm pred [processor matrix] <DVM-program name>
Program execution is controlled by following environ variables (see dvm.bat file):
-
Pred_sys – configuration file name, which describe target machine;
-
Pred_vis - name of Web browser.
File
<DVM-program name>.ptr,
is needed for Predictor normal work. It can be made by dvm runpred command.
Result of Predictor work is saved in the directory
<DVM-program name><processor matrix>.prd
which contain a lot of html files. If Web browser name is set, then it is called just after program termination.
8Results of Predictor’s work
Structure of the output HTML-files is the same as the interval structure in program. Every HTML-file corresponds to some interval and contains data characterising the interval, the integral characteristics of the program execution on the interval and also links to the HTML-files with the information about nested intervals.
Any DVM-program can be divide onto the intervals, which types is following: hole program execution is the high level (0) main interval. It can include some next level (1) intervals. It’s type can be parallel loops (PAR), sequential loops (SEQ) and any operator sequent marked by a programmer (USER). First level intervals can include any set of second level intervals and so on.
Every interval is identify by source program file name, the first interval operator line number, interval’s type and, may be, integer expression, which is written by programmer.
During the modeling execution Predictor calculate following program execution characteristics for every interval and every processor:
| Execution_time | – interval execution time (i.e. timespan sum when interval was current one); |
| I/O_time | – input/output times account inside the interval without communication overhead; |
| CPU_time | – is equal CPU_time_Par plus CPU_time_Seq; |
| CPU_time_Par | – Processor time of parallel calculations inside the interval; |
| CPU_time_Seq | – processor time of sequential calculations inside the interval; |
| Lost_time | – aggregate lost time inside the interval; |
| Communication | – total communication time (is the sum of communication times of all collective operations); |
| Wait_reduction | – wait reduction accomplishment communication time; |
| Wait_shadow | – wait shadow update accomplishment communication time; |
| Remote_access | – remote data access accomplishment communication time; |
| Redistribution | – arrays redistribution communication time; |
| I/O_comm | – input/output communication time; |
| Synchronization | – time of losses because dissynchronization; |
| Idle | – processor idle time; |
| Load_Imbalance | – time of imbalance of processors loading during execution of parallel; |
| Loops Overlap | – total time of overlapping of communications by calculations; |
| Reduction_overlap | – total time of overlapping of reduction operations by calculations; |
| Shadow_overlap | – total time of shadow edges renewing overlap. |
As a result of Predictor’s work it calculate integral characteristics program execution for every interval. Many of them have the same names and values as characteristics interval execution on every processor and is determine by summation of cognominal characteristics on all processors. Explanation of such characteristics is omitted. Following is the list of characteristics, which are calculated by another manner:
| Execution_time | – this time is maximum value of given interval execution time on all processors; |
| Total_time | – processors using total time, i.e. product of Execution_time by number of processors; |
| Efficiency | – efficiency coefficient is Productive_time divide by Total_time; |
| Productive_time | – is Productive_CPU_time plus I/O_time; |
| Productive_CPU_time | – is CPU_time minus Insufficient_parallelism. |
9Protocol of Predictor’s work
While Predictor is running the following information is written to the file logfile.txt in the current directory: about Predictor stages, about non processed functions, about errors encountered during the Predictor’s work.
The file can be viewed with any text editor.
Характеристики
Тип файла документ
Документы такого типа открываются такими программами, как Microsoft Office Word на компьютерах Windows, Apple Pages на компьютерах Mac, Open Office - бесплатная альтернатива на различных платформах, в том числе Linux. Наиболее простым и современным решением будут Google документы, так как открываются онлайн без скачивания прямо в браузере на любой платформе. Существуют российские качественные аналоги, например от Яндекса.
Будьте внимательны на мобильных устройствах, так как там используются упрощённый функционал даже в официальном приложении от Microsoft, поэтому для просмотра скачивайте PDF-версию. А если нужно редактировать файл, то используйте оригинальный файл.
Файлы такого типа обычно разбиты на страницы, а текст может быть форматированным (жирный, курсив, выбор шрифта, таблицы и т.п.), а также в него можно добавлять изображения. Формат идеально подходит для рефератов, докладов и РПЗ курсовых проектов, которые необходимо распечатать. Кстати перед печатью также сохраняйте файл в PDF, так как принтер может начудить со шрифтами.















