debugDDe (1158408), страница 10

Файл №1158408 debugDDe (Раздаточные материалы) 10 страницаdebugDDe (1158408) страница 102019-09-18СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 10)

Thus, we can manually calculate the specified reduction operation by restoring initial reduction variable value after each iteration and applying the specified reduction operation for an intermediate values.

The following functions are intended for work with the reduction variable-table and performing manual reduction calculation:

void trcreduct_Insert(s_REDVAR* RVar )

RVar

pointer to an internal RTL structure that describes the reduction variable

The function registers the reduction variable in the variable-table. The function is called when a user defines the reduction variable.

REDUCT_INFO* trcreduct_Find( void* addr )

addr

variable address.

The function finds reduction variable description structure by the variable address. It returns NULL if a reduction variable with the specified address is not registered.

void trcreduct_Remove( s_REDVAR* RVar )

RVar

pointer to an internal RTL structure that describes the reduction variable.

The function removes the reduction variable from the variable-table. The function is called when the reduction calculation is completed.

int trcreduct_IsReduct( void *addr )

addr

variable address.

The function checks registration of the reduction variable with the specified address in the variable table.

void trcreduct_VarDestructor( VarInfo *Var )

Var

pointer to the reduction variable description structure.

Destructor of the reduction variable description structure.

void trcreduct_StoreInitial(s_REDVAR* RVar)

RVar

pointer to an internal RTL structure that describes the reduction variable.

The function saves the initial value of the reduction variable.

void trcreduct_Calculate(void)

The function calculates the intermediate result of the manual reduction calculation after completion a next iteration of a current parallel loop or next parallel task.

void trcreduct_CalculateVar( VarInfo *Var )

Var

pointer to the reduction variable description structure.

The function calculates the intermediate result of the manual reduction calculation for the specified reduction variable.

void trcreduct_Complete( void *addr, long Type )

addr

reduction variable address.

Type

reduction variable type (rt_INT, rt_LONG, rt_FLOAT or rt_DOUBLE).

The function completes the manual reduction calculation for the specified reduction variable. The function puts the reduction result into the trace.

void trcreduct_CopyResult( s_COLLECTION *RedVars )

RedVars

the collection of reduction variables that are calculated in the current parallel structure.

The function copies the calculated reduction results into the specified reduction variables.

6.5.7Parameters of comparing execution results sub-system

The comparing execution results sub-system uses the same technique of parameter specifying as dynamic control. The execution result tracing uses the following parameters:

EnableTrace – flag to enable or disable execution result tracing performance. If it is equal to 0 then tracing is disabled.

ManualReductCalc – reduction calculation mode. The manual reduction calculation method is used if this parameter is equal to 1.

TraceOptions.FileLoopInfo – trace configuration file name. This file is looked in the TraceOptions.TracePath directory.

TraceOptions.TraceFile – the name of the standard trace file. This file is looked in the TraceOptions.TracePath directory. This parameter is used only in the trace-comparing mode.

TraceOptions.ErrorFile – the name of diagnostic output file. This file is used if parameter TraceOptions.ErrorToScreen is equal to 0. If system cannot open the file, the error messages will be output to the screen.

TraceOptions.Ext – extension of trace files. The name of a trace file is formed by using the following rule: <processor number>.<TraceOptions.Ext>. The trace file will be created in the TraceOptions.TracePath directory. This parameter is used only in the trace accumulation mode.

TraceOptions.Exp – exactitude of a float number comparison in the trace-comparing mode.

TraceOptions.WrtHeaderProc – the number of a processor that forms trace configuration file. The trace configuration file will contain trace size estimations for the specified processor. The summary trace size estimation can be got by launching the program on a single processor.

TraceOptions.TracePath – the directory of trace files.

TraceOptions.TraceMode – the mode of execution result tracing:

0 – generate trace configuration file. Only processor with the number TraceOptions.WrtHeaderProc creates this file;

1 – accumulate trace into the file <processor number>.<TraceOptions.Ext>;

2 – join of the two previous modes;

3 – compare the execution result trace with the standard trace file TraceOptions.TraceFile.

TraceOptions.TraceLevel – the default trace level. It is used only in the trace accumulation mode. The possible values:

