NOTIFY(3PVM)

πŸ“¦ version 3.4.6, in debian bookworm, ubuntu jammy

✨ 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 β€” for PvmTaskExit and PvmHostDelete, this is the length of the tids array. For PvmHostAdd, it's how many times to notify.
  • tids β€” for PvmTaskExit and PvmHostDelete, an array of length cnt of task or pvmd TIDs you wanna be notified about. This array is not used with the PvmHostAdd option, 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