PPPA_DD (1158359), страница 2

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

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

int sign; - a sign that interval has been already passed during interval walking,

CInter *pint;- pointer to class Cinter.

} ptree;

ptree (*pt); - pointer to structure array.

3.2.1Constructor

CTreeInter(FILE *stream,int lint,char* pbuffer,unsigned int n,

unsigned long qfrag,short maxn);

reads interval information collected on processors from the file written at the end of DVM-program execution.

Parameters:

FILE *stream, - file descriptor pointer,

int lint, - information length in bytes,

char* pbuffer,- beginning of the buffer at the collection stage,

unsigned int n, - processor number,

unsigned long qfrag,- number of intervals,

short maxn – maximal nesting level.

This member function allocates array of structures of the given interval tree, fills it and calls class constructor Cinter with interval characteristics read from file.

3.2.2Destructor

3.2.3~CTreeInter();

Free structure array memory.

3.2.4BOOL Valid();

The member function analyzes result of constructor execution. It returns TRUE if constructor execution completed successfully, otherwise it returns FALSE.

3.2.5void TextErr(char *t);

The member function receives error messages if function Valid() returned FALSE.

3.2.6void BeginInter(void);

3.2.7void NextInter(ident **id);

3.2.8CInter *FindInter(ident *id);

The member functions are intended for interval walking. Parameter *id is pointer to interval identifier. Interval walking is made in the same order as interval filling at the stage of collection. Function FindInter finds interval with identification values given in parameter, if interval is not found the function returns NULL.

3.2.9void SumLevel(void)

The member function sums up temporal characteristics of low level intervals with high level intervals for all interval tree.

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

The class is intended for saving dissynchronization time values and time variation values.

typedef struct tsyn {

short nitem;- collective operation number, set in module statevnt.c

unsigned long ninter; - current interval number, at the moment when situation arise,

double time; - time when situation arise,

}psyn;

psyn *ps; - pointer to dissynchronization structure array.

Member functions:

3.3.1CSynchro(FILE *stream,int l);

Reading times of collective operations from file.

FILE *stream, - pointer to the file written during DVM-program execution.

int l – length of written information.

3.3.2~CSynchro();

Free requested memory.

3.3.3BOOL Valid();

The member function returns TRUE if constructor finished successfully, otherwise it returns FALSE.

3.3.4void TextErr(char *t);

The member function output error message.

3.3.5void Count(unsigned long nint);

The member function calculates the number of dissynchronizations and time variation for interval of given number for each type of collective operations. Interval of given number becomes current. The following member functions return values for the current interval.

unsigned long nint – interval number.

3.3.6int GetCount(short type);

The member function returns number of dissynchronizations for the given type of collective operations.

3.3.7double Find(short nitem);

double FindDel(short nitem);

The functions serves for getting dissynchronization time and time variation for collective operation. FindDel set also flag that the collective operation has been processed,

short nitem – collective operation number.

3.4Class CstatRead, module statread.cpp.

The class serves for reading support system information from file, calls all class constructors listed above, provides interval walking for all interval collected on all processors, calculates some temporal characteristics and writes them into corresponding intervals, finds maximal, minimal and total values of those characteristics.

Member functions:

3.4.1CStatRead(const char *name);

const char *name – file name.

The constructor serves for reading support system information from file and calls constructors of other classes to write information from the file into its own structures.

3.4.2~CStatRead(void);

The member function calls destructors of other classes and free memory allocated for its dynamic arrays to store pointers to these classes..

3.4.3unsigned long QProc(void);

The member function returns number of processors on which the program has been executed.

3.4.4unsigned long IOProc(void);

The member function returns input/output processor number.

3.4.5tmps MPSType(void);

The function returns type of message passing.

3.4.6int BeginTreeWalk(void);

int TreeWalk(void);

These member functions serve for interval tree walking and return the number of intervals which have the same identification values.

3.4.7BOOL Valid(void);

The member function returns TRUE if constructor completed successfully, otherwise it returns FALSE.

3.4.8void TextErr(char *t);

The function writes error message at pointer ‘t’.

3.4.9void ReadTitle(char * p);

char *p – pointer to a symbol string where interval identifying header is written.

3.4.10BOOL ReadProc(typeprint t,unsigned long *pnumb,int qnumb,double sum,char *str);

typeprint t, - type of information of characteristics for each processor,

unsigned long *pnumb, - pointer to array of processor numbers, for which characteristics are to be output,

int qnumb,- number of elements of processor number array,

double sum,- total characteristic value for each processor,

char *str – string where characteristic name and time values are written.

The member function serves for output of program execution characteristics on each processor, returns TRUE when there is no more characteristic of given type.

3.4.11void MinMaxSum(typeprint t,double *min,unsigned long *nprocmin,

double*max,unsigned long *nprocmax, double *sum);

typeprint t, - characteristic type,

double *min, - pointer to array of minimal characteristic values,

unsigned long *nprocmin,- pointer to processor number array, corresponding to minimal values,

double*max, - pointer to array of maximal characteristic values,

unsigned long *nprocmax, - pointer to processor number array, corresponding to maximal values,

double *sum – pointer to array of total characteristic values.

The member function is intended for calculation of minimal, maximal and total characteristics, it is used for output of comparative characteristics.

3.4.12void VMSSize(char *p);

char *p – pointer to string where matrix rank is written for the matrix on which the program was executed.

3.4.13long ReadCall(typecom t);

typecom t – collective operation type.

It returns number of collective operation calls of the given operation type.

3.5Module statfile.cpp, function main.

The function reads parameters, calls constructor CstatRead(…) to read saved times and intervals from the file, outputs requested characteristics into the file. Characteristics with zero value are not output.

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

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

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