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

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

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

Renewing the shadow edges of the distributed array local parts is an asynchronous operaôion (that is operation executed in parallel with computations). During this operation each element-original (possibly updated) is copied to the corresponding shadow edge element (possibly obsolete). For optimization purpose, the shadow edges of the distributed arrays are combined in a group, and shadow edge exchange is implemented as a set of operations, executed over the specified group of the shadow edges.

12.1Creating shadow edge group

ShadowGroupRef crtshg_(long *StaticSignPtr);

*StaticSignPtr  the flag of the static shadow edge group creation.

The function crtshg_ creates empty shadow edge group (that is group that does not contain any shadow edge). The function returns reference to the created group.

If the flag *StaticSignPtr of the static shadow edge group creation is not equal to zero, then the created group does not deleted automatically when the control exits from the current program block (see sections 8). Such shadow edge group has to be deleted explicitly using the function delshg_.

12.2Including shadow edge in the group

long inssh_ (

ShadowGroupRef
long
long
long
long

*ShadowGroupRefPtr,
ArrayHeader[],
LowShdWidthArray[],
HiShdWidthArray[],
*FullShdSignPtr );

*ShadowGroupRefPtr

reference to the shadow edge group.

ArrayHeader

the header of the distributed array.

LowShdWidthArray

array, which i-th element is the width of the low shadow edge of the (i+1)-th dimension of the array.

HiShdWidthArray

array, which i-th element is the width of the high shadow edge of the (i+1)-th dimension of the array.

*FullShdSignPtr

flag of full shadow edge renewing (if it is equal to one).

Including distributed array shadow edge in the group means only registration of this shadow edge as a member of shadow edge group. Run-Time System does not storage the values of this shadow edge in the system renewing buffer.

Specified in the function call shadow edge group must be created in the current subtask. Before including in the shadow edge group the distributed array must be mapped on the processor system (by align_, realn_, malign_ or mrealn_ functions), which each element must belong to the current processor system.

The distributed array can be included in several shadow edge group and also reincluded in the same group. In the last case shadow edge widths, specified in inssh_ function call, must be equal to shadow edge widths, specified in previous inclusion in this group. It is not allowed to include the array in the group, that performs shadow edge exchange or receives (sends) imported (exported) elements. New elements can be included in such group only after completion of these operations (see strtsh_, recvsh_, sendsh_ and waitsh_ function description in sections 12.3-12.6).

The widths of the array shadow edges defined by the LowShdWidthArray and HiShdWidthArray parameters should not fall outside the limits of the shadow edge widths defined in the function crtda_ when the array was created. If the shadow edge width is equal to -1, then the width defined in the function crtda_ is used.

If *FullShdSignPtr = 0, then only low and high shadow edges of all dimensions of the distributed array participate in shadow edge exchange operations. If *FullShdSignPtr = 1, then the full shadow edge of the distributed array participates.

The function returns zero.

The exchange of shadow edges, that is the union of shadow bounds, requires a communication of the current processor with 2*n "neighbors" (n is the rank of the distributed array, 2*n is a number of shadow bounds), and exchange of the full shadow edges requires the communication with 3n-1 "neighbors". So if the shadow edge as union of shadow bounds don't cover task needs and full shadow edge exchange is inadmissible because of overheads, Run-Time System provides a possibility to choice sufficient and optimal scheme of shadow edges exchange. The scheme is based on a representation of the shadow edge as union of elementary shadow n-dimensional parallelepipeds.

Let Q = (q1, ... ,qk, ... ,qn) be n-combination with repetition from the elements of the set {0,1,2} (the combination (0, ... ,0) is not considered). Let n-dimensional parallelepiped PQ = M1 ... Mk ... Mn is corresponded to it, where:

Mk =

