hosts(i;j)

Read(579) Label: node, memory zone number, task name,

Description:

Set or get the number of memory zone holding a specified task on the current node.

Syntax:

hosts(i;j)

Note:

The function gets the number of memory zone accommodating task j on the current node when parameter i is absent; sets the number of memory zone holding task j on the current node when both parameter i and parameter j are present; and clear the existing memory zone number when i is 0. It is usually used in the initiation file init.dfx.

Parameter:

i

An integer that represents memory zone number

j

Task name; can be absent

Return value:

Boolean value or integer

Example:

 

A

 

1

=hosts(2;"task2")

Set the number of memory zone holding task 2 on the current node as 2, and return true.

2

=hosts(;"task2")

Get the number of memory zone holding task 2 on the current node as 2, and return true.

3

=hosts(0;"task2")

Delete the number of memory zone holding task 2 and return true since parameter i is 0.

4

=hosts(;"task2")

Then get the number of memory zone holding task 2 on the current node as 2, and return false.