LIBDVM2 (1158351), страница 11

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

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

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 Library 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. A shadow edge of a distributed array includes low (high) shadow edge of k-th dimension, if it contains all allowable by other dimensions elementary shadow parallelepipeds, for which Mk = M1,k(M2,k). The dimension k participates in shadow edge forming, if it includes low or high shadow edge of this dimension. The dimension k don't participate in the distributed array shadow edge forming, if the shadow edge contains only the elementary shadow parallelepipeds, for which Mk = M0,k.

long insshd_(

ShadowGroupRef
long
long
long
long
long

*ShadowGroupRefPtr,
ArrayHeader[],
LowShadowWidthArray[],
HiShadowWidthArray[],
*MaxShadowCountPtr,
ShadowSignArray[]);

*ShadowGroupRefPtr

- pointer to the shadow edge group.

ArrayHeader

- header of the distributed array.

LowShadowWidthArray

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

HiShadowWidthArray

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

*MaxShadowCountPtr

- maximal number of array dimensions, which can take part in shadow edge forming (positive number).

ShadowSignArray

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

The widths of the array shadow edges, specified by the parameters LowShadowWidthArray and HiShadowWidthArray, 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 ShadowSignArray, can have the following values:

0 - (i+1)-th dimension doesn't participate in shadow edge forming;

1 - shadow edge has to include low shadow edge of (i+1)-th dimension;

2 - shadow edge has to include high shadow edge of (i+1)-th dimension;

3 - shadow edge has to include as low as high shadow edges of (i+1)-th dimension;

The array ShadowSignArray has to contain at least one non-zero element.

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 *MaxShadowCountPtr = 1 and all elements of the array ShadowSignArray are equal to 3. To include the full shadow edge of the distributed array in the shadow edge group using the function insshd_ the parameter *MaxShadowCountPtr has be equal to the distributed array rank, and all elements of the array ShadowSignArray has also to be equal to 3.

12.3. Starting shadow edge group renewing.

long strtsh_ (ShadowGroupRef *ShadowGroupRefPtr);

*SShadowGroupRefPtr - pointer to the shadow edge group.

The function strtsh_ initializes the system renewing buffer (if the shadow edge group is renewed at first time) and starts the shadow edge renewing operation for all shadow edges registered by the function inssh_. It is not allowed to include new distributed array shadow edges in the group after the first start of the shadow edge renewing.

The function returns zero.

12.4. Initializating receiving imported elements of specified shadow edge group.

long recvsh_(ShadowGroupRefPtr *ShadowGroupRefPtr);

*ShadowGroupRefPtr - pointer to a shadow edges group.

Waiting for completion of receiving imported elements is performed by the function waitsh_ (see section 12.6).

The function returns zero.

12.5. Initializing sending exported elements of specified shadow edges group.

long sendsh_ (ShadowGroupRefPtr *ShadowGroupRefPtr);

*ShadowGroupRefPtr - pointer to a shadow edges group.

Waiting for completion of sending exported elements is performed by the function waitsh_ (see section 12.6).

The function returns zero.

Note. The sequence of function calls

recvsh_(ShadowGroupRefPtr);

sendsh_(ShadowGroupRefPtr);

is equivalent to the call

strtsh_(ShadowGroupRefPtr);

12.6. Waiting for completion of shadow edge group renewing.

long waitsh_(ShadowGroupRef *ShadowGroupRefPtr);

*ShadowGroupRefPtr - pointer to the shadow edge group.

The function returns zero.

12.7. Deleting shadow edge group.

long delshg_(ShadowGroupRef *ShadowGroupRefPtr);

*ShadowGroupRefPtr - pointer to the shadow edge group.

The function delshg_ deletes the shadow edge group created by the function the crtshg_. After deleting of the group the pointer to this group can be used by user program for any goal.

Note, that non-static shadow edge group can be deleted by the function delshg_ only if it was created in the current program block.

The function returns zero.

13. Access to distributed array elements.

13.1. Coping distributed array element.

13.1.1. Reading distributed array element and assigning value to element.

long rwelm_(

long
long
long

FromArrayHeader[],
ToArrayHeader[],
IndexArray[]);

FromArrayHeader

- the header to the source distributed array or the pointer to the source memory area.

ToArrayHeader

- the header to the distributed array, which contains the target element, or the pointer to the target memory area.

IndexArray

- array, which i-th element is an index of the source or target element on the (i+1)-th dimension.

If the function rwelm_ is used to read the element of the distributed array, then:

FromArrayHeader

- the header of the distributed array containing the source element;

ToArrayHeader

- pointer to the target memory area;

IndexArray

- array of the indexes of the source element.

If the function rwelm_ is used to assign the value to the element of the distributed array, then:

FromArrayHeader

- pointer to the source memory area;

ToArrayHeader

- the header of the distributed array, containing the target element;

IndexArray

- array of the indexes of the target element.

Reading is executed on all the processors. Writing (modification of the element of the distributed array) is executed only on the processors, where the element is allocated.

The number of the indexes in the array IndexArray has to be equal to the rank of the source or target array.

The function returns the number of bytes actually read or written (that is the element size of the source or target array).

Note. To avoid warnings from Fortran-compiler when the function rwelm_ is called with different types of variables, the distributed array element will be assigned to, Run-Time Library provides the function

long rwelmf_ (

long
AddrType
long

FromArrayHeader[],
*ToArrayHeaderPtr,
IndexArray[])

distinguished from the function rwelm_ in the second parameter:

*ToArrayHeaderPtr

- pointer to a memory area, the distributed array element cast to type AddrType by one of the functions from section 17.7 will be written in.

Other parameters of the function rwelmf_ are similar to the corresponding parameters of the function rwelm_.

13.1.2. Copying one element of distributed array to another.

long copelm_ (

long
long
long
long

FromArrayHeader[],
FromIndexArray[],
ToArrayHeader[],
ToIndexArray[]);

FromArrayHeader

- the header of the source distributed array.

FromIndexArray

- array, which i-th element is the index of the source element on the (i+1)-th dimension.

ToArrayHeader

- the header of the target distributed array.

ToIndexArray

- array, which j-th element is the index of the target element on the (i+1)-th dimension.

The types of the source and target elements have to be the same. The function returns the number of the copied bytes.

13.1.3. Unified coping of element of distributed array.

long elmcpy_(

long
long
long
long
long

FromArrayHeader[],
FromIndexArray[],
ToArrayHeader[],
ToIndexArray[],
*CopyRegimPtr);

FromArrayHeader

- the header of the source distributed array, or the pointer to the source memory area.

FromIndexArray

- array, which i-th element is the index of the source element on the (i+1)-th dimension.

ToArrayHeader

- the header of the target distributed array.

ToIndexArray

- array, which j-th element is the index of the target element on the (i+1)-th dimension.

*CopyRegimPtr

- the mode of copying.

The function elmcpy_ is a generalization of the more specialized functions rwelm_ and copelm_ discussed above.

If FromArrayHeader and ToArrayHeader are the headers of the distributed arrays, then the types of the elements of this arrays have to be the same.

If FromArrayHeader (ToArrayHeader) is the pointer to the memory area, then the values of the array FromIndexArray (ToIndexArray) is ignored. In this case, the copying is controlled by the *CopyRegimPtr flag. If *CopyRegimPtr is not equal to zero, then the memory is assumed to be allocated on the I/O processor only. The pointers FromArrayHeader and ToArrayHeader must not be both the pointers to a memory area.

The function returns the number of the copied bytes.

13.2. Coping distributed arrays.

long arrcpy_(

long
long
long
long
long
long
long
long
long

FromArrayHeader[],
FromInitIndexArray[],
FromLastIndexArray[],
FromStepArray[],
ToArrayHeader[],
ToInitIndexArray[],
ToLastIndexArray[],
ToStepArray[],
*CopyRegimPtr);

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

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

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