Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pvm_insert(3pvm) [redhat man page]

INSERT(3PVM)							  PVM Version 3.4						      INSERT(3PVM)

NAME
pvm_insert - store data in pvmd database [In Version 3.4: Relaced by pvm_putinfo] SYNOPSIS
C int cc = pvm_insert( char *name, int index, int data ) Fortran Not available PARAMETERS
name The class name, a null-terminated string. index The class index, >= 0 or -1 for first available. data Data to store in the <name, index> entry. DESCRIPTION
The master pvmd maintains a simple database, which can be used to store values such as tids and make them accessible anywhere within a vir- tual machine. This is useful when building an application such as the group server, which must advertise its task id so clients can regis- ter send messages to register. The database stores integer data, indexed by <name, index> pairs. The name may be any null-terminated string and the index any non-nega- tive integer. Database entries are grouped by name into classes; index may be specified as -1 to store or retrieve the first available instance in a class. These functions are not part of the group library, but are the underlying mechanism used to implement it. pvm_insert stores data at the given index. If index is -1, the data is stored at the first available index in the named class, starting at 0. ERRORS
If successful, pvm_insert returns the index at which the data was stored, otherwise it returns a negative result. The following error con- ditions can be returned: PvmBadParam giving an invalid argument value. PvmDupEntry the requested <name, index> pair is already in use. SEE ALSO
pvm_delete(3PVM), pvm_lookup(3PVM) 27 June, 1994 INSERT(3PVM)

Check Out this Related Man Page

SIBLINGS(3PVM)							  PVM Version 3.4						    SIBLINGS(3PVM)

NAME
pvm_siblings - return the number and associated task ids of processes that were started together in a single spawn call. SYNOPSIS
C int ntids = pvm_siblings( int **tids ) Fortran call pvmfsiblings( ntids, index, sibling ) PARAMETERS
ntids Returns the number of tids that were spawned together. Value less than 0 indicates an error. tids Pointer to the array of tids that contains the siblings. Indexed from 0 to (ntids - 1) index Integer index of tid to be returned in sibling. If index is set to -1, then sibling is unchanged. Otherwise, must be in the range [0, ntids - 1] sibling When index is in the range [0, ntids -1], this contains the tid of the desired index. DESCRIPTION
The routine pvm_siblings returns the number of tasks and a list of task ids of processes that were spawned together in a single spawn call. The spawning task multicasts the list of successful to the spawned tasks so that each task has an identical copy of the sibling list. pvm_siblings uses local storage to keep the list of tids and does not update this list when sibling tasks exit the virtual machine. The FORTRAN version allows calling programs read a particular index in the internal sibling array. If pvm_siblings is successful, ntids will be > 0. If some error occurs then ntids will be < 0. pvm_siblings is designed to simplify the logic in static spmd-style programs. By giving tasks an identical list of tids and its size, pro- grams may self size and treat the sibling as static map between instances and tasks. The internal list is not updated when sibling tasks exit the virtual machine and should be treated as a snapshot of the parallel program when it was first started. If a task was started by pvm_spawn, then pvm_siblings will return ntids = 1 and ntids = 1 and tids will contain a single entry identical to the task id returned by pvm_mytid() EXAMPLES
C: int *tids; ntids = pvm_siblings(&tids); Fortran: INTEGER TIDS(0:MAXNPROC) CALL PVMFSIBLINGS(NTIDS, -1, IDUM) DO I = 0, NTIDS-1 CALL PVMFSIBLINGS(NTIDS, I, TIDS(I)) ERRORS
pvm_siblings can return the following error codes PvmNoTask No task at that index, or index is invalid. SEE ALSO
pvm_spawn(3PVM), pvm_mytid(3PVM), pvm_parent(3PVM) 26 June, 1997 SIBLINGS(3PVM)
Man Page