DEB_GUID (1158345), страница 3
Текст из файла (страница 3)
For trace comparing the following command is used:
dvm red <DVM-program_name>
By default, startup is controlled by the parameters of trace comparison from base file usrdebug (see section Error: Reference source not found), corrected by the following parameters from file deb_red.par:
| EnableDynControl=0; | - disable dynamic control; |
| EnableTrace=1; | - enable trace accumulation; |
| TraceOptions.TraceMode=3; | - trace comparison mode; |
| ManualReductCalc=1; | - calculation of reduction variables according to user specifications. |
In case trace comparison errors are found, diagnostics about existence of such errors is output in stderr stream. This stream can be directed either to the screen or to a file (see sections Error: Reference source not found and Error: Reference source not found).
Diagnostics about error type, line of the source text and numbers of iterations of all nesting loops can be also outputted either to the screen, or in a file (see section Error: Reference source not found).
The structure and list of error messages of trace comparison is presented in section Error: Reference source not found.
10.6.Comparing parallel execution trace with reference one.
The parallel program is started in a mode of emulation of multiprocessor system on a workstation and the execution trace is compared with the reference one. The following command is used:
dvm dif N1 [N2 [N3]] [<cluster_options>] <DVM-program_name>
where N1, N2, N3 - sizes of processor matrix (1 1 1 by default).
By default, startup is controlled by the parameters of trace comparison from the base file usrdebug (see section Error: Reference source not found), corrected by the following parameters from file deb_dif.par:
| EnableDynControl=0; | - disable dynamic control; |
| EnableTrace=1; | - enable trace accumulation; |
| TraceOptions.TraceMode=3; | - trace comparison mode; |
| ManualReductCalc=0; | - calculation of reduction variable according to standard algorithm. |
The reduction variables are calculated in standard way. All computations of reduction variable on one processor are performed by statements of iterations, executed on this processor. The final result of reduction operation from partial results obtained on all the processors is calculated by Lib-DVM. If a program is performed on a single processor, only program statements will calculate the reduction.
In case trace comparison errors are found, diagnostics about existence of such errors is outputted to stderr stream. This stream can be directed either to the screen or in a file (see sections Error: Reference source not found and Error: Reference source not found).
Diagnostics about error type, line of the source text and numbers of iterations of all nesting loops can be also outputted either to the screen, or in a file (see section Error: Reference source not found).
The structure and list of error messages of trace comparison is presented in section Error: Reference source not found.
If there is no differences in traces the program can be executed with real data (see section Error: Reference source not found).
If differences are detected, but the error in program is failed to find using reference trace and trace comparison diagnostics, a user can accumulate trace on each processor during executing parallel version of the program on required processor grid (see section Error: Reference source not found).
If during the parallel program execution (or during its emulation on one workstation) error situations arise on some processor (or differences in reference and current traces are detected) the program can hang-up. If to stop execution by CTRL-C, the standard output streams directed into files can be loused. In such case stderr stream should not be directed into files.
A point of hang-up or abnormal program termination can be detected, if to enable the program system trace before the program startup (see section Error: Reference source not found). Last records in system trace allow to determine the program point, where crash situation occurred.
10.7.Accumulating parallel program trace.
The following command is used:
dvm ptrc N1 [N2 [N3]] [<cluster_options>] <DVM-program_name>
where N1, N2, N3 - sizes of processor matrix (1 1 1 by default).
By default, startup is controlled by the parameters of user trace accumulation from the base file usrdebug (see section Error: Reference source not found), corrected by the following parameters from file deb_trc.par:
| EnableDynControl=0; | - disable dynamic control; |
| EnableTrace=1; | - enable trace accumulation; |
| TraceOptions.TraceMode=1; | - trace comparison mode; |
In case trace accumulation errors are found, diagnostics only about detecting such errors is outputted to stderr stream. This stream can be directed either to the screen or in a file (see sections Error: Reference source not found and Error: Reference source not found).
Diagnostics about error type, line of the source text and numbers of iterations of all nesting loops can be also output either to the screen, or in a file (see section Error: Reference source not found). The trace is accumulated on each processor in separate file, for example with names 0.trd, 1.trd, 2.trd and so on.
The structure of accumulated trace files is presented in section 14.
10.8.Parallel execution with real data.
If no differences are detected at previous steps it is possible to consider the program working correctly on test parameters. Now a user can proceed to parallel execution of the program on workstation cluster with real parameters.
The following commands are used:
for compilation:
dvm c [C-DVM-converter_options] <DVM-program_name>
dvm f [F-DVM-converter_options] <DVM-program_name>
for execution:
dvm run [N1 [N2 [N3]]] [<cluster_options>] <DVM-program_name>
where N1, N2, N3 - sizes of processor matrix (1 1 1 by default).
By default, startup is controlled by the parameters from the sets, specified in environment variables dvmpar and usrpar.
If during the program execution with real parameters parallel execution results are not satisfied the user, he can again obtain sequential and parallel program versions to trace the program with real data. But it is necessary to take into account, that
-
Estimating trace size. the trace size can be very large. Therefore before tracing it is required to estimate its size as for whole program as for its separate parts (see sections Error: Reference source not found and.Error: Reference source not found).
-
csdeb, fsdeb and cpdeb, fpdeb commands (see section Error: Reference source not found) use converter options –d4 by default. It can increase program execution time considerably. So to obtain debug program versions for startup with real data (for example, for execution trace accumulation and comparison) other options ((-d1, -d2 or -d3) should be used.
10.9.Estimating trace size.
The following command is used:
dvm size <DVM-program_name>
By default, startup is controlled by the parameters of user trace accumulation from the base file usrdebug (see section Error: Reference source not found), corrected by the following parameters from file deb_size.par:
| EnableDynControl=0; | - disable dynamic control; |
| EnableTrace=1; | - enable trace accumulation; |
| TraceOptions.TraceMode=0; | - mode of loop description file generation; |
The command creates so called loop description file, containing, in particular, estimated sizes of trace, taking into account specified DVM-converter options (see section Error: Reference source not found) and accumulation levels (see section Error: Reference source not found).
Really, only two parameters TraceOptions.TraceLevel and TraceOptions.WriteEmptyIter from the base set and loop description file (described below) control the trace size.
10.10.Controlling size of trace file.
Created the loop description file may be modified by a user to decrease trace size. The user may set the mode of selective accumulation of the trace, completely or partially canceled accumulation of tracing for some (or all) loops. Then the command dvm size should be performed again to evaluate the size of the trace. If results are not acceptable the process should be repeated.
The loop description file contains:
-
calculated values of the trace file and number of the file lines.
-
information for each program loop (sequential or parallel) taking into account their enclosure level.
The trace entity is a program loop. Information for each program loop contains:
-
loop header
-
calculated values of the trace, a number of trace lines and a number of traced iterations for the loop
-
loop end.
Loop header contains:
-
loop type - sequential (SL) or parallel (PL);
-
loop number;
-
nesting loop number (if the loop is nested)
-
loop rank
-
reference to source program code (file name and loop beginning line number);
-
sign "=";
-
parameters, controlling loop (can be omitted);
-
commentary, beginning from sign "#" and for the end of loop header line (can be omitted).
The parameters, controlling loop (that can be modified by a user) are:
-
Trace accumulation level. If it is not specified, the level for all program, defined by parameter TraceOptions.TraceLevel (see section Error: Reference source not found) is used.
-
Traced iterations. If they are not specified, then all loop iterations are traced. If an iteration is excluded from tracing then reading from and writing to variables inside the iteration is not traced, but record corresponding to iteration beginning are put into the trace, if parameter TraceOptions.WriteEmptyIter is equal to 1 (by default it is equal to 0).
Changing loop controlling parameters influence on calculated size of the trace of separate loops and therefore on the size of full trace, the number of trace lines and account of traced loop iterations.
One of the following accumulation levels be specified both for whole program and for each loop:
-
Trace is enable (NONE level)
-
Tracing loops and iterations only (MINIMAL level).
-
tracing variable modifications (MODIFY level).
-
Full tracing (FULL level).
The numbers of traced iterations are specified in the following way:
( <dimension> : [<first iteration>] , [<last iteration>] [<iteration step>])
| <dimension> |
|
| <first iteration> |
|
| <last iteration> |
|
| < iteration step> |
|
Iteration ranges examples:
| (0:2,10,) |
|
| (0:,10,) |
|
| (0:4,,) |
|
| (0:,,3) |
|
10.11.Program startup with non-standard parameter set.
When a user starts programs with non-standard parameters (using his own parameter sets), using derived dvm-commands, described in this chapter, he should take into account the sequence, Run-Time Library follows, when corrects parameters:
-
first, one of the base parameter sets are taken from files with extensions .rel or .deb (see.section Error: Reference source not found);
-
then base set is corrected by the parameters from files, specified in environment variable usrpar (see section Error: Reference source not found);
-
then corrected set is corrected ones more by parameters from a file, defined for concrete derived dvm-command.
This sequence of parameter correction is stored in user current directory in the file current.par, used by Run-Time Library for executing any dvm-command.
11.Parameters of DVM-system.
Base set of parameters, controlling Run-Time Library operating, is provided with DVM-system and located in \PAR directory. File names reflect destination of parameters, contained in the files:
| checksum | - checksums of parameter files, specified below (they are checked only when files with extension .rel and without their correction are started). |
| statist | - parameters, specifying data accumulation modes for DVM-program performance analyzer |
| sysdebug | - parameters of build-in debugging tools of Run-Time Library; |
| syspar | - parameters, controlling Run-Time Library functioning |
| systrace | - parameters, specifying system trace modes; |
| trcevent | - list and parameters of traced events; |
| usrdebug | - parameters of dynamic control and user trace |
File name extensions reflects a way of applying given parameter subset:
| .rel | - parameter set, provided maximal speed of program execution; |
| .deb | - parameter set for debugging a user program and Run-Time Library. It contains built-in Run-Time Library tools of internal checking, system trace accumulation and output informational messages. |
| .par | - sets of correcting parameters. |
The correcting parameter files are the files with the names:
| deb_err, deb_trc, deb_red, deb_dif, deb_size, deb_ptrc | - parameters, used for execution of dvm_commands in correspondence with methods of program debugging (see section Error: Reference source not found). |
| out | - parameters of output of informational messages of Run-Time Library, acting, if environment variable dvmout=on (see sections Error: Reference source not found and Error: Reference source not found); |
| outoff | - parameters of output of informational messages of Run-Time Library, acting, if environment variable dvmout=off (see sections Error: Reference source not found and Error: Reference source not found); |
A user chooses base set, more suitable for his purposes by specifying corresponding extension in environment variable dvmpar. He can also have own parameter sets (in any his working directory and with any file names and extensions), correcting the base set. The user specifies in these files only the parameters (contained in any of files with extensions .rel or .deb), which he wishes to correct. These directories and file names must be specified in environment variable usrpar of the dvm-commands startup file (see section Error: Reference source not found).















