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

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

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

To delete a processor system the function delobj_ can also be used (see section 17.5).

The function returns zero.

4.5Weights of processor system elements

Let a processor system be n-dimension array, and a function WEIGHTi with the domain of definition in a space of values of i-th dimension index variable and with image in real numbers, more or equal to 1 be defined for every dimension. A value of function WEIGHTi(Pi) will be called the weight of Pi coordinate (1 i n , 0 Pi < PSSIZEi , PSSIZEi is a size of i-th dimension of processor system).

Then processor (P1, ... , Pi, ... , Pn) weight is by definition

WEIGHT(P1, ... , Pi, ... , Pn) =

n
 WEIGHTi(Pi)
i=1

The coordinate weights of the initial processor system elements (therefore and processor weights) are parameters of Run-Time System startup. When a user program is running the coordinate weights of the processors of the processor system can be assigned (changed) by the function

.long setpsw_(

PSRef
AMViewRef
double

*PSRefPtr,
*AMViewRefPtr,
CoordWeightArray[] );

*PSRefPtr

reference to the processor system, whose element coordinate weights will be assigned.

*AMViewRefPtr

reference to the abstract machine representation, to be mapped onto specified processor system with the assigned coordinate weights.

CoordWeightArray

array, containing processor coordinate weights.

Depending on AMViewRefPtr parameter value there are two ways of setpsw_ function execution.

1. AMViewRefPtr NULL and *AMViewRefPtr 0.

Assigned weights of processor coordinates are intended only for mapping or remapping given representation of abstract machine on given processor system.

When setpsw_ function is called the abstract machine (parental) with representation, specified by *AMViewRefPtr reference, must be already mapped.

All processors of the system, specified by *PSRefPtr reference, must belong to elementary intersection of the current processor system with the processor system, the parental abstract machine is mapped on. NULL value of PSRefPtr pointer or zero value of *PSRefPtr reference means, that coordinate weights of the current processor system elements are assigned.

2. AMViewRefPtr = NULL or *AMViewRefPtr = 0.

Assigned weights of processor coordinates, as the weights, specified at Run-Time System startup, will be used in mapping or remapping of all representations of abstract machines on given processor system (except ones, for those their own procåssor coordinate weights were assigned or will be assigned by setpsw_ function).

All processors of system, specified by *PSRefPtr reference, must be the members of the current processor system. NULL value of PSRefPtr pointer or zero value of *PSRefPtr reference means, that coordinate weights of the current processor system elements are assigned.

The weight of coordinate Pi is specified by a value of

i-1

(PSSIZEk + Pi)-th

k=1

element of the array CoordWeightArray. A number of elements of the array CoordWeightArray, containing processor coordinate weights, must be equal to sum of sizes of all processor system dimensions. The coordinate weights in the array CoordWeightArray may be any positive numbers. Executing function setpsw_, Run-Time System updates every weight Pi dividing it by minimal weight of the coordinate in the array CoordWeightArray.

If CoordWeightArray = NULL or CoordWeightArray[0] = 0, then coordinate weights, specified in Run-Time System startup parameters, are used as assigned coordinate weights (for initial processor system; for not initial processor system in this case coordinate weights will be set to 1).

If CoordWeightArray [0] = 1, then the weights of all coordinates will be set to 1 and will not be updated later, i.e. they will be considered as optimal weights of processor coordinates (see below).

The function returns zero.

The processor coordinate weights, considered above, are called computational weights. They determine distribution of data and computations over processors: computational processor loading is proportional to computational weight of the processor (equal to product of computational weights of its coordinates). The computational weights of the processor coordinates reflect calculation heterogeneity of the task being solved and are specified so that to provide balanced processor loading under condition, that they have the same performances.

A difference in processor performance is specified by performance weights: the processor performance is proportional to its performance weight. The performance weights (real numbers, equal to or more then 1) are Run-Time System startup parameters and cannot be updated by a user program.

When Run-Time System is initialized (and when the function setpsw_ is executed) computational weights of processor coordinates are updated according to the processor performance. The result of updating is optimal weights of the processor coordinates, reflecting as calculation heterogeneity of the task being solved as hardware heterogeneity of the processor system. The optimal weights provide the best balance of computations and are specified as follows. Let:

WEIGHTcalc,i (Pi)

