NOTIFY(3PVM)
β¨ NOTIFY(3PVM) β¨
ok so bestie, welcome to pvm_notify from PVM Version 3.4 β this is the "hey, tell me when stuff happens" function and honestly it's giving main character energy π
πΈ NAME πΈ
pvm_notify β request notification of a PVM event, like a host straight-up ghosting you (failure, bestie, we mean 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β the type of event that triggers the notification. rn it's one of these cuties:PvmTaskExitβ task exits or gets killed πPvmHostDeleteβ host is deleted or crashes πPvmHostAddβ a new host gets added π
msgtagβ the message tag used in the notification.cntβ forPvmTaskExitandPvmHostDelete, this is the length of thetidsarray. ForPvmHostAdd, it's how many times to notify.tidsβ forPvmTaskExitandPvmHostDelete, an array of lengthcntof task or pvmd TIDs you wanna be notified about. This array is not used with thePvmHostAddoption, so don't bother, bestie.infoβ the integer status code the routine hands back. Values less than zero = error, no cap.
π DESCRIPTION π
The routine pvm_notify asks PVM to notify the caller when it detects certain events. One or more notify messages (details below, keep scrolling bestie) get sent by PVM back to the calling task. Those messages carry the tag msgtag that you supplied to notify.
The notification messages have this format:
β PvmTaskExit
One notify message for each TID requested. The message body contains a single TID of the exited task.
β PvmHostDelete
One notify message for each TID requested. The message body contains a single pvmd-TID of the 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. That's on you, bestie π«Ά
Future versions of PVM may expand the list of available notification events. so like, stay tuned β¨
π 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 actually occurred. yeah. it still shows up. iconic behaviour tbh π
π ERRORS π
PvmSysErrβ pvmd not responding. it's ghosting you fr fr πPvmBadParamβ you gave an invalid argument value. π
π¦ SEE ALSO π¦
pvm_tasks(3PVM)pvm_config(3PVM)
ok that's the whole page bestie, go forth and get notified π this was PVM Version 3.4, dated 31 January, 1994 β slay, periodt β¨ππ¦π
π¦ where this page comes from
- debian bookworm: pvm-dev 3.4.6-5
- ubuntu jammy: pvm-dev 3.4.6-3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms