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

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

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

*ShadowGroupRefPtr  reference 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_.

All elements of all processor systems, the arrays, registered in started group, are mapped on, must belong to the current processor system. Shadow edge renewing of specified group can be started only if all previous operations of shadow edge group renewing, imported element receiving and exported element sending are completed by waitsh_ function (see sections 12.4, 12.5 and 12.6).

The function returns zero.

12.4Initializating receiving imported elements of specified shadow edge group

long recvsh_(ShadowGroupRefPtr *ShadowGroupRefPtr);

*ShadowGroupRefPtr  reference to a shadow edges group.

All elements of all processor systems the, arrays, registered in started group, are mapped on, must belong to the current processor system. Receiving imported elements of the group can be started only if all previous operations of shadow edge renewing of the group and imported element receiving are completed by waitsh_ (see sections 12.4, 12.5 and 12.6).

Imported element receiving can be performed simultaneously with exported element sending (see section 12.5), but can't be started if exported element sending, initialized by non-current subtask, is not completed yet.

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

The function returns zero.

12.5Initializing sending exported elements of specified shadow edges group

long sendsh_ (ShadowGroupRefPtr *ShadowGroupRefPtr);

*ShadowGroupRefPtr  reference to the shadow edges group.

All elements of all processor systems, the arrays, registered in specified group, are mapped on, must belong to the current processor system. Sending exported elements of the group can be started only if all previous operations of shadow edge renewing of the group and imported element sending are completed by waitsh_ function (see sections 12.4, 12.5 and 12.6).

Exported element sending can be performed simultaneously with imported element receiving (see section 12.4), but can't be started if imported element receiving, initialized by non-current subtask, is not completed yet.

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.6Waiting for completion of shadow edge group renewing

long waitsh_(ShadowGroupRef *ShadowGroupRefPtr);

*ShadowGroupRefPtr  reference to the shadow edge group.

The function waitsh_ completes shadow edge renewing operation, initialized by strtsh_ function, and allows to start new shadow edge renewing of the group. The function also performs waiting for completion of imported element receiving and exported elements sending, initialized by recvsh_ or sendsh_ functions (see sections 12.4 and 12.5). After waitsh_ function execution the group becomes opened for distributed arrays including.

Waiting for completion of shadow edge renewing, imported element receiving and exported element sending can be performed only by the subtask, starting the correspondent operation.

The function returns zero.

12.7Deleting shadow edge group

long delshg_(ShadowGroupRef *ShadowGroupRefPtr);

*ShadowGroupRefPtr  reference 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 reference to this group can be used by user program for any goal.

The reduction variable can be deleted by delshg_ function only if it was created in the current subtask and in the current program block (or its sub-block) (see sections 8 and 10). The shadow edge group can't be deleted, if previously started operations of shadow edge renewing, imported element receiving or exported element sending are not completed (see sections 12.4, 12.5 and 12.6).

To delete shadow edge group the function delobj_ can also be used (see section 17.5).

The function returns zero.

13Access to distributed array elements

13.1Coping distributed array element

13.1.1Reading 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.

Specified in the function call distributed array (read or written) must be mapped in the processor system, which each element must belong to the current processor system.

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 System 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.2Copying 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.

As read distributed array as written one must be mapped on the processor systems, which each element must belong to the current processor system.

The function returns the number of the copied bytes.

13.1.3Unified 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.

As read distributed array as written one must be mapped on the processor systems, which each element must belong to the current processor system.

The function returns the number of the copied bytes.

13.2Coping distributed arrays

long arrcpy_(

long
long
long
long
long
long
long
long
long

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

FromArrayHeader

the header of the source distributed array.

FromInitIndexArray

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

FromLastIndexArray

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

FromStepArray

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

ToArrayHeader

the header of the target distributed array.

ToInitIndexArray

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

ToLastIndexArray

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

ToStepArray

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

*CopyRegimPtr

the mode of copying.

The copying is executed until the exhaustion of the source or target elements. The elements are copied according to the C language discipline of allocating of the elements in the memory, that is the right index is changed more faster then the left one. If the initial value of the index by some dimension of the source or target array is greater or equal to its last value, then the index of this dimension is not changed during copy operation. Note, that Run-Time System considers the last index value of any dimension as a minimum of the defined value in the function call and the real size of this dimension minus 1.

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

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

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