ADVISE(3PVM)

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

πŸ’– ADVISE πŸ’– (that's ADVISE(3PVM) bestie, from the PVM Version 3.4 era)

okay so real talk, this page is about pvm_advise() β€” it controls use of direct task-to-task routing. πŸ¦‹

heads up: in Version 3.2 this got replaced by pvm_setopt, so if you're on something modern, that's your girl. still, we're reading the whole thing because knowledge is free πŸ’…

✨ NAME ✨

pvm_advise() β€” controls use of direct task-to-task routing.

(and again for the people in the back: in Version 3.2 it was replaced by pvm_setopt)


✨ SYNOPSIS ✨

C bestie:

int info = pvm_advise( int route )

Fortran bestie:

call pvmfadvise( route, info )

✨ PARAMETERS ✨

  • route β€” an Integer that advises PVM to set up direct task-to-task links. here are ur route options, no cap:
    • PvmDontRoute = 1 β€” don't allow direct links to this task πŸ™…
    • PvmAllowDirect = 2 β€” allow but don't request direct links (she's flexible like that)
    • PvmRouteDirect = 3 β€” request direct links πŸ”₯
  • info β€” an Integer that returns the error status. keep an eye on her.

✨ DESCRIPTION ✨

so pvm_advise is literally just you telling PVM whether or not to set up direct task-to-task links (using TCP) for all subsequent communication. once a link is established, it stays until the application finishes β€” she commits, she doesn't ghost. 🫢

if a direct link can't be established, either because one of the two tasks has requested PvmDontRoute or because no resources are available, then the default route through the PVM daemons is used. no drama, it just reroutes.

you can call pvm_advise multiple times to selectively establish direct links, but typically it's set only once near the beginning of each task. PvmAllowDirect is the default advise setting β€” that's the vibe you get for free. this setting on task A allows other tasks to set up direct links to A. and once a direct link is established between tasks, both tasks will use it for sending messages. sharing is caring.

pvm_advise returns the error status in info. πŸ“

the performance tea: direct task-to-task links can be up to a factor of two better than the default route πŸ‘‘. the drawback? a lack of scalability of the direct links. some versions of UNIX limit the number of links to no more than 30. thirty. that's it. that's the ceiling. 😭


✨ EXAMPLES ✨

C, slay:

info = pvm_advise( PvmRouteDirect );

Fortran, also slay:

CALL PVMFADVISE( PVMROUTEDIRECT, INFO )

✨ ERRORS ✨

this error condition can be returned by pvm_advise:

  • PvmBadParam β€” giving an invalid route value. bestie. you gave her a route that doesn't exist. πŸ’€

✨ SEE ALSO ✨

  • pvm_setopt(3PVM)

and that's the whole page!! written 30 August, 1993, from PVM Version 3.4 β€” go forth and route responsibly πŸŽ€πŸŒΈβœ¨

πŸ“¦ where this page comes from