computational weight of Pi coordinate of the processor system (specified under assumption that performance weights of all the processors are equal to 1;

WEIGHTperf (P1, ... , Pi, ... , Pn)

performance weight of the processor element (P1, ... , Pi, ... , Pn);

WEIGHTopt,i (Pi)

optimal weight of coordinate Pi of the processor system i-th dimension.

Let us suppose, that processor weight, determining the processor loading by data and computations is:

  1. proportional to the processor performance weight;

  2. equal to the product of its coordinate weights for any processor performance.

Let us suppose also, that "contribution" of processor performance weight into its coordinate weights is the same.

Therefore a value of processor performance weight WEIGHTperf(P1, ... ,Pi, ... ,Pn) requires to increment the computational weight of any its coordinate by WEIGHTperf1/n(P1, ... ,Pi, ... ,Pn) times.

Since when optimal weight of coordinate Pi is calculated it is necessary to take into account the performance weights of all the processors with coordinate Pi, required weight WEIGHTopt,i(Pi) for any Pi must be a solution of the following optimization task (criterion is best balanced processor loading):

MAX ( abs( WEIGHTopt,i(Pi) 

WEIGHTperf1/n(P1, ... ,Pi, ... Pn) *

0 p1 < pssize1
. . . . . . .. . . . . . ..
0
pi-1 < pssizei-1
0
pi+1< pssizei+1
. . . . . . .. . . . . . ..
0
pn < pssizen

WEIGHTcalc,i(Pi) ) ) MIN

The solution in domain of real numbers, more then or equal to 1, is

WEIGHTopt,i (Pi) =

n

WEIGHTcalc,i (Pi) *

WEIGHTperf1/n (P1, ... ,Pi, ... Pn) /  PSSIZEk

0 p1 < pssize1 k=1
. . . . . . . . . . . . ki
0
pi-1< pssizei-1
0
pi+1< pssizei+1
. . . . . . . . . . . .
0
pn< pssizen

Using optimal weights of processor coordinates for non-uniform distribution of the elements of abstract machine representation (and as consequence, the elements of distributed array and parallel loop iterations) is considered in section 5.7.

Besides setpsw_ function considered above, computational processor coordinate weights can be assigned by the functions

.long genbli_(

PSRef
AMViewRef
AddrType

long

*PSRefPtr,
*AMViewRefPtr,
AxisWeightAddr[],

*AxisCountPtr );

and

.long genbld_(

PSRef
AMViewRef
AddrType

long

*PSRefPtr,
*AMViewRefPtr,
AxisWeightAddr[],

*AxisCountPtr );

The parameters PSRefPtr and AMViewRefPtr of the functions are similar to the same named parameters of setpsw_ function. Processor coordinate weights are set in an array, individual for every dimension of the processor system. The array address is contained in AxisWeightAddr array: i-th element of AxisWeightAddr array is the pointer, cast to AddrType, to the array, containing processor coordinate weights of (i+1)-th dimension of the specified processor system. The function genbli_ assumes that processor coordinate weights are represented as positive integer numbers (integer), and the function genbld_  positive float numbers (double).

Zero value of AxisWeightAddr[i] means, that for (i+1)-th dimension of the processor system the processor coordinate weights will be equal to the weights, specified in Run-Time System startup parameters (for initial processor system), or to 1 (for other one).

*AxisCountPtr parameter (non-negative integer) defines a number of AxisWeightAddr array elements. Its value can't exceed specified processor system rank. AxisWeightAddr array elements, lacking up to the processor system rank, will be assumed equal to null. In particular, zero value of *AxisCountPtr means, that the weights of all coordinates of all the processors will be set equal to 1 or to the weights, specified in Run-Time System startup parameters.

The functions return zero values.

Note. genbli_ and genbld_ functions just call the function

.long genblk_(

PSRef
AMViewRef
AddrType

long

long

*PSRefPtr,
*AMViewRefPtr,
AxisWeightAddr[],

*AxisCountPtr,

*DoubleSignPtr );

First four parameters of the function are identical to same named parameters of genbli_ and genbld_ functions, and last one, *DoubleSignPtr is non-zero flag to represent processor coordinate weights as positive float numbers (double).

4.6Specifying coordinate weights of processors using their loading weights

.long setelw_ (

PSRef
AMViewRef
AddrType
long
long

*PSRefPtr,
*AMViewRefPtr,
LoadWeightAddr[],
WeightNumber[],
*AddrNumberPtr );

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

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

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