DEB_DD (1158343), страница 9

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

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

The method of manual reduction calculation is used for validation of the specified reduction operation. This method is based on partial reduction result calculation after each performed loop iteration. To achieve this, the RTL function dopl_() forms the iteration variable limits so that only one iteration is performed between sequential calls of the dopl_() function. Then the iteration variables limits changed for the one step and the loop is performed again.

Thus, we can manually calculate the specified reduction operation by restoring initial reduction variable value before each iteration, receiving a control after each iteration and applying the specified reduction function 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_REDVARINFO *RVar );

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

Registration of 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.

Removing 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.

Checking 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

int trcreduct_PrepareLoopIterators( s_PARLOOP *PL );

PL – pointer to the internal RTL structure that describes a parallel loop.

The function initializes iteration variables and loop structures for beginning manual reduction calculation. The function is called from the dopl_() function.

void trcreduct_PostCalcLoop( s_PARLOOP *PL );

PL – pointer to the internal RTL structure that describes a parallel loop.

The function initializes iteration variables and loop structures for continue manual reduction calculation. The function is called from the dopl_() function.

void trcreduct_StoreInitial( s_COLLECTION *RedVars );

RedVars – the collection of reduction variables calculated in the current parallel loop.

The function saves initial values of reduction variables.

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.

void trcreduct_CalculateVar( VarInfo *Var );

Var – pointer to the reduction variable description structure.

The function calculates the intermediate result of the manual reduction calculation after completion a next iteration of a current parallel loop for the specified reduction variable.

void trcreduct_Complete( void *addr, long Type );

addr – reduction variable address.

Type – reduction variable type.

Completion of 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 calculated in the current parallel loop.

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

4.4.Trace files formats

4.4.1.Loop description file

There is the special loop description file that corresponds to the program. If this file does not exist it is possible to create this file with defaults using the trace parameters. The user can select the traced program fragments to decrease the full trace size. A program loop is used as a single traced unit. For each loop and whole program the following trace levels can be specified:

  • trace is disabled (the level NONE);

  • trace loops and iterations only (the level MINIMAL);

  • the previous level plus trace variable modifications (the level MODIFY);

  • trace all loops, iterations and variable accesses (the level FULL).

The trace level of the whole program is assigned in the trace parameter file. The trace level for the each loop is assigned in the loop description file. If the trace level for the loop is not assigned then the trace level of the parent loop is accepted. If the parent loop does not exist then the trace level of the whole program is accepted.

The loop description file contains the following additional information for the full trace and each program loop: number of trace strings, trace size in bytes and number of traced iterations (for loops only). If a loop is performed several times then the loop description file contains summary information for the loop.

Additionally, for the each loop the loop number, numbers of beginning and completion loop lines, trace level and traced iteration range are presented. The user can change the trace level and traced iteration range. If trace level is not set then the trace level of the whole program are accepted.

The comments in the loop description file are marked by the ‘#’ character. All symbols after ‘#’ will be ignored.

The structure of the loop description file is the following:

# Trace size = <full trace size>

# String count = <number of trace strings>

<SL,PL> <loop number> (<number of parent loop>) [<loop rank>] {<file name>, <line number>} = <NONE, MINIMAL, MODIFY, FULL>, (<dimension>:<first iteration>, < last iteration >, <iteration step>), …

# Trace size = <loop trace size>

# String count = <number of loop trace strings>

# Count of traced iterations = <number of traced iterations>

EL: <loop number>

………

<SL,PL> <N> (<P>) [<R>] {<FILE>, <LINE>}= <NONE, MINIMAL, MODIFY, FULL>, (<I0>:<L0>, <R0>, <S0>), (<I1>:<L1>, <R1>, <S1>), …

# Trace size = <loop trace size>

# String count = <number of loop trace strings>

# Count of traced iterations = <number of traced iterations>

EL: <N>

All loop parameters are assigned after the ‘=’ symbol. The SP record corresponds to a sequential loop, the LP record corresponds to a parallel loop.

The traced iteration range is set in the brackets. If these parameters are absent, the all iterations will be traced. For the excluded iterations the variable accessing is not traced but iteration beginning events are traced.

The traced iteration range is assigned as the following:

(<dimension> : [<first iteration>] , [<last iteration >] , [<iteration step>])

<dimension> – loop dimension (beginning from 0) for which the limitations are assigned. This parameter is required.

<first iteration> – iteration number from which the iterations are traced. By default, the iterations are traced from the first.

<last iteration> – iteration number up to which the iterations are traced. By default, the iterations are traced up to the last.

< iteration step> – the step with which the iterations will be traced. By default, the 1 is used.

Iteration ranges examples:

  • (0:2,10,) – trace iteration from 2 up to 10.

  • (0:,10,) – trace iterations up to 10.

  • (0:4,,) – trace iterations from 4.

  • (0:,,3) – trace iterations with the 3 step.

Empty iterations will be removed from the trace with a special mode. This mode can be specified by using the trace parameters file.

4.4.2.Trace file

The following trace information is accumulated during execution result tracing:

  • The values of all read variables. A record in trace file is the following:
    RD: [<variable type>] <variable name> = <value>; {<file name>, <line number>}

  • Expression calculation beginning. A record in the trace file is the following:
    BW: [<variable type>] <variable name>; {<file name>, <line number>}

  • The values of all variables assigned in. A record in the trace file is the following:
    AW: [<variable type>] <variable name> = <value>; {<file name>, <line number>}

  • The values of all read reduction variables. A record in trace file is the following:
    RV_RD: [<variable type>] <variable name> = <value>; {<file name>, <line number>}

  • Beginning of expression calculation of a reduction variable. A record in the trace file is the following:
    RV_BW: [<variable type>] <variable name>; {<file name>, <line number>}

  • The values of all reduction variables assigned in. A record in the trace file is the following:
    RV_AW: [<variable type>] <variable name> = <value>; {<file name>, <line number>}

  • Reduction tracing puts in the trace file the records of the following kind:
    RV: [<variable type>] <value>; {<file name>, <line number>}

  • Skipping a group of operators in a sequential branch of the program. A record in the trace file is the following:
    SKP: {<file name>, <line number>}

  • Parallel loop beginning. A record in trace file is the following:
    PL: <loop number> (<parent loop number>) [<loop rank>] ; {<file name>, <line number>}

  • Sequential loop beginning. A record in trace file is the following:
    SL: <loop number> (<parent loop number>) [<loop rank>] ; {<file name>, <line number>}

  • Iteration beginning (putted in trace file when most nested iteration is entered only). A record in trace file is the following:
    IT: <absolute iteration index (calculated from all values of all iteration variables)>, (<iteration variable value>,<iteration variable value>,…).

  • End of parallel loop execution. A record in trace file is the following:
    EL: <loop number>; {<file name>, <line number>}

4.5.Parameters of “comparing execution results” method

The user can manage some parameters of execution result tracing module by using the file of parameters. The parameters of execution result tracing module are set in files with names USRDEBUG.*.

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 – loop description file name. This file is searched 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 loop description file. The loop description 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 loop description file. Only processor with the number TraceOptions.WrtHeaderProc creates this file.

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

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

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

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