Unify(3)

Synopsis

cc [ flag ... ] file ... -lunify -levents -lpvm3 -lgpvm3 -lthread -ll -lsocket -lnsl -lw -lposix4 -lucb [ library ... ]

#include "unify.h"

Description

Unify is a library for developing distributed share memory applications. In the Unify model, worker processes share memory through segements. Worker processes see changes to segments depending on the type of segment. Worker processes synchronize using event counters and sequencers.

Random Segments

A random segment is a contiguous chunk of memory shared by several workers.

Sequential Segments

Worker processes can write chunks of data into a sequential segment and read it out similarly to unix pipes.

Associative Segments

Processes retrieve values from an associative segment using a key. Associative segments are currently not implemented.

Global Variables

Unify provides each worker process with several global variables. Some of them may be implemented as macros.

Num_Workers The current number of worker processes running.
Worker_Id The worker identifier of the current process Worker identifiers range from 1 to Num_Workers. The master is worker number 1.
MASTER A boolean set to true for worker number 1. For all other workers, MASTER is false.
USER_SEG_ID The segment identifier of the user segment. The user segment is a random access segment of length USER_SEG_LEN bytes. After calling unify_startup any worker process can access the user segment. It is intended to provide a method for distributing information to workers after initialization.
USER_SEG_LEN The length of the user segment.
START_EVENT_ID An event counter identifier of the start event counter. The start event counter is automatically created by Unify during startup. Application programs can use it for synchronization during their initialization (see Event Counters and Sequencers(3) for more information about event counters).

Synchronization

Unify uses event counters and sequencers for synchronization. For more information about event counters and sequencers see Event Counters and Sequencers(3).

Running Unify Programs

A unify program, like any other program, is invoked by typing the command name followed by arguments. Installing executables in a directory that is always part of the path is recommended.

If the command does not include a path (that is, it has no "/" characters) it will be found using the PATH environment variable. Otherwise, if the path to the executable is absolute, it must exist on all machines. If the path is relative, it will be relative to the current working directory on the current machine and relative to the home directory on all other machines. If the PATH environment variable contains relative paths, such as ".", it will be relative to the current working directory on the local machine and relative to the home directory on other machines. For example, typing

./foo -- -n 4
where foo is the name of a Unify program, will attempt to run the executable called foo in the current working directory on the local machine and $HOME/foo on all other machines. Installing binaries in a directory in the path on all machines (for example, $PVM_ROOT/bin/$PVM_ARCH) avoids this problem.

Unify programs pass all options following the first -- option to the unify library. The following options are valid:
-c, -checkpoint Enable checkpointing (not currently supported).
-d Turn on low-level debug messages.
-e Turn on low-level error messages.
-f Flush messages as they are generated.
-h Print a help message.
-m bytes Set maximum shared heap size to bytes bytes.
-n nodes Start nodes Unify worker processes.
-t sec Set initial frame timeout to sec seconds.
-v, -recover Recover from a checkpoint (not currently supported).
-w path Use path as the current working directory.
-noheartbeat Disable heartbeat timeouts.

By default Unify attempts to run in the same directory as the current working directory on every host. If the current directory is a subdirectory (or subsubdirectory, etc) of the user's home directory, Unify will try to change to the same directory relative to the home directory. The absolute path to the home directory need not be the same on every host. If the current directory is not a subdirectory of the user's home directory, Unify will try to use the same absolute path on all hosts. If the directory does not exist on one or more machines, Unify will exit.

If the -w option is specified, Unify treats the specified path as the current working directory.

Note: symbolic links are expanded to full paths on the host on which Unify is invoked. If the link evalutes to something outside the user's home directory it will be treated as an absolute path, otherwise the path to which the symbolic link evaultes is used as a home relative path on all hosts.

See Also

Create_Seg(3), Destroy_Seg(3), Dont_Need_Updates(3), Get_Limit(3), Get_Updates(3), Need_Updates(3), Put_Updates(3), Seg_Adr(3), Seq_Read(3), Seq_Wakeup(3), Seq_Write(3), Unify_Close(3), unify_startup(3), xunify(1), Advance(3), Await(3), Await_with_Timeout(3), Create_Event(3), Destroy_Event(3), Read_Count(3), Create_Sequencer(3), Destroy_Sequencer(3), Get_Ticket(3), Event Counters and Sequencers(3)


RCS status $Id: unifyintro.html,v 1.12 1998/02/18 21:57:40 dieter Exp $