DEB_DD (1158343), страница 6
Текст из файла (страница 6)
(<count> times)<error message>
where
<process number> – processor number where the error occurs. The processor number is printed only in the case of running the program on a several processors.
<context> – context description where the error occurs. It can has one of the following forms:
Sequential branch – the error occurs in the sequential branch of the program.
Loop( No(N1), Iter(I1,I2,…) ), …, Loop( No(Nm), Iter(I1,I2,…) ) – the error occurs during m-dimensional nested loop execution.
<file> – the file name where the error occurs.
<line> – the line number where the error occurs.
<count> – number of repetitions of this error in the context. It is printed only when a summary information about all detected errors is printed.
<error message> – error description message. The list of all possible messages is showed in the following table:
| Error message | Description |
| Writing to read-only variable <var> | Writing to read-only variable is detected. |
| Using non-initialized private variable <var> | Access to non-initialized variable is detected. |
| Using non-initialized element <elem> | Access to non-initialized array element is detected. |
| Using variable <var> before asynchronous reduction competed | Access to reduction variable before reduction operation completion. |
| Access to non-local element <elem> | Access to non-local element of distributed array. |
| Writing to shadow element <elem> of array | Writing to shadow element of array. |
| Shadow element <elem> was not updated | Access to shadow elements before completion of shadow renew operation. |
| Data dependence in loop <elem> | Data dependence in parallel loop is detected. |
| WAIT for shadow renew without START | Operation of waiting for shadow renewal is issued without start of shadow renew operation. |
| Double WAIT for shadow renew | Repeated operation of waiting for shadow renewal. |
| Write to exported element before shadow renewal | Updating exported element of array before completion of shadow renewal. |
| Writing to remote data buffer <var> | Writing to remote data buffer. |
| Write to remote element <elem> in sequential branch | Access to array element in sequential branch of program without preliminary testing that the element is located on current processor. |
| WAIT for reduction without START | Waiting for asynchronous reduction completion is issued without Start asynchronous reduction. |
| Using an element outside of array <elem> | Access to element of array beyond its limits. |
4.The “Comparing execution results” method
4.1.“Comparing execution results” method overview
4.1.1.Trace accumulation
The following trace information is accumulated in a trace file:
-
Values of all variables accessed for reading.
-
Values of all variables accessed for writing.
-
Results of reduction operations.
-
Beginning of a parallel or sequential loop.
-
Beginning of iteration.
-
End of a parallel or sequential loop.
Each record in the trace file has reference to a line of the source program.
Since this method requires considerable overhead the means to control trace detailing are provided.
The content of a special file (loop description file) determines detailing of the trace. This file contains description of all program loops.
To decrease trace size the following accumulation levels are provided:
-
Only the information about loops and iterations are accumulated.
-
In addition to the previous level the information about variable modifications are accumulated.
-
In addition to the previous level the information about all usage of the variables are accumulated.
Furthermore, you can specify for each loop an iteration range, which the information about variable usage will be accumulated for.
4.1.2.Trace comparing
In the comparing mode, the trace-file is read into the memory before program startup. The structure of trace in the memory is formed by the same functions that are used in the accumulation mode. As result, we have the same trace structure in the memory both after accumulating and after reading the trace.
Then during program execution the occurred events are compared with reference ones.
There are the following singularities of parallel program execution:
-
Values of reduction variables can be different in the sequential and parallel modes. Therefore comparing values of reduction variables inside a parallel loop isn’t performed.
-
In the parallel mode, an order of parallel loop iterations can be changed. Therefore at the iteration beginning the corresponding reference trace record is searched for and set as current.
-
In the parallel mode, a sequential branch can miss statements, which calculate and assign values to non-local elements of distributed arrays.
-
Inside the parallel loop some references to variables used for calculation of reduction maximum or minimum may be missed in the sequential or parallel modes.
4.1.3.Checking reduction operations
Reduction variable accumulation has a special implementation. The values of reduction variables inside a parallel loop aren’t compared with reference ones. Comparison is performed only for reduction result.
There are two ways to calculate a reduction operation. The first way is a standard method of reduction performance. Program statements inside an iteration perform all computations of a reduction variable on the its own processor. The result of reduction operation between processors is computed by Lib-DVM. If a program is performed on a single processor, only program statements will compute the reduction.
The second way is emulation of performing each iteration on a separate processor. At the beginning of iteration, the initial value is assigned to reduction variable. The initial value is stored before loop beginning. Upon end of iteration, the reduction is performed by Lib-DVM according to specified reduction function.
If a program specify the reduction function correctly, the reduction results will the same for both ways.
4.2.Structure of comparing execution results module
The structure of tracing is divided into two parts. The first part represents a hierarchy exposition of program loops. It maps an enclosure of loops, parameters of trace gathering for the each loop and other information. The loops hierarchy and their parameters are read from the loop description file when tracing is initialized. If the given file is not specified or its structure is broken, the loop description structures are formed during trace gathering. Note that in the trace-comparing mode, the given file is not read and the loop parameters are taken from the standard trace file.
The array of trace records represents the second part of tracing. This array uses TABLE structure. During trace accumulation, the coherence of trace records and loop description structures is supported. When a new event of loop beginning occurs, the pointer to the corresponding loop description structure is stored with the new trace record. If the loop description structure is absent, a new loop description structure with defaults is dynamically created.
The each trace record of the loop beginning keeps trace record numbers of the all iteration of the loop. The hash-table structure is used for keeping these numbers.
Figure 4. Trace structure
Loop description structure.
typedef struct tag_LOOP_INFO
{
long No;
char File[MaxSourceFile];
unsigned long Line;
enum_TraceLevel TraceLevel;
enum_TraceLevel RealLevel;
byte bSkipExecution;
s_COLLECTION cChildren;
byte IsParallel;
byte Rank;
s_REGULARSET Limit[MAXARRAYDIM];
s_REGULARSET Current[MAXARRAYDIM];
s_REGULARSET Common[MAXARRAYDIM];
long CurIter[MAXARRAYDIM];
struct tag_LOOP_INFO* pParent;
unsigned long Bytes;
unsigned long StrCount;
unsigned long Iters;
}
LOOP_INFO;
No – loop number.
File – loop file name.
Line – line number of loop beginning.
TraceLevel – the loop trace level (full, only variable modifications, minimal or disabled).
RealLevel – the trace level that is actually used for the loop.
bSkipExecution – it is equal to 1, if the tracing of the current loop execution is diabled.
cChildren – a set of subordinate loops. It keeps pointers to the LOOP_INFO structures.
IsParallel –flag of parallel or sequential loop.
Rank – loop rank.
Limit – iteration limitations of loop tracing.
Current – current ranges of loop iterations.
Common – the most common limits of loop iterations.
CurIter – the current values of iteration variables.
pParent – refer to the parent loop description.
Bytes – size of full trace of the loop.
StrCount – the string count of trace of the loop.
Iters – the number of trace loop iterations.
The following structures describe trace records types.
The following record describes possible skip of group of operators in a sequential branch of the program after checking on the membership of an array element to the current processor:
typedef struct tag_SKIP
{
byte RecordType;
char File[MaxSourceFile];
unsigned long Line;
}
SKIP;
RecordType – trace record type.
File – file name.
Line – line number.
The following record describes the loop beginning:
typedef struct tag_LOOP_BEGIN
{
byte RecordType;
char File[MaxSourceFile];
unsigned long Line;
long Parent;
long LastRec;
struct tag_LOOP_INFO* LoopInfo;
HASH_TABLE hIters;
}
LOOP_BEGIN;
RecordType – trace record type.
File – file name.
Line – line number.
Parent – trace record number of parental loop.
LastRec – the number of trace record of the loop completion.
LoopInfo – pointer to the loop description structure.
hIters – hash-table that keeps numbers of iteration beginning.
The following record describes the loop completion:
typedef struct tag_LOOP_END
{
byte RecordType;
char File[MaxSourceFile];















