 
How to use HeNCE 2.0 help:

Press ``Next'' to go to the next page.
Press ``Prev'' to go to the previous page.
Press ``Done'' to make the help display go away.

Now press ``Next'' for the first help screen.

 
Compose Mode

The HeNCE tool is normally in compose mode.
In compose mode you may:

* Edit the graph in the HeNCE graph window.

* Edit node subroutines.

* Define the interface between the node subroutines
  and the graph.

* Edit the cost matrix.

 
The HeNCE graph

The graph consists of nodes and arcs connecting the nodes.  
Normal nodes indicate computation, while pairs of ``special'' 
nodes control how the graph is expanded.

Arcs indicate dependencies.  Before a node can be
evaluated, all of its parent nodes must have completed
processing.

 
Node types:

&normal_node; ``Normal'' nodes represent computation to be
performed by a C or FORTRAN subroutine.

&fanout_node; Pairs of ``fanout'' nodes cause multiple instances 
of the enclosed subgraph to be evaluated concurrently.

&beginloop_node; Pairs of ``loop'' nodes cause repeated sequential 
evaluation of a subgraph.

More Node types:

&begincond_node;  A subgraph enclosed by a pair of ``conditional'' 
nodes will be evaluated only if the condition is true.

&beginpipe_node; ``Pipes'' are like loops, except that the graph is 
evaluated a fixed number of times, and the expansion 
occurs when the pipe node is first evaluated.

 
Creating/Editing the HeNCE graph:

The ``File'' pull-down menu above the graph window allows
you to save, load, and print HeNCE graphs.

The ``Edit'' pull-down menu has functions to help you
``clean up'' your graph to look good on the screen, and
to check the graph for consistency.

The node palette to the left of the graph window allows you 
to select which type of node you are using.  Just click on 
the appropriate icon to select a particular node type.

 
Mouse buttons in the graph window:

You may use the mouse in the graph window to create, 
delete, and move nodes and arcs, and edit node programs
as follows:


 
Grammar for normal nodes

NODE num [ loc ] 

followed by input declarations:

NEW  < type var [ = expr ] ;
NEW  <> type var [ = expr ] ;
< [ type ] var;
<> [ type ] var;

(where var is a scalar or array declaration),

[ var = ] subr_name ( expr, expr, ... );

followed by output declarations of the form:

> var;


 
Grammar for other nodes

COND num [ loc ] ( expr ) ;

FANOUT num [ loc ] var = expr TO expr ;

PIPE num [ loc ] var = expr TO expr ;

LOOP num [ loc ] ( var = expr ; expr ; var = expr ) ;

 
Creating/Editing the Cost Matrix

The cost matrix allows you to tell the HeNCE executioner 
how much it ``costs'' to run a particular subroutine on 
a particular machine.  If no cost appears in the cost 
matrix, or if the cost is zero, that subroutine cannot be
run on that machine.

You must define a cost matrix before building or running a 
HeNCE program.  You must have a nonzero cost on some 
machine  for each subroutine that appears in the graph.

 
Adding/Deleting hosts in the virtual machine.

To add a new host or subroutine, use the Add Host or Add
Machine function of the Edit pull-down menu just above the
cost matrix.  To delete a host or subroutine, move the cursor
to the cell containing the host or subroutine name and use 
the Delete or BackSpace key to delete the name.  (It is not
necessary to delete the costs also.)  The Add From Graph
function creates an empty entry in the cost matrix for each
subroutine in the graph.

You can only change the cost matrix in Compose mode.
The changes don't take effect until the next Run or Build.

 
Build Mode

To build and install the node programs required to run a
HeNCE program, select the Build function from the Build 
pull-down menu above the cost matrix.  You must have 
defined a cost matrix first, so build will know which node 
programs to install on which machines.

Htool uses PVM and a helper program (proxyd) to copy the
source files to each machine, compile them, and install them.  
The results are displayed in the Information window and by 
the colors in the cost matrix.  Yellow means the file has 
been copied, green means the compile is in progress, violet
means the program has been compiled and installed, and 
red means an error has occurred.

 
Run Mode

To run a HeNCE program, select the Run function from the
Run pull-down menu above the cost matrix.  You must set
the name of the trace file using the Set Trace File option
before you can run the program.

Any output from the program will appear in the PVM console
window below the cost matrix.  As the program is running, 
the state of the machine is displayed in the cost matrix, 
histogram, and the graph display in the compose window.  

Green means at least one copy of that node program is 
running on that machine; yellow means one or more copies 
of that node program are idle.

The histogram uses the same colors, plus gray to indicate 
that the machine is not in use.

 
Trace Mode

To play back execution of a HeNCE program, use the Load
Trace File function of the Trace pull-down menu.  The 
``tape-player'' buttons can be used to control playback.
During ``play'' mode, the speed slider can be used to 
control the speed of animation.

In trace mode, the histogram window displays the state of 
each machine over time.  The up and down arrows can be 
used to change the time scale, and the scroll bars can 
be used to display different parts of the history.  A red 
vertical ``hairline'' indicates the current trace time.

 
Miscellaneous

The ``HeNCE version 2.0'' box at the upper-left of the tool 
window is also a pull-down menu, from which you can 
toggle the current language (between C and FORTRAN), 
change the current directory, and exit the program.

