1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
.\" $Id: pvm_notify.3,v 1.1 1996/09/23 22:05:25 pvmsrc Exp $
.TH NOTIFY 3PVM "31 January, 1994" "" "PVM Version 3.4"
.SH NAME
pvm_notify \- Request notification of PVM event such as host failure.
.SH SYNOPSIS
.nf
.ft B
C int info = pvm_notify( int what, int msgtag, int cnt, int *tids )
.br
Fortran call pvmfnotify( what, msgtag, cnt, tids, info )
.fi
.SH PARAMETERS
.IP what 0.8i
Type of event to trigger the notification.
Presently one of:
.ta 0.5i 2.5i
.nf
Value Meaning
PvmTaskExit Task exits or is killed
PvmHostDelete Host is deleted or crashes
PvmHostAdd New host is added
.fi
.IP msgtag
Message tag to be used in notification.
.br
.IP cnt
For \fIPvmTaskExit\fR and \fIPvmHostDelete\fR,
specifies the length of the \fItids\fR array.
For \fIPvmHostAdd\fR,
specifies the number of times to notify.
.br
.IP tids
For \fIPvmTaskExit\fR and \fIPvmHostDelete\fR,
an array of length
.I cnt
of task or pvmd TIDs to be notified about.
The array is not used with the \fIPvmHostAdd\fR option.
.br
.IP info
Integer status code returned by the routine.
Values less than zero indicate an error.
.SH DESCRIPTION
The routine
.I 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 \fImsgtag\fR supplied to notify.
The notification messages have the following format:
.IP PvmTaskExit
One notify message for each TID requested.
The message body contains a single TID of exited task.
.sp
.IP PvmHostDelete
One notify message for each TID requested.
The message body contains a single pvmd-TID of exited pvmd.
.sp
.IP PvmHostAdd
\fIcnt\fR 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 \fIPvmHostAdd\fR messages yet to be sent is
replaced by successive calls to \fIpvm_notify\fR.
Specifying a \fIcnt\fR
of -1 turns on \fIPvmHostAdd\fR messages until a future notify;
a count
of zero disables them.
.PP
TIDs in the notify messages are packed as integers.
.PP
The calling task is responsible for receiving messages
with the specified tag and taking appropriate action.
.PP
Future versions of PVM may expand the list of available
notification events.
.SH EXAMPLES
.nf
C:
info = pvm_notify( PvmTaskExit, 9999, ntask, tids )
.sp
Fortran:
CALL PVMFNOTIFY( PVMHOSTDELETE, 1111, NUMHOSTS, DTIDS, INFO )
.SH ERRORS
.IP PvmSysErr
pvmd not responding.
.IP PvmBadParam
giving an invalid argument value.
.PP
.SH SEE ALSO
pvm_tasks(3PVM),
pvm_config(3PVM)
|