pppaDDe (1158440)
Текст из файла
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 val | – interval number, |
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[ | - information was collected not at workstation. |
Interval structure.
At the end of each interval source file name is written.
| typedef struct tinter_ch { | unsigned char | type[SZSH], |
| type | - interval type, |
Structure of time of collective operation.
| typedef struct tsyn_ch { | unsigned char | nitem[SZSH], |
| nitem | - collective operation number, |
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 { | char | *pname, |
| pname | - name of source file where interval is defined, |
| 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 | (*pt)[StatGrpCount], |
| (*pt)StatGrpCount | – pointer to time array read from file, |
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, так как принтер может начудить со шрифтами.















