Sun MPI 4.0 User's Guide: With CRE

Value-Based Attributes

Value attributes can take a literal value or a numeric value. Or, depending on the operator used, they may take no value.

% mprun -R "name = hpc-demo" a.out
% mprun -R "load5 < 4" a.out

specifies that you only want nodes whose individual load averages over the previous 5 minutes were less than 4.

% mprun -R "mem_total>>" a.out

specifies that you prefer nodes with the largest physical memory available.

Table 3-4 identifies the operators that can be used in RRS expressions.

Table 3-4 Operators Valid for Use in RRS

Operator 

Meaning 

Select all nodes where the value of the specified attribute is less than the specified value. 

<= 

Select all nodes where the value of the specified attribute is less than or equal to the specified value. 

Select all nodes where the value of the specified attribute is equal to the specified value. 

>= 

Select all nodes where the value of the specified attribute is greater than or equal to the specified value. 

Select all nodes where the value of the specified attribute is greater than the specified value. 

!= 

Attribute must not be equal to the specified value. (Precede with a backslash in the C shell.) 

<< 

Select the node(s) that have the lowest value for this attribute. 

>> 

Select the node(s) that have the highest value for this attribute. 

The operators have the following precedence, from strongest to weakest:

unary -
*, /
+, binary -
=, !=, >=, <=, >, <, <<, >>
!
&, |
?

If you use the << or >> operator, the CRE does not provide load balancing. In the previous example, the CRE would choose the node with the most free swap space, regardless of its load. If you use << or >> more than once, only the last use has any effect--it overrides the previous uses. For example,

% mprun -R "mem_free>> swap_free>>" a.out

initially selects the nodes that have the most free memory, but then selects nodes that have the largest amount of available swap space. The second selection may yield a different set of nodes than were selected initially.

You can also use arithmetic expressions for numeric attributes anywhere. For example,

% mprun -R "load1 / load5 < 2" a.out

specifies that the ratio between the one-minute load average and the five-minute load average must be less than 2. In other words, the load average on the node must not be growing too fast.

You can use standard arithmetic operators as well as the C ?: conditional operator.


Note -

Because some shell programs interpret characters used in RRS arguments, you may need to protect your RRS entries from undesired interpretation by your shell program. For example, if you use csh, write "-R \!private" instead of "-R !private".