0 – disable tracing (level NONE);

1 – trace beginning and finishing loops and task regions, beginning iterations and parallel task only (level MINIMAL);

2 – the previous level plus trace variable modifications (level MODIFY);

3 – trace all events (level FULL).

TraceOptions.SpaceIndent – the indent size that is used in the trace files.

TraceOptions.ErrorToScreen – if this parameter is not equal to 0 then all diagnostic messages will be output to the screen.

TraceOptions.TableTraceSize – increment size of the trace table.

TraceOptions.HashIterIndex and TraceOptions.HashIterSize – hash-table parameters.

TraceOptions.ReductHashIndexSize, TraceOptions.ReductHashTableSize and TraceOptions.ReductVarTableSize – the parameters of the reduction variable-table.

TraceOptions.SaveThroughExec – the trace will be written into the file during program execution if this parameter is not equal to 1. Otherwise the trace will be accumulated in the memory and written after program completion. You can enable this mode only if the trace configuration file is existing.

TraceOptions.PrintStatistic – flag to enable or disable output of the trace statistics.

TraceOptions.WriteEmptyIter – if it is equal to 0 then the empty iterations are not put into the trace.

TraceOptions.AppendErrorFile – the mode of a diagnostic file usage. The file will be cleared each time before program startup if the parameter is equal to 0.

TraceOptions.MaxErrors – the maximum count of errors after that the trace accumulation or comparing is disabled.

7Diagnostic messages of the dynamic debugger

Table 1. The messages of dynamic control of DVM-directives

Error message

Description

Writing to read-only variable <var>

Writing to read-only variable is detected.

Using non-initialized 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 is detected.

Access to non-local element <elem>

Access to non-local element of distributed array is detected.

Writing to shadow element <elem> of array

Writing to shadow element of array is detected.

Data dependence in loop due to access to element <elem>

Data dependence in parallel loop is detected.

Using shadow element <elem> before asynchronous shadow renew competed

The dynamic debugger detects access to a shadow element before asynchronous shadow renew competed

Writing to remote data buffer <var>

Writing to remote data buffer is detected.

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.

Reading remote element %s in sequential branch

Access to non-local array element in sequential branch of program is detected.

WAIT for reduction without START

Waiting for asynchronous reduction completion is issued without Start asynchronous reduction.

Using element outside of array limits: <elem>

Access to element of array beyond its limits.

START for reduction without WAIT

The wait operation is missing for started asynchronous reduction calculation.

Reduction operation was not started

The reduction variable is specified but the reduction calculation is never performed.



Table 2. The messages of comparing execution results

Error message

Description

Bad file structure

It is reported when any non-correspondence of trace or loop description file is detected.

Undefined keyword

It is reported if unknown keyword appears in trace or loop description file.

Bad command syntax

It is reported, if wrong parameters appear after keyword.

Can't open a file <file name>

Specified file can’t be open on reading or writing.

Trace file is empty

Specified trace file exists, but it is empty.

Bad trace structure (missing current program construct)

It is reported, if iteration or task beginning or structure completion event occurs without correspondent structure beginning event.

No current program construct

It is reported if iteration or task beginning or structure completion event occurs without corresponding structure beginning event.

Unexpected task or iteration of loop

It is reported if iteration or task beginning event occurred, but there is no correspondent record in reference trace.

Double execution of task or iteration, No = <iteration number>

It is reported if iteration or task beginning event occurs for already executed loop iteration or task. Absolute iteration number is reported.

Unexpected execution of program construct

It is reported if structure beginning event occurs, but there is no correspondent record in reference trace.

Abnormal loop exit

It is reported if record of loop end is not corresponds to the record of loop beginning.

Unexpected use of variable

It is reported if there is no record in reference trace for variable access event.

Unexpected trace record

It is reported if there is no record in reference trace for an event of completion of self-calculation block in the sequential branch.

Different <type> values: <standard value> != <current value>

Different values of the same variable are detected for current event and in reference trace record.

Different <type> values of reduction variable: <standard value> != <current value>

Different values of reduction operation are detected for current event and in reference trace record.



Характеристики

Список файлов учебной работы

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
7021
Авторов
на СтудИзбе
260
Средний доход
с одного платного файла
Обучение Подробнее