PPPA_DD (1158359)

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

Текст из файла

Parallel Program Performance Analyzer



Detailed design

April 17, 1999

Keldysh Institute of Applied Mathematics

Russia Academy of Sciences

Contents

1 Introduction 2

2 Subsystem for statistics collection. 2

2.1 Module statevnt.c. 2

2.2 Module interval.c. 3

2.3 Module statist.c. 3

2.4 Definition of functions used for representation of interval information, general information of support system and times of collective operations. 4

3 Processing subsystem. 5

3.1 Class Cinter, module inter.cpp. 5

3.2 Class CtreeInter, module treeinter.cpp. 6

3.3 Класс Csynchro, module synchro.cpp. 7

3.4 Class CstatRead, module statread.cpp. 8

3.5 Module statfile.cpp, function main. 10

1Introduction

The performance analyzer consists of two subsystems - accumulation subsystem and subsystem of information processing.

The first subsystem provides accumulation of execution characteristics of parallel program on each processor. This subsystem is called from Lib-DVM during the parallel program execution. Besides Fortran DVM language have the features for description of intervals of the program execution, for which the user would like to get the performance characteristics. The compiler inserts accumulation subsystem calls at the beginning and the end of each interval. The information from every processor outputs into a file upon the termination of the program.

The second subsystem running on a workstation, processes the information gathered on parallel computer and outputs performance characteristics requested by user.

2Subsystem for statistics collection.

Subsystem of statistics collection consists of the following modules:

statevnt.c, statist.c, interval.c,strall.h, statist.h,interval.h.

These modules are intended for collection of following information: DVM-function execution time, DVM-system interval execution time, dissynchronization times of collective operations and time variations. Statistics are written into file, name and length of the file are defined in parameter file. This file is used by performance analyzer to calculate performance characteristics.

2.1Module statevnt.c.

This module is intended for marking DVM-function, the beginning time and completion time of which are to be written into file. These times are used by performance analyzer to calculate dissynchronization characteristics and time variation for each interval.

2.2Module interval.c.

This module contains functions called by converter to create and delete intervals. These functions also provide writing trace of corresponding event into files.

void __callstd binter_(long *nfrag, long *val)

void __callstd bsloop_(long *nfrag)

void __callstd bploop_(long *nfrag)

nfrag – interval number,

nline – line number in the source file,

val – expression value in user interval.

These functions serve for creating intervals of three types: user intervals, parallel intervals and sequential intervals.

void __callstd einter_(long *nfrag, long *nline)

void __callstd eloop_(long *nfrag, long *nline)

These functions serve for closing current interval, the first function closes user interval, the second one closes sequential and parallel intervals. Function prototypes are in file interval.h.

2.3Module statist.c.

Functions of the module provide direct creation of intervals, searching them in buffer, deleting intervals and writing both interval information and synchronization times into file. External function definitions are in file statist.h.

The support system calls the following functions during task execution:

Stat_init, stat_done, stat_event.

void stat_init(void) – the function fills buffer with zeros, initiates variables, writes support system information (for example the number of processors) at the beginning of the buffer and creates an interval for the whole program.

void stat_done(void) – the function closes the whole program interval. If there is no enough space in buffer for intervals or for times of collective operations then the function outputs error message .

void stat_event(int numbevent) – the function writes times of beginning and completion of collective operations at the end of the buffer. Parameters ‘numbevent’ is a situation number.

Interval is identified by line number, by the name of source file and by expression value in case of user interval. The line number and file name are saved in external variables DVM_LINE[0] and DVM_FILE[0], expression value is passed as parameters. References to higher level interval, to lower level interval and to the next interval of the same level are saved for the interval. Interval is considered as current in the following cases: if it has been created last; if it has been found in the list of intervals of corresponding level and its identifier values are equal to the given ones; in case interval is closed the interval of higher level becomes current.

The following functions serves for creating searching and deleting intervals.

void CreateInter(int typef,long val) – the function allocates record (fields are described below) in buffer. Parameter ‘typef’ is interval type, ‘val’ is the value of expression defined in interval created in program by means of language. Newly created interval becomes current, DVM-function execution times are written in the current interval. If there is no enough space in buffer interval is created in memory.

