rtsIDe (1158448), страница 2

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

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

ProcNumberint  ProcIdent

is defined by Message Passing System and returned to Run-Time System when it is initialized.

There are two functionally special processors: input/output processor and central processor among processors, assigned to a task. Input/output processor is intended to deal with the file system directly (see section 16) and its internal number is zero. The central processor computes the reduction functions (see section 11) and is defined by an index vector ([PSSize1/2], ... , [PSSizen/2]).

3Creating abstract machine representations

An abstract machine concept is introduced for two-step mapping of a parallel program onto a real parallel computer. First, a programmer creates an abstract machine, most suitable for his program (that is, the abstract machine realizing all potential program parallelism). Then, the programmer defines the mapping of his computations and data onto this machine, and he also defines the rules of mapping this abstract machine onto a real parallel computer. Therefore, an abstract machine is a hierarchy of abstract parallel subsystems. Each of these subsystems can be represented as a multidimensional array of subsystems of the next hierarchy level. Several different representations for each subsystem may co-exist.

There is no an "abstract machine" notion in C-DVM and Fortran-DVM languages. Instead of that the term "template" ("TEMPLATE") is used. Each "template", described in the program, is represented as abstract machine in Run-Time System. For each explicitly distributed array (that is array, specified with DVM-directive "DISTRIBUTE") a corresponding abstract machine is created too.

3.1Requesting current abstract machine

AMRef getam_(void);

This function returns a reference to current abstract machine. The current abstract machine is an abstract machine the current program branch is mapped on. Only one abstract machine (the top level of hierarchy) exists when the program starts. The initial abstract machine is mapped onto the processor system assigned by Operating System (OS) for program execution. Therefore, all processors concerned execute initial program branch (mapped onto initial abstract machine). All abstract machines, which program creates later, are descendants of the initial abstract machine. An abstract machine becomes the current one when control enters parallel branch (subtask or parallel loop iteration) mapped onto this abstract machine or when control exits from the parallel construct.

3.2Creating abstract machine representation

AMViewRef crtamv_ (

AMRef
.long
.long
.long

*AMRefPtr,
*RankPtr,
SizeArray[],
*StaticSignPtr );

*AMRefPtr

a reference to the abstract machine.

*RankPtr

a rank of created representation.

SizeArray

array, which i-th element is a size of the (i+1)-th dimension of the created representation (0 i *RankPtr 1).

*StaticSignPtr

the flag of static representation creation.

The function crtamv_ creates a representation of the assigned abstract machine as an array of abstract machines of the next hierarchy level. The function returns reference to the created representation. The representation of the abstract machine as an array allows data arrays and parallel constructs to be mapped onto the abstract machine. An abstract machine can possess several representations, and each of them being an array of abstract machines of the next hierarchy level.

Parental abstract machine, specified by *AMRefPtr reference must be the current abstract machine or its (direct or indirect) descendant. If AMRefPtr = NULL or *AMRefPtr = 0, a representation of the current abstract machine will be created.

If the flag *StaticSignPtr of static representation is not equal to zero, then the created representation will not be deleted automatically, when the control exits the program block (see section 8). Such type of representation can be deleted only explicitly using the function delamv_ considered below.

3.3Requesting reference to an element of abstract machine representation

AMRef getamr_ (

AMViewRef
long

*AMViewRefPtr,
IndexArray[] );

*AMViewRefPtr

a reference to the abstract machine representation.

IndexArray

array, which i-th element is a index value of requested element (that is abstract machine) along (i+1)-th dimension.

The size of the array IndexArray must be equal to the rank of specified representation of the abstract machine.

3.4Deleting abstract machine representation

long delamv_(AMViewRef *AMViewRefPtr);

*AMViewRefPtr – the reference to the abstract machine representation.

The function deletes an abstract machine representation, created by the function crtamv_. When the representation is deleted, all representations of the abstract machines, included in the representation and all distributed arrays mapped on the representation are deleted aìso.

After deleting the representation the reference can be used by user program for its own goals.

A representation of abstract machine can be deleted by delamv_ function only if it was created in the current subtask and in the current program block (or in its subblock) (see sections 8 and 10).

