rtsDDe (1158446)

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

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

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
void
unsigned long

*DestPtr,
*SrcPtr,
Size );

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>
unsigned int

<Type>,
*DestPtr,
*SrcPtr,
Count );

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
char

*stream,
*format, ... );

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
char

ProcNumber,
*format, ... );

int rtl_mfprintf(

int
FILE
char

ProcNumber,
*stream,
*format, ... );

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
unsigned long

**Ptr,
NewSize );

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
unsigned long

**Ptr,
NewSize );

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 (


unsigned long
<Type>

<Type>,
Size,
*ArrayPtr );

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 (


unsigned long
<Type>

<Type>,
NewSize,
*ArrayPtr );

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>

<Type>,
*StructPtr );

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, так как принтер может начудить со шрифтами.

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

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