Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pvm_notify(3pvm) [redhat man page]

NOTIFY(3PVM)							  PVM Version 3.4						      NOTIFY(3PVM)

NAME
pvm_notify - Request notification of PVM event such as host failure. SYNOPSIS
C int info = pvm_notify( int what, int msgtag, int cnt, int *tids ) Fortran call pvmfnotify( what, msgtag, cnt, tids, info ) PARAMETERS
what Type of event to trigger the notification. Presently one of: Value Meaning PvmTaskExit Task exits or is killed PvmHostDelete Host is deleted or crashes PvmHostAdd New host is added msgtag Message tag to be used in notification. cnt For PvmTaskExit and PvmHostDelete, specifies the length of the tids array. For PvmHostAdd, specifies the number of times to notify. tids For PvmTaskExit and PvmHostDelete, an array of length cnt of task or pvmd TIDs to be notified about. The array is not used with the PvmHostAdd option. info Integer status code returned by the routine. Values less than zero indicate an error. DESCRIPTION
The routine pvm_notify requests PVM to notify the caller on detecting certain events. One or more notify messages (see below) are sent by PVM back to the calling task. The messages have tag msgtag supplied to notify. The notification messages have the following format: PvmTaskExit One notify message for each TID requested. The message body contains a single TID of exited task. PvmHostDelete One notify message for each TID requested. The message body contains a single pvmd-TID of exited pvmd. PvmHostAdd cnt notify messages are sent, one each time the local pvmd's host table is updated. The message body contains an integer length followed by a list of pvmd-TIDs of new pvmds. The counter of PvmHostAdd messages yet to be sent is replaced by successive calls to pvm_notify. Specifying a cnt of -1 turns on PvmHostAdd messages until a future notify; a count of zero disables them. TIDs in the notify messages are packed as integers. The calling task is responsible for receiving messages with the specified tag and taking appropriate action. Future versions of PVM may expand the list of available notification events. EXAMPLES
C: info = pvm_notify( PvmTaskExit, 9999, ntask, tids ); Fortran: CALL PVMFNOTIFY( PVMHOSTDELETE, 1111, NUMHOSTS, DTIDS, INFO ) To "cancel" a notify request in PVM, the pvm_notify routine can be re-invoked with an additional PvmNotifyCancel flag in the what argument. The remaining arguments to this cancelling invocation must match the original invocation exactly, aside from the additional PvmNotifyCancel which can be added(+) or OR-ed(|) to the what argument: pvm_notify( PvmTaskExit, 9999, ntask, tids ); . . . pvm_notify( PvmTaskExit | PvmNotifyCancel, 9999, ntask, tids ); Note that when a notify is cancelled, the notify message is delivered, as if the given event (i.e. task exit, host add or delete) had occurred. ERRORS
PvmSysErr pvmd not responding. PvmBadParam giving an invalid argument value. SEE ALSO
pvm_tasks(3PVM), pvm_config(3PVM) 31 January, 1994 NOTIFY(3PVM)

Check Out this Related Man Page

SEND(3PVM)							  PVM Version 3.4							SEND(3PVM)

NAME
pvm_send - Immediately sends the data in the active message buffer. SYNOPSIS
C int info = pvm_send( int tid, int msgtag ) Fortran call pvmfsend( tid, msgtag, info ) PARAMETERS
tid Integer task identifier of destination process. msgtag Integer message tag supplied by the user. msgtag should be >= 0. info Integer status code returned by the routine. DESCRIPTION
The routine pvm_send sends a message stored in the active send buffer to the PVM process identified by tid. msgtag is used to label the content of the message. If pvm_send is successful, info will be 0. If some error occurs then info will be < 0. The pvm_send routine is asynchronous. Computation on the sending processor resumes as soon as the message is safely on its way to the receiving processor. This is in contrast to synchronous communication, during which computation on the sending processor halts until the matching receive is executed by the receiving processor. The PVM model guarantees the following about message order. If task 1 sends message A to task 2, then task 1 sends message B to task 2, message A will arrive at task 2 before message B. Moreover, if both messages arrive before task 2 does a receive, then a wildcard receive will always return message A. Terminating a PVM task immediately after sending a message or messages from it may result in those messages being lost. To be sure, always call pvm_exit() before stopping. EXAMPLES
C: info = pvm_initsend( PvmDataDefault ); info = pvm_pkint( array, 10, 1 ); msgtag = 3 ; info = pvm_send( tid, msgtag ); Fortran: CALL PVMFINITSEND(PVMRAW, INFO) CALL PVMFPACK( REAL8, DATA, 100, 1, INFO ) CALL PVMFSEND( TID, 3, INFO ) ERRORS
These error conditions can be returned by pvm_send PvmBadParam giving an invalid tid or a msgtag. PvmSysErr pvmd not responding. PvmNoBuf no active send buffer. Try pvm_initsend() before send. SEE ALSO
pvm_initsend(3PVM), pvm_mcast(3PVM), pvm_pack(3PVM), pvm_psend(3PVM), pvm_recv(3PVM) 30 August, 1993 SEND(3PVM)
Man Page