To delete an abstract machine representation the function delobj_ can also be used (see section 17.5).

The function returns zero.

4Processor systems

4.1Requesting reference to the processor system

PSRef getps_ (AMRef *AMRefPtr);

*AMRefPtr – a reference to the abstract machine.

The function getps_ returns a reference to the processor system the specified abstract machine is mapped onto. The parameters of the processor system (the rank and the size of each dimension) can be obtained through the functions getrnk_ and getsiz_ (see section 17).

If AMRefPtr = NULL or *AMRefPtr = 0 the reference to the processor system, the current abstract machine is mapped on, is returned (i.e. the reference on the current processor system is returned).

If *AMRefPtr = –1, the function returns the reference to initial processor system.

The returned reference will be equal to zero, if specified abstract machine is not mapped on any processor system.

4.2Creating subsystem of specified processor system

PSRef crtps_ (

PSRef
long
long
long

*PSRefPtr,
InitIndexArray[],
LastIndexArray[],
*StaticSignPtr );

*PSRefPtr

reference to the (source) processor system whose subsystem will be created.

InitIndexArray

array, which i-th element is an initial value of the index of the (i+1)-th dimension of the source processor system.

LastIndexArray

array, which i-th element is last value of the index of the (i+1)-th dimension of the source processor system.

*StaticSignPtr

the flag of the static subsystem creation.

The function crtps_ creates the subsystem of the same rank, as the rank of source processor system, and returns the reference to the subsystem. The sizes of InitIndexArray and LastIndexArray arrays must be equal to the rank of the source (and to be created) processor systems.

All processors of source processor system, specified by *PSRefPtr reference, must be the members of the current processor system. If the pointer PSRefPtr is equal to NULL or the reference *PSRefPtr has a zero value then the current processor system will be used as source one.

Internal values of element coordinates of any processor system are numbered from 0. Therefore element (P1, ..., Pj, ..., Pn) of the created processor subsystem is the element (P1+InitIndexArray[0], ... , Pj+InitIndexArray[j-1], ... , Pn+InitIndexArray[n-1]) of the source processor system (n is the rank of source and created systems). The size of i-th dimension of the created subsystem is equal to LastIndexArray[i-1]-InitIndexArray[i-1]+1.

If the flag *StaticSignPtr of static processor subsystem is not equal to zero, then the created processor system will not be deleted automatically, when the control exits the program block (see section 8). Such subsystem can be deleted only explicitly using the function delps_ considered below.

Computational coordinate weights of created subsystem processors will be set to 1.

Note, that processor systems, created by crtps_ function, can be intersected by processors.

4.3Reconfiguring (changing shape of) processor system

PSRef psview_ (

PSRef
long
long
long

*PSRefPtr,
*RankPtr,
SizeArray[],
*StaticSignPtr );

*PSRefPtr

reference to the source (to be reconfigured) processor system.

*RankPtr

rank of the target (reconfigured) processor system.

SizeArray

array, which i-th element is the size of (i+1)-th dimension of the target processor system.

*StaticSignPtr

flag of static target processor system.

The function psview_ creates new processor system from the elements of the source processor system and returns reference to the target system. A number of elements in the source and target systems must be the same.

All processors of source processor system, specified by *PSRefPtr reference, must be members of the current processor system. If the pointer PSRefPtr is equal to NULL or the reference *PSRefPtr has a zero value then the current processor system will be used as source one.

Computational coordinate weights of created subsystem processors will be set to 1.

4.4Deleting processor system

long delps_ (PSRef *PSRefPtr);

*PSRefPtr  reference to the processor system to be deleted.

The function deletes the processor system, created by the function crtps_ (or psview_). When the processor system is deleted, all its subsystems and all mapped on the processor system representations of abstract machines and distributed arrays are deleted also. Abstract machines, mapped on deleted processor system by mapam_ function are not deleted, but the subtasks, created by the function, will not exist (see section 10).

The processor system can be deleted by delps_ function only if it was created in the current subtask and in the current program block (or in its sub-block) (see sections 8 and 10). Initial processor system can't be deleted.

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

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

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