NORMA_DD (1158356), страница 13

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

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

At start RDDG is put on the first layer of Parallel layer scheme . It consists of the dependencies of the type

g raph-node

dependency-node

dependency-node

Then all the dependencies which have <graph node> with condition <graph node>=<dependency node> performed even for one <dependency node> of even one dependency (i.e. dependencies for all the operators which the operators of the first layer depend on) are put on the second layer. Then these two layers are corrected. If there is a dependency for the operator on the second layer, then it is eliminated from the first one. Besides if there is a node of <iteration number> type on the first layer then parallel layer subscheme is built for it recursively using Table of iterations structure and temporary graph zavit.

Procedure defined above for the first and the second layer is performed for the second and the third layers etc. till on the current layer there are only operators depend on nothing. At this moment the process of ordering ends ( the process ends in all cases as graph RDDG is acyclic).

Entry point of Data dependencies graph analyser unit is function pord, which realises given algorithm.

After end of Data dependencies graph analyser unit work unit Fortran DVM intermediate representation generator is called:

p ord beg

5.6Fortran DVM intermediate representation generator

Fortran DVM intermediate representation generator realises Parallel layer scheme by translation of Parallel layer scheme into Intermediate representation of Fortran DVM program (List FORT).

Entry point of Fortran DVM intermediate representation generator is function beg, general structure of its control is given in the following scheme.

begkf

b eg begkend begk begk1 gen_iter

ms

mssv

Function begkend receives Parallel layer scheme as an input, chooses a <layer> from it and passes it to function begk.

Function begk receives <layer> as an input, chooses a <node> and passes it to function begk1.

Function begk1 calls functions begkf, gen_iter, ms, mssv corresponding to type <node> - <statement number>, <iteration number>, <ordered group number>, <MSCS number>.

5.6.1Simple node realisation (function begkf)

Function begkf is used for realisation of node <parallel layer scheme> of <statement number> type.

General structure of function begkf control is given in the following scheme

genio

b egkf issump issumm realop loopcmc

Function begkf chooses the body of the operator from Table of operators body by <statement number> and Table of functional dependencies. If it is input-output operator it is passed to function genio for processing, otherwise - to function issump.

General structure of function genio control is given in the following scheme

inm ima

ins isa

g enio in-queue

outm oma

outs osa

Function genio generates input-output operators of Fortran language, realising constructions input-output-variable or input-output-scalar of Norma language.

Input-variable, input-scalar, output-variable, output-scalar are processed correspondingly by functions inm, ins, outm, outs. These functions generates necessary operators READ-WRITE, put them into List FORT in format of Intermediate representation of Fortran DVM program. Next line are added to the table of input file names fti or to the table of the names of output files fto.

Structure of a line from tables fti and fto

file-name

file-number

<file-number>::=<integer>

Value of <file-number> is used in generation of READ-WRITE operators as a number of canal. Table fti is used in unit Input files analyser.

Then functions inm, ins, outm, outs call correspondingly functions inm, ins, outm, outs. These functions generate operator FORMAT for operators READ-WRITE using Table of input-output formats and put this operator into List FORT in format of Intermediate representation of Fortran DVM program.

Function in-queue puts information about processed construction input-variable or input-scalar into Input variables queue. This information is used in unit Input files analyser.

Function issump analyses if there is call-external-function in processed operator, and if their is one it generates copy operators into working array of real parameters values of name-variable-on-domain ON domain-of -parameter type and iterated-variable-on-domain ON domain-of-parameter if domain-of-parameter doesn't coincide with definitional domain of variable-on-domain. Copy operators are put into List FORT in the format of Intermediate representation of Fortran DVM program. Names of working arrays are put into Symbol table.

Function issumm analyses if there is call-reduction-function in processed operator and if there is one it generates operators calling reduction-function. In processed operator call of reduction-function of type name-function ( ( name-domain ) arithm-expression ) is substituted for RFi, RFi - name of working variable. Besides additional operator is considered

RFi = name-function ( ( name-domain ) arithm-expression ),

It is realised by Fortran operators which are generated and put into List FORT in the format of Intermediate representation of Fortran DVM program.

If reduction function is executed on the distributed variables then function issumm generates DVM-comment REDUCTION using Table of distribution indexes and puts it into List FORT. Modified operator which hasn't call-reduction-function anymore, is passed to function realop for processing.

Function realop defines the type of operator (scalar operator, ASSUME operator, exit condition of iteration) generates Fortran operators realising this operator and put them into List FORT in the format of Intermediate representation of Fortran DVM program. ASSUME operator is passed to function loopcmc for additional processing.

Function loopcmc is used for generation DVM-comments REMOTE, SHADOW and PARALLEL. This special comments are put down if distributed variable is set in the left part of the operator. This condition is checked using Table of distribution indexes.

DVM-comments REMOTE and SHADOW are generated basing on <statement number> of processed operator, Table of shadow variables and Table of remote variables. DVM-comment PARALLEL is generated using Table of distribution indexes and Table of distributed variables. Special comments are written into List FORT.

5.6.2Iteration node realisation (function gen_iter)

Function gen_iter is used for generating Fortran operators realising construction iteration.

General scheme of fragment of Fortran-program realising construction iteration is represented in Fig 2.

f unction gengr

Operators realizing BOUNDARY

f unction gennzn

Operators realising INITIAL

iteration-index=0

label iteration-index=iteration-index+1

f unction gentelo1

Operators realising Iteration Body

IF(exit condition) GOTO label1

Rewrite operators

GOTO label

label1 CONTINUE

Fig.2. General scheme of iteration construction realization

General structure of function gen_iter control is given in the following scheme

g en_iter realise gengr gennzn gentelo1


begkend begkend begkend

Function gen_iter receives <iteration number><parallel layer scheme>as parameters, <parallel layer scheme> determines the order of executing <boundary operators>, <initial operators>, <body operators> of construction iteration.

Function realise chooses iteration-index of processed iteration from Table of iterations structure by <iteration number>, generates Fortran operators for computations written in italics in the scheme, calls functions gengr, gennzn, gentelo1.

Function gengr receives <parallel layer subscheme> as a parameter for <boundary operators> and calls function begkend for realisation of this <parallel layer subscheme>.

Function gennzn receives <parallel layer subscheme> as a parameter for <initial operators> and calls function begkend for realisation of this <parallel layer subscheme>.

Function gentelo1 receives <parallel layer subscheme> as a parameter for <body operators> and calls function begkend for realisation of this <parallel layer subscheme>.

5.6.3Ordered group node realisation (function ms)

Function ms is used for realisation of node <parallel layer scheme> of <MSCS number> type.

General structure of function ms control is given in the following scheme

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

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

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