int FindInter(long val – the function is intended for searching interval. This function is called before creating interval function. The function returns 1- interval is found, 0 – interval is not found.

void EndInter(long nline) - closing current interval, parameter ‘nline’- line number of the beginning of the interval - is passed for the control.

void FreeInter(void) – free memory function. The function is called at the end of execution when messages about lack of the buffer space are writing.

2.4Definition of functions used for representation of interval information, general information of support system and times of collective operations.

These definitions are in file strall.h. The file is used at the second stage by processing subsystem.

#define SZSH sizeof(short)

#define SZL sizeof(long)

#define SZINT sizeof(int)

#define SZD sizeof(double)

#define SZV sizeof(void*)

General information structure written at the beginning of each buffer.

typedef struct tvms_ch {

unsigned char reverse[SZL] information was collected not at workstation.

rank[SZSH], - matrix rank

maxnlev[SZSH], - maximal nesting level

szsh[SZSH], - size of short

szl[SZSH], - size of long

szv[SZSH], size of void*

szd[SZSH], - size of double

proccount[SZL], - number of processors

mpstype[SZL], - type of message passing

ioproc[SZL], - input/output processor number

qfrag[SZL], - number of intervals

pbuffer[SZV], - pointer to the buffer

lbuf[SZL], - buffer size

linter[SZL], - size in byte of all interval records

lsynchro[SZL]; - size in byte of synchronization time records

} *pvms_ch;

Interval structure .

At the end of each interval source file name is written.

typedef struct tinter_ch {

unsigned char type[SZSH], - interval type

nlev[SZSH], - nesting level number

nenter[SZD], - number of interval entries

nline[SZL], - user program line number

valvar[SZL], - expression value

qproc[SZL], - number of processors, on which interval was executed

ninter[SZL], interval number

up[SZV], - pointer to an interval of higher level

next[SZV], - pointer to next interval of the same level

down[SZV], - pointer to an interval of lower level

ptimes[SZV], - pointer to time array, saved by system

times[3*StatGrpCount*StatGrpCount][SZD]; - time array

}*pinter_ch;

Structure of time of collective operation.

typedef struct tsyn_ch {

unsigned char nitem[SZSH], - collective operation number

ninter[SZL], - current interval number

time[SZD]; - time when situation happen.

}*psyn_ch;

3Processing subsystem.

This tool consists of the following modules: inter.cpp, treeinter.cpp, synchro.cpp, statread.cpp, statfile.cpp. Header files: inter.h, treeinter.h,synchro.h, statread.h, strall.h, bool.h, sysstat.h. Function main is in statfile.cpp module and may have seven parameters (the first two parameters are required ). Parameters: name of file where information has been saved during program execution; name of file for processing information; three symbols y/n indicating output of general, comparative and basic characteristics; maximal level of nesting intervals; list of processor numbers for which basic characteristics are to be output.

3.1Class Cinter, module inter.cpp.

This class contains member functions and member data for processing interval time characteristics.

enum typegrp {COM,RCOM,SYN,VAR,CALL};

enum typecom {IO,SR,WR,SSH,WSH,RACC,RED};

enum typetime {LOST,INSUFUSR,INSUF,IDLE,SUMCOM,SUMRCOM,SUMSYN,SUMVAR,

REDOVERLAP,SHADOVERLAP,EXEC,CPUUSR,CPU,IOTIME,IMB,PROC,ITER};

typedef struct tident {

char *pname; - name of source file where interval is defined,

unsigned long nline, - line number in the source file,

unsigned long proc; - the number of processors where interval was executed,

short nlev; - nesting level number,

long expr; - expression value,

double nenter; - number of interval entries,

typefrag t; - interval type.

}ident;

double mgen[ITER+1]; - time array, to output characteristics for processors,

double mcom[RED+1]; - array of passing message times in collective operations,

double mrcom[RED+1]; - array of times of real dissynchronization,

double msyn[RED+1]; - array of dissynchronization times,

double mvar[RED+1]; - time variation array,

double mcall[RED+1]; - number of collective operation calls,

ident idint; - interval identifier information.

3.1.1Constructor.

CInter (s_GRPTIMES (*pt)[StatGrpCount],ident p,unsigned long nint);

s_GRPTIMES (*pt)[StatGrpCount] – pointer to time array read from file,

ident p – interval identifier,

unsigned long nint – interval number.

Serve for writing interval identifier values and some characteristics which values are in file.

3.1.2Destructor.

3.1.3~CInter(void);

Free source file name memory.

3.1.4void AddTime(typetime t2,double val);

3.1.5void WriteTime(typetime t2,double val);

3.1.6void AddTime(typegrp t1,typecom t2,double val);

These member functions write or add up new time characteristic values. The first function AddTime and function WriteTime are intended for processing ‘mgen’ array, the first parameter is index number and the second parameters is value itself. The second function AddTime is working with the rest of arrays, parameter ‘t1’ indicates array, parameter ‘t2’ is array index value, parameter ‘val’ is value.

3.1.7void ReadTime(typegrp t1,typecom t2,double &val);

3.1.8void ReadTime(typetime t2,double &val);

These member functions read time characteristic values. Parameters are the same as for writing but last parameter is passed as reference.

3.1.9void ReadIdent(ident **p);

Set pointer equal to interval identifier address.

3.1.10int CompIdent(ident *p);

Compare current interval identifier with interval identifier from other processor, parameter ‘p’ is pointer to interval identifier. If identifiers are fully matching (all structure elements are equal ) the function returns 1, otherwise it returns 0.

3.1.11void SumInter(CInter *p);

This member function sum up interval characteristic values with characteristic values of interval of higher level. Parameter ‘p’ – pointer to higher level interval.

3.2Class CtreeInter, module treeinter.cpp.

This class is intended for working with intervals collected on one processor. It contains the following member data: ‘nproc’ – processor number; ‘qinter’ – number of intervals; ‘curninter’ – current interval number; ‘maxnlev’ – maximal nesting level number; pointer to dynamic structure array containing interval numbers of lower level, higher level or the same level.

typedef struct ttree{

unsigned long up,next,down; - interval numbers,

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

Тип файла документ

Документы такого типа открываются такими программами, как Microsoft Office Word на компьютерах Windows, Apple Pages на компьютерах Mac, Open Office - бесплатная альтернатива на различных платформах, в том числе Linux. Наиболее простым и современным решением будут Google документы, так как открываются онлайн без скачивания прямо в браузере на любой платформе. Существуют российские качественные аналоги, например от Яндекса.

Будьте внимательны на мобильных устройствах, так как там используются упрощённый функционал даже в официальном приложении от Microsoft, поэтому для просмотра скачивайте PDF-версию. А если нужно редактировать файл, то используйте оригинальный файл.

Файлы такого типа обычно разбиты на страницы, а текст может быть форматированным (жирный, курсив, выбор шрифта, таблицы и т.п.), а также в него можно добавлять изображения. Формат идеально подходит для рефератов, докладов и РПЗ курсовых проектов, которые необходимо распечатать. Кстати перед печатью также сохраняйте файл в PDF, так как принтер может начудить со шрифтами.

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

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