{

M0,k = { Ik  Mk: Ik,init

Ik ≤ Ik,last

} if qk = 0,

M1,k = { Ik  Mk: Ik,init – LWk

Ik ≤ Ik,init – 1

} if qk = 1,

M2,k = { Ik  Mk: Ik,last + 1

Ik ≤ Ik,last + HWk

} if qk = 2.

Here:

Ik

index variable of k-th dimension of distributed array (1 k n);

Ik,init

initial value of index variable of k-th dimension;

Ik,last

last value of index variable of k-th dimension;

Mk

range of index variable values of k-th dimension;

LWk

width of low part of the edge of k-th dimension;

HWk

width of high part of the edge of k-th dimension.

The parallelepiped PQ is called elementary shadow n-dimensional parallelepiped.

The full shadow edge of the distributed array is a union of all elementary shadow parallelepipeds (except of the parallelepiped, corresponding to (0, ... ,0) combination and that is the local part of the distributed array). A number of elementary parallelepipeds, formed the full shadow edge, is A3n - 1 = 3n - 1.

Low (high) shadow bound of k-th dimension is elementary shadow parallelepiped, corresponding to n-combination, where qk = 1(2), and others qi are equal to zero.

Run-Time System allows to specify any set of elementary shadow parallelepipeds for shadow edge exchange using function insshd_, including a shadow edge of a distributed array into the edge group and described below.

long insshd_ (

ShadowGroupRef
long
long
long
long
long

*ShadowGroupRefPtr,
ArrayHeader[],
LowShdWidthArray[],
HiShdWidthArray[],
*MaxShdCountPtr,
ShdSignArray[] );

*ShadowGroupRefPtr

reference to the shadow edge group.

ArrayHeader

header of the distributed array.

LowShdWidthArray

array, which i-th element is the width of the low shadow edge of the (i+1)-th dimension of the array.

HiShdWidthArray

array, which i-th element is the width of the high shadow edge of the (i+1)-th dimension of the array.

*MaxShdCountPtr

maximal possible number of dimensions which code of participation in shadow edge forming more then one for any elementary parallelepiped included in the shadow edge.

ShdSignArray

array, which i-th element contains participation flag of the (i+1)-th dimension of the array in shadow edge forméng.

The widths of the array shadow edges, specified by the parameters LowShdWidthArray and HiShdWidthArray, must not be more, then shadow edge widths, specified when the considered array was created by the function crtda_. If -1 is set as shadow edge width, then shadow edge width, specified when the array was created, will be used.

A participation flag of (i+1)-th dimension in the edge forming, specified in i-th element of array ShdSignArray, can have the following values:

1

the array shadow edge contains only those elementary parallelepipeds, for which Mi = M0,i;

2

the shadow edge contains only those elementary parallelepipeds, for which Mi = M1,i;

3

the shadow edge contains only those elementary parallelepipeds, for which Mi = M0,i or Mi = M1,i;

4

the shadow edge contains only those elementary parallelepipeds, for which Mi = M2,i;

5

the shadow edge contains only those elementary parallelepipeds, for which Mi = M0,i or Mi = M2,i;

6

the shadow edge contains only those elementary parallelepipeds, for which Mi = M1,i or Mi = M2,i;

7

the shadow edge must contain elementary parallelepipeds, with any set Mi (M0,i, M1,i or M2,i).

The parameter *MaxShdCountPtr (positive number) restricts shadow shell of the local part of the distributed array, participating in the shadow edge exchange, by allowing to include in the shell only those elementary parallelepipeds, for which

n
1
i=1

Mi  M0,i



 *MaxShdCountPtr
.

That is, elementary parallelepipeds, for which a number of dimensions, violating the array local part, is more then *MaxShdCountPtr, can't be included in the shadow edge, participating in the exchange.

The array ShdSignArray must contain at least one element, more than 1 (shadow edge of distributed array must not coincide with its local part).

The function returns zero.

Note. Including shadow edges of distributed array in the shadow edge group using the function inssh_ is equivalent to execution of the function insshd_, if the parameter *MaxShdCountPtr = 1 and all elements of the array ShdSignArray are equal to 7. To include the full shadow edge of the distributed array in the shadow edge group using the function insshd_ the parameter *MaxShdCountPtr has be equal to the distributed array rank, and all elements of the array ShdSignArray has also to be equal to 7.

12.3Starting shadow edge group renewing

long strtsh_ (ShadowGroupRef *ShadowGroupRefPtr);

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

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

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