pppaDDe (1158440)

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

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

15


Keldysh Institute of Applied Mathematics

Russia Academy of Sciences

Parallel Program Performance Analyzer (PPPA)

Detail design

December 1999

Contents

1 Introduction 3

2 Subsystem for statistics collection 3

2.1 Module statevnt.c 3

2.2 Module interval.c 3

2.3 Module interval.c 3

2.4 Module statist.c 4

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

3 Processing subsystem 7

3.1 Class Cinter, module inter.cpp 7

3.2 Class CtreeInter, module treeinter.cpp 9

3.3 Class Csynchro, module synchro.cpp 11

3.4 Class CstatRead, module statread.cpp 12

3.5 Module statfile.cpp, function main 15

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.

2.3Module 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
nline

val

– interval number,
– line number in the source file,
– 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.4Module 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:

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.5Definition 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[SZSH]

rank[SZSH],

maxnlev[SZSH],

szsh[SZSH],

szl[SZSH],

szv[SZSH],

szd[SZSH],

smallbuff[SZSH]

proccount[SZL],

mpstype[SZL],

ioproc[SZL],

qfrag[SZL],

pbuffer[SZV],

lbuf[SZL],

linter[SZL],

lsynchro[SZL]

} *pvms_ch;

reverse[
rank
maxnlev
szsh
szl
szv
szd
smallbuff
proccount
mpstype
ioproc
qfrag
pbuffer
lbuf
linter
lsynchro

- information was collected not at workstation.
– matrix rank,
- maximal nesting level,
- size of short,
- size of long,
- size of void*,
- size of double,
- no space in file,
- number of processors,
- type of message passing,
- input/output processor number,
- number of intervals,
- pointer to the buffer,
- buffer size,
- size in byte of all interval records,
- size in byte of synchronization time records.

Interval structure.

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

typedef struct tinter_ch {











}*pinter_ch;

unsigned char

type[SZSH],
nlev[SZSH],
nenter[SZD],
nline[SZL],
valvar[SZL],
qproc[SZL],
ninter[SZL],
up[SZV],
next[SZV],
down[SZV],
ptimes[SZV],
times[3*StatGrpCount*StatGrpCount][SZD];

type
nlev
enter
nline
alvar
qproc
ninter
up
next
down
times
times

- interval type,
- nesting level number,
- number of interval entries,
- user program line number,
- expression value,
- number of processors, on which interval was executed,
- interval number,
- pointer to an interval of higher level,
- pointer to next interval of the same level,
- pointer to an interval of lower level,
- pointer to time array, saved by system,
- time array.

Structure of time of collective operation.

typedef struct tsyn_ch {



}*psyn_ch;

unsigned char

nitem[SZSH],
ninter[SZL],
pgrp[SZV],
time [SZD]

nitem
ninter
pgrp
time

- collective operation number,
- current interval number,
- reference to operation group,
- time when situation happen.

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,OVERLAP,CALL};

enum typecom

{IO,RD,SH,RA,RED};

enum typetime

{LOST, INSUFUSR, INSUF, IDLE, SUMCOM, SUMRCOM, SUMSYN, SUMVAR, SUMOVERLAP, IMB, EXEC, CPUUSR, CPU, IOTIME, START, PROC, ITER};

Typedef struct tident {





}ident;

char
unsigned long
unsigned long
short
long
double
typefrag

*pname,
nline,
proc;
nlev,
expr,
nenter,
t

pname
nline
proc
nlev
expr
nenter
t

- name of source file where interval is defined,
- line number in the source file,
- the number of processors where interval was executed,
- nesting level number,
- expression value,
- number of interval entries,
- interval type.

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 moverlap[RED+1]

- array of operation overlapping,

double mcall[RED+1]

- number of collective operation calls,

Ident idint

- interval identifier information.

3.1.1Constructor

CInter (

S_GRPTIMES
ident
unsigned long

(*pt)[StatGrpCount],
p,
nint);

(*pt)StatGrpCount
p
nint

– pointer to time array read from file,
– interval identifier,
– interval number.

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

3.1.2Destructor

~CInter(void); - Free source file name memory.

3.1.3Functions to save characteristics

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

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

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

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

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

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

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

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