Go to the first, previous, next, last section, table of contents.


Prototypes and descriptions

C function: void FM_set_parameter (int parameter, ...)
Set an initialization parameter. If used, call must precede call to FM_initialize(). May be called multiple times, with different parameters. Parameters currently supported are:

Constant: FM_QUIET
Suppress the `FM: Initializing...done' message on startup and the `FM: Received invalid handler ID xxx from node yyy' message when an invalid handler ID is received from the network. [Default: not set]

Example: FM_set_parameter(FM_QUIET);

Constant: FM_MAX_HANDLERS
Sets the maximum number of handlers that can be registered concurrently by FM_register_handler(). [Default: 1024]

Example: FM_set_parameter(FM_MAX_HANDLERS,10000);

Constant: FM_GRM_NAME
DNS name of the machine running the Global Resource Manager. [No default value]

Example: FM_set_parameter(FM_GRM_NAME,"white-elephant.cs.uiuc.edu);

Constant: FM_GRM_PORT
TCP port the Global Resource Manager is listening on. [Default: 17997]

Example: FM_set_parameter(FM_GRM_PORT,16720);

Constant: FM_CM_PORT
TCP port the Context Manager is listening on. [Default: 21328]

Example: FM_set_parameter(FM_CM_PORT,22895);

Constant: FM_KEY_NAME
Program key (i.e. a string representing this instance of the parallel program). [No default value]

Example: FM_set_parameter(FM_KEY_NAME,"I am the eggman");

C function: void FM_initialize (void)
Initialize process-local FM data structures, machine-wide data structures (via communication with the Context Manager), and cluster-wide data structures (via communication with the Global Resource Manager). Causes process to join a program. Must be called before the first invocation of FM_begin_message() or FM_extract().

FM_initialize() assigns initial values to the following user-visible variables:

Variable: ULONG FM_nodeid
Process' logical node number. Ranges from 0 ... FM_numnodes-1.

Variable: ULONG FM_numnodes
One more than the maximum logical node number that is currently part of the program. Hence, if no processes have left the program, FM_numnodes represents the number of logical nodes (i.e. processes) that are currently part of the program.

C function: ULONG FM_register_handler (ULONG id, FM_handler *handler)
Associate handler ID id with handler function handler. id must be either a number between zero and the maximum number of handlers (set by FM_set_parameter(FM_MAX_HANDLERS,value)) or the following constant:

Constant: FM_ANY_ID
Signal to FM_register_handler() that the next available handler ID should be associated with handler.

FM_register_handler() returns the handler ID that was assigned to handler (id if id <> FM_ANY_ID).

A handler function must be registered by FM_register_handler() before any call to FM_extract() that could potentially invoke that handler function. Handler functions may be registered with more than one ID. If the id argument is already associated with a handler function, FM_register_handler() will replace the old association with id==>handler.

Client-server applications will generally use well-known IDs instead of FM_ANY_ID, so the clients know what handlers to invoke on the server. All other applications will generally use FM_ANY_ID, because that prevents name conflicts when using multiple HPVM interfaces in the same program. That is, the first interface that's initialized gets handler IDs 1 ... k, and the second interface gets handler IDs k+1 ... n. (This does imply that the interfaces must be initialized in the same order by every process, to avoid confusion.)

C function: BOOLEAN FM_reallocate_credit (void)
FM's static-window flow-control scheme is extremely conservative because it doesn't know a priori how many processes a program will ever have. FM_reallocate_credit() is a way for a process to tell the FM system that the maximum number of processes that will ever send to it are currently running and that FM should reallocate flow-control credits. The net effect is significantly improved performance for applications that can take advantage of this call.

FM termination is performed with the following function, which must be called by every process in the program:

C function: void FM_finalize (void)
Clean up process-local FM data structures, machine-wide data structures (via communication with the Context Manager), and cluster-wide data structures (via communication with the Global Resource Manager).


Go to the first, previous, next, last section, table of contents.