rtsDDe (1158446)
Текст из файла
133
Keldysh Institute of Applied Mathematics
Russia Academy of Sciences
Lib-DVM library
Detailed design
March 2000
CONTENTS
1 Functions and macros of general purpose 5
1.1 Macrodefinitions to execute some mathematical operations 5
1.2 Copping arrays 5
1.3 High level output with processor number prefix 6
2 Functions and macrodefinitions of dynamic allocation of the memory 6
3 Requesting program execution time in the form, independent from hardware and software environment 8
4 Requesting internal numbers of functionally provided processors 8
5 Message passing tools, independent from base system of message passing 10
5.1 Synchronous message exchange 10
5.1.1 Synchronous sending 10
5.1.2 Synchronous receiving 10
5.2 Asynchronous message exchange 11
5.2.1 Asynchronous sending 11
5.2.2 Asynchronous receiving 11
5.3 Message exchange in "NO-WAIT" mode 11
5.3.1 Sending in "NO-WAIT" mode 11
5.3.2 Receiving in "NO-WAIT" mode 12
5.3.3 Waiting for sending or receiving completion 12
5.3.4 Requesting sending or receiving completion 12
5.4 Passing message from specified processor to all other processors (broadcast passing) 13
6 Synchronization of the programs, executed at different processors 13
7 Tracing user program and Run-Time System 14
7.1 General information about trace accumulation 14
7.2 Controlling trace accumulation by parameter files 15
7.2.1 Trace enabling and disabling 16
7.2.2 Specifying opened (enabled) trace streams 16
7.2.3 Trace mode specifying 17
7.2.4 Controlling form of accumulated information 18
7.2.5 Controlling internal self-checking Run-Time System mechanisms, functioning during trace accumulation 18
7.2.6 Controlling output of additional information when tracing some Run-Time System functions in extended mode 19
7.3 Information output functions to trace streams 20
8 Output of informational messages of Run-Time System and error messages 23
8.1 Functions of informational and error messages output 23
8.2 Controlling standard output streams and streams of informational and error message output 23
8.3 Classes of informational messages and their output controlling 26
9 Measuring time of user program interval execution 27
10 Requesting global and local sizes of specified dimension of specified object 28
11 Tools to support Run-Time System built-in program of statistic information accumulation 29
11.1 Matrix of execution characteristics of the user program current interval 29
11.1.1 Primary execution characteristics of user program current interval 29
11.1.2 About characteristics of passing message function group 31
11.1.3 Calculation of summary characteristics of program execution using interval matrix of characteristics 32
11.1.4 Auxiliary matrix of user program characteristics 33
11.1.5 Supporting characteristic accumulation of input/output DVM-operations implemented in Fortran 34
11.2 Tools of external controlling statistics accumulation program 35
11.3 Initializing statistics accumulation program 35
11.4 Processing calls of Run-Time System functions by statistics accumulation program 36
11.5 Terminating statistics accumulation program 37
11.6 Access to some system information 37
12 Run-Time System error messages 39
12.1 Run-Time System initialization and termination 39
12.1.1 MPI library initialization 40
12.1.2 PVM library initialization 40
12.1.3 GNS and ROUTER libraries initialization 40
12.1.4 Input of system parameters 40
12.1.4.1 Parameter descriptions by macrodefinitions, preceding to parameters input from the file 40
12.1.4.2 Parameter input from file 41
12.1.5 Checking input parameters and Run-Time System tuning according the parameters 43
12.1.6 Run-Time System termination 46
12.2 Creating abstract machine representations 47
12.3 Processor systems 48
12.4 Mapping abstract machine representation 54
12.5 Creating and deleting distributed array 63
12.6 Mapping distributed array 64
12.7 Defining program block 72
12.8 Parallel loop description 72
12.9 Representation of the program as a set of subtasks executed in parallel 78
12.10 Reduction 81
12.11 Exchange of shadow edges of distributed arrays 89
12.12 Access to distributed array elements 99
12.13 Input/Output 108
12.14 Subsidiary functions 111
12.15 Access to remote data 113
12.16 Allocating and freeing memory 129
12.17 Message passing 131
12.18 Tools of internal self-checking 133
1Functions and macros of general purpose
1.1Macrodefinitions to execute some mathematical operations
int dvm_mod(Op, D);
The macrodefinition returns zero, if rest from division of Op argument by D argument is equal to zero, and 1 in other case. The arguments Op and D should be integer.
<TypeOfOp> dvm_abs(Op);
The macrodefinition returns absolute value of Op argument. A type of Op argument can be integer or float. The types of returned value and Op argument are the same.
int dvm_sign(Op);
The macrodefinition returns 1, if Op is positive, and -1, if Op is zero or negative. A type of Op argument can be integer or float.
<TypeOfOp> dvm_min(Op1, Op2);
The macrodefinition returns minimal value of Op1 and Op2 arguments. A type of Op1 and Op2 arguments can be integer or float. A type of returned value is determined by C language type casting rules, applied to Op1 and Op2 arguments.
<TypeOfOp> dvm_max(Op1, Op2);
The macrodefinition returns maximal value of Op1 and Op2 arguments. A type of Op1 and Op2 arguments can be integer or float. A type of returned value is determined by C language type casting rules, applied to Op1 and Op2 arguments.
1.2Copping arrays
| void dvm_memcopy ( | void | *DestPtr, |
| DestPtr | | pointer to memory area, copping will be done in. |
| SrcPtr | | pointer to memory area, from which copping will be done. |
| Size | | a number of copied bytes. |
| void dvm_ArrayCopy ( |
| <Type>, |
| Type | | type of elements of copied arrays. |
| DestPtr | | pointer to the first array element, copping will be done in. |
| SrcPtr | | pointer to the first array element, copping will be done from. |
| Count | | number of copied bytes. |
1.3High level output with processor number prefix
| int rtl_printf ( | char | *format, ... ); |
| int rtl_fprintf ( | FILE | *stream, |
The functions are similarly to the C library functions printf and fprintf, but the current processor number is reported before specified information output in the following form:
ProcNumberint (ProcNumberext) ,
where:
| ProcNumberint | | internal number of the current processor; |
| ProcNumberext | | external number of the current processor. |
The numeration of processors assigned to the task is considered in section 4.
| int rtl_mprintf ( | int | ProcNumber, |
| int rtl_mfprintf( | int | ProcNumber, |
The functions are similarly to the functions rtl_printf and rtl_fprintf considered above, but the output is done only in the case, if internal number of the current processor is equal to parameter ProcNumber.
Note. The rtl_printf and rtl_mprintf functions are intended to output Run-Time System informational messages, which are directed usually to stdout stream (see section 8).
2Functions and macrodefinitions of dynamic allocation of the memory
The functions and macrodefinitions, considered below, are differed from C library standard functions in the following. First, Run-Time System checks correctness of memory allocation and freeing. Secondly, allocated memory blocks can be bounded at left and at right with surplus elements, containing special code. It allows to Run-Time System during its execution to check surplus elements of the allocated blocks, that makes easy to detect errors of non-planned writing to the memory.
void *dvm_getmem (unsigned long Size);
The function allocates memory block of Size bytes and returns a pointer to the block. If the memory block of specified size cannot be allocated, user program or Run-Time System are terminated and corresponding diagnostics is output by the function eprintf (see section 7).
void *dvm_getmemnoerr (unsigned long Size);
The function is similar to the function dvm_getmem, considered above, but it returns NULL if a block is not allocated.
void *dvm_getclearmem (unsigned long Size);
The function is similar to the function dvm_getmem, considered above, but an allocated block is cleared.
| void dvm_realloc ( | void | **Ptr, |
The function returns to the free memory the memory block, specified by *Ptr pointer, allocates a new memory block of NewSize byte size and assigns its address to *Ptr pointer. The contents of old block will be kept in the new block (as NewSize size allows it). If new memory block of required size cannot be allocated user program or Run-Time System is terminated.
If NewSize is equal to zero, new block is not allocated and NULL is assigned to *Ptr pointer.
| void dvm_reallocnoerr ( | void | **Ptr, |
The function is similar to the function dvm_realloc, considered above, but it returns NULL if a block of required size is not allocated.
void dvm_freemem (void **Ptr);
The function returns to the free memory the memory block, specified by *Ptr pointer, and assigns NULL to *Ptr pointer. The function call with NULL value of *Ptr pointer is allowed.
| void dvm_AllocArray ( |
| <Type>, |
The macrodefinition allocates memory block, containing Size elements of Type type and assigns its address to ArrayPtr. If the memory block of required size cannot be allocated user program or Run-Time System is terminated.
| void dvm_ReallocArray ( |
| <Type>, |
The macrodefinition returns to the free memory the memory block, specified by ArrayPtr pointer, allocates a new memory block of NewSize size elements of the Type type and assigns its address to ArrayPtr pointer. The contents of old block will be kept in new block (as NewSize size allows it). If new memory block of required size cannot be allocated user program or Run-Time System is terminated.
void dvm_FreeArray (void *ArrayPtr);
The macrodefinition returns to the free memory the memory block, specified by ArrayPtr pointer, and assigns NULL to ArrayPtr pointer. The macrodefinition call with NULL value of ArrayPtr pointer is allowed.
| void dvm_AllocStruct ( |
| <Type>, |
The macrodefinition allocates memory block, containing sizeof(Type) bytes and assigns its address to StructPtr pointer. If the memory block of required size cannot be allocated user program or Run-Time System is terminated.
Характеристики
Тип файла документ
Документы такого типа открываются такими программами, как Microsoft Office Word на компьютерах Windows, Apple Pages на компьютерах Mac, Open Office - бесплатная альтернатива на различных платформах, в том числе Linux. Наиболее простым и современным решением будут Google документы, так как открываются онлайн без скачивания прямо в браузере на любой платформе. Существуют российские качественные аналоги, например от Яндекса.
Будьте внимательны на мобильных устройствах, так как там используются упрощённый функционал даже в официальном приложении от Microsoft, поэтому для просмотра скачивайте PDF-версию. А если нужно редактировать файл, то используйте оригинальный файл.
Файлы такого типа обычно разбиты на страницы, а текст может быть форматированным (жирный, курсив, выбор шрифта, таблицы и т.п.), а также в него можно добавлять изображения. Формат идеально подходит для рефератов, докладов и РПЗ курсовых проектов, которые необходимо распечатать. Кстати перед печатью также сохраняйте файл в PDF, так как принтер может начудить со шрифтами.















