Next: Cost Matrix User Up: Defining a Cost Previous: Default Cost Matrix

Entering a Cost Matrix for Parallel Execution

If you wish to exploit true parallel execution of your HeNCE program, you must allocate more than one host to your abstract parallel machine. To do this, you must define a cost matrix.

A cost matrix is a table, the rows of which are keyed by host names and the columns of which are keyed by subroutine names. There must be exactly one row in the cost matrix for each host in your parallel abstract machine, and there must be exactly one column for each subroutine called from your HeNCE graph. The enties in the cost matrix are integers that represent the relative cost of running a given subroutine on a given host.

Figure 7 shows an example cost matrix. Note that there are two hosts in the abstract parallel machine. Their names are betty and wilma. A HeNCE program that uses this cost matrix will run using only these two machines. The HeNCE program contains three sequential subroutines that are called from nodes: dprod, init , and output.

The cost matrix shows that it is three times as expensive to run subroutine output on betty as it is on wilma, but init is cheaper by a factor of two thirds on betty. HeNCE will use this information to try to run subroutines on the hosts on which they run cheapest.

The defintion of cost is arbitrary. HeNCE simply uses the numbers you provide. Most likely, you will choose to associate the costs with the subroutines' execution times on various machines. Unfortunately, HeNCE provides no support for choosing costs. It does not measure the execution costs. You must estimate them somehow.

If you are running your program on an network of machines with similar performance characteristics (perhaps because all machines are the same kind and have similar loads), it is perfectly reasonable to give all of the costs in the matrix the same value. HeNCE will try to distribute the nodes onto hosts in such a way that good parallelism is obtained.

Note that the hosts in the cost matrix can be of any machine type for which you have installed PVM and the HeNCE libraries. HeNCE will automatically compile the subroutines for the machines on which it might execute them.

Next: Cost Matrix User Up: Defining a Cost Previous: Default Cost Matrix
Wed Jun 15 15:13:55 EDT 1994