FDVM_DD (1158349), страница 2

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

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

a

...

b

...

c

...

Symbol Table

Fig. 3.4. Internal representation of the statement a = b + c.

4 Detailed Description of Basic Modules

Scheme of high level functions calls of the main module dvm.cpp is:

m ain initialize

initVariantNames

initLibNames

initDVM

TranslateFileDVMTransFunc

unparse (class File) InsertDebugStat

main(int argc, char *argv[])

int

main

(

int argc,

char *argv[] )



The function processes the compilation parameters and sets compilation mode on. It initializes compiler data structures, calls the TranslateFileDVM( ) function to restructure parse tree according to the compilation mode, and calls the unparse( ) class SgFile member function for generating new source code from restructured internal form. The function returns 1 if there are found some errors in the program.

void

TranslateFileDVM

(

SgFile

*f )

f

- pointer to the program file

If the compilation mode is generating of parallel program then the TransFunc( ) function is called for each procedure of program else the InsertDebugStat( ) function is called.

void

TransFunc

(

SgStatement

*func

)

func

- pointer to the procedure header statement

The statements of procedure are scanned in lexical order until last statement of procedure.

Specification statements and directives processing.

A DISTRIBUTE directive is involved in list. The function builds the aligning trees processing ALIGN directives. After specification directives scanning

When all specification statements and directives are scanned the LibDVM function calls for creating distributed arrays are generated and inserted in program before first executable statement. The GenDistArray( ) function creates distributed arrays (LibDVM object) for array with DISTRIBUTE attribute and all arrays immediately or ultimately aligned with it.

Executable statements and directives processing.

The distributed array element references in assignment, CALL , arithmetical IF, logical IF, IF-THEN, ELSE_IF, and computed GOTO statements are linearizing.

A DVM directive is replaced by sequence of LibDVM functions calls. When new statement is inserted in a program restructuring of the control graph (carring or substituting label, replacement of logical IF statement by IF...THEN...ENDIF construct, and so on) is performed if necessary. The ReplaceContext( ), doAssignStmtAfter( ), InsertNewStatementAfter( ), InserNewStatementBefore( ) functions serve for inserting new statement in parse tree and restructuring it.

After processing last statement of procedure the declaration statements for temporary variables that are used for argument passing, storing function value, buffering I/O, and addressing distributed arrays are created and inserted in specification part of procedure (DeclareVarDVM( )).

List of called functions:

TempVarDVM

ChangeDistArrayRef

RTLInit

DebugVarArrayRef

RTLExit

DebugVarArrayRef_Left

BeginBlock

ChangeArg_DistArrayRef

EndBlock

DebugArg_VarArrayRef

GetAM

ReplaceAssignByIf

GetVM

ReplaceContext

doDisRuleArrays

ParallelLoop

GenDistArray

AddToGroupNameList

InsertNewStatementBefore

CreateBoundGroup

InsertNewStatementAfter

ShadowList

doAssignStmtAfter

StartBound

Extract_Stmt

WaitBound

RemoteAccessEnd

CreateReductionGroup

GoRoundEntry

ReductionList

BeginBLockForEntry

StartRed

initMask

WaitRed

Error

doAlignRule

err

RealignArray

addToStmtList

RealignArr

ReplaceDoNestLabel_Above

DistObjectRef

CloseDoInParLoop

RedistributeArray

CloseParLoop

control_list_open

EndParLoop

ReplaceByIfStmt

EndPl

InsertSendIOSTAT

isDoEndStmt

InsertSendInquire

CloseLoop

InsertSendInputList

DebugLoop

IOcontrol

SeqLoopBegin

TestIOList

SeqLoopEndInParLoop

IO_ThroughBuffer

OverLoopAnalyze

D_Skpbl

SeqLoopEnd

D_Lnumb

DeleteObject

D_Fname

OpenInterval

St_Binter

CloseInterval

St_Einter

Value

St_Biof

lastStmtOfDo

St_Eiof

AddRemoteAccess

St_Eloop

RemoteVariableList

DeclareVarDVM

Rank

void

InsertDebugStat

(

SgStatement

*func

)

func

- pointer to the procedure header statement

The function generates the sequential code including Debugger and Performance Analyzer functions calls. Parameters of compilation(-e… and -d…) control the process of generating new statements.

The statements of procedure are scanned in lexical order until last statement of procedure. The specification statements and directives are omitted.

If the user specify non-zero level of debugging in compiler run command the statements containing expressions (assignment, CALL , arithmetical IF and so on) are surrounded with Debugger functions for control of variables value.

The function inserts Debugger calls at the beginning and the end of each parallel and sequential loop and Performance Analyzer calls at the beginning and the end of each interval.

List of called functions:

TempVarDVM

DebugVarArrayRef

RTLInit

DebugVarArrayRef_Left

RTLExit

DebugArg_VarArrayRef

InsertNewStatementBefore

SkipParLoopNest

InsertNewStatementAfter

ReplaceContext

doAssignStmtAfter

ParallelLoop_Debug

Extract_Stmt

isParallelLoopEndStmt

addToStmtList

AddToGroupNameList

ReplaceDoNestLabel_Above

CreateReductionGroup

CloseDoInParLoop

ReductionList

CloseParLoop

D_Lnumb

isDoEndStmt

D_Fname

CloseLoop

St_Binter

DebugLoop

St_Einter

SeqLoopBegin

St_Biof

SeqLoopEndInParLoop

St_Eiof

OverLoopAnalyze

St_Eloop

SeqLoopEnd

DeclareVarDVM

OpenInterval

DeleteObject

CloseInterval

Error

Value

err

initMask

void

initialize

(

)

This function initializes the variables of compiler used in the mode of generating Debugger and Performance Analyzer calls.

void

initVariantNames

(

)

This function initializes the table of variant tags.

void

initLibNames

(

)

This function initializes the LibDVM function name table.

void

initDVM

(

)

This function inserts the LibDVM function symbols in the Symbol Table.

void

initMask

(

)

This function cleans the mask of using LibDVM functions. The functions generating LibDVM library calls reset the corresponding mask element to 1. The declaration statement is created only for masked (used in procedure) LibDVM functions.

void

TempVarDVM

(

SgStatement

*func

)

func

- pointer to the procedure header statement

The function puts in the Symbol Table the following symbols of reserved variables:

integer

dvm000(...)

- array for storing LibDVM function results

integer

i0000m(0:0)

- base for addressing distributed arrays of type integer

real

r0000m(0:0)

- base for addressing distributed arrays of type real

double precision

d0000m(0:0)

- base for addressing distributed arrays of type double

precision

logical

l0000m(0:0)

- base for addressing distributed arrays of type logical

complex

c0000m(0:0)

- base for addressing distributed arrays of type complex

integer

i000io(1000)

- buffer for I/O of distributed arrays of type integer

real

r000io(1000)

- buffer for I/O of distributed arrays of type real

double precision

d000io(1000)

- buffer for I/O of distributed arrays of type double

precision

logical

l000io(1000)

- buffer for I/O of distributed arrays of type logical

complex

c000io(1000)

- buffer for I/O of distributed arrays of type complex

integer

idvm00

- do-variables of loops implementing I/O of

idvm01

distributed arrays

. . .

idvm07

integer

i000bf(...)

- buffer for storing remote data of type integer

real

r000bf(...)

- buffer for storing remote data of type real

double precision

d000bf(1000)

- buffer for storing remote data of type double

precision

logical

l000bf(1000)

- buffer for storing remote data of type logical

complex

c000bf(1000)

- buffer for storing remote data of type complex

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

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

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