FREEZEGROUP(3PVM)

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

πŸ’– FREEZEGROUP πŸ’–

ok so this is pvm_freezegroup from PVM Version 3.4, living in section 3PVM of the manual, and bestie it's about freezing a dynamic group's membership and caching all that info locally. yes it's as cold as it sounds. 🧊✨


✨ NAME ✨

pvm_freezegroup β€” freezes dynamic group membership and caches info locally

like, it literally puts your group on ice and keeps the receipts locally. no cap. πŸŽ€


🌸 SYNOPSIS 🌸

C:

int info = pvm_freezegroup( char *group , int size)

Fortran:

call pvmffreezegroup( group, size, info )

πŸ¦‹ PARAMETERS πŸ¦‹

  • group β€” character string, the group name of an existing group. yep, it has to already exist, we're not manifesting groups out of thin air πŸ’…
  • size β€” the size of the group when it is frozen. like the headcount you're locking in.
  • info β€” size of group on success. values less than 0 indicate an error. so if it comes back negative, that's your villain arc moment 😭

πŸ’œ DESCRIPTION πŸ’œ

ok so here's the tea: pvm_freezegroup takes a dynamic group named group and makes it static. after that, the group information gets "cached" by all the group members. it's giving ✨frozen in time✨.

pvm_freezegroup is a synchronizing routine β€” meaning it is not a solo mission, bestie. it must be called by all group members to complete. everyone shows up or nobody gets in. periodt.

size indicates the size the dynamic group should be when made static. and listen β€” a value of -1 means "just use the current size of the group, don't be weird about it." info returns error information.

Once a dynamic group has been frozen with pvm_freezegroup, all subsequent operations that can be satisfied with local data use the locally held information. so it's fast, it's local, it's iconic.

For processes that are outside of the group, the first group call β€” e.g., pvm_bcast() β€” will cause the static group information to be copied to the calling process. after that first one, subsequent operations use the local information. so basically everyone gets their own copy of the lore. πŸ“š

heads up though: barriers are still arbitrated by the group server. the server is the main character here, it's not handing over that job. πŸ‘‘

Group members should call pvm_lvgroup to leave the group and free any allocated structures that hold the group information. processes that are not in the group may also call pvm_lvgroup to free any locally allocated structures β€” but in that case, an error code of PvmNotInGroup or PvmNoGroup will be returned to the caller. so like, you can do it, but it will read you. πŸ’€

Barriers are always arbitrated by the group server, even if the group has been made static with pvm_freezegroup. (yes we're saying it twice, it's that serious.) and if a process leaves a static group while other processes are waiting at a barrier, then PvmNoGroup is returned to all processes waiting at the barrier. future barrier calls with the defunct static group return the same error. rip to everyone stuck at that barrier, fr fr. 😭


🌈 EXAMPLES 🌈

C:

inum = pvm_joingroup("worker");
info = pvm_freezegroup( "worker", size );

Fortran:

CALL PVMFJOINGROUP('group2', inum)
CALL PVMFFREEZEGROUP( 'group2', size, info )

look at that glow-up. join the group, then freeze it. slay. πŸ’…βœ¨


πŸ”₯ ERRORS πŸ”₯

These error conditions can be returned by pvm_freezegroup:

  • PvmSysErr β€” pvmd was not started or has crashed. your daemon ghosted you, that's the whole problem 🫠
  • PvmBadParam β€” giving a NULL group name. bestie you have to name it.
  • PvmDupGroup β€” trying to freeze a group that is already frozen. it's already an ice cube, stop putting it in the freezer 🧊
  • PvmNotInGroup β€” trying to freeze a group that you are not in. not you trying to freeze a group you're not even part of πŸ™ˆ

πŸ’€ BUGS πŸ’€

okay these are real, don't @ me:
  • There is no way to unfreeze a group. once it's frozen, it's frozen. forever. no thawing, no take-backs, that's just the law. πŸ₯Ά
  • Processes are not notified if a frozen group becomes invalid. so everyone's just out here living their life with stale info and no warning. lowkey unhinged.
  • Having a non-member process call pvm_lvgroup to free structures is a bit strange. (that's a direct quote from the vibe check, we're all thinking it) πŸ“

⭐ SEE ALSO ⭐

  • pvm_barrier(3PVM)
  • pvm_lvgroup(3PVM)

and that's the whole page, bestie!! 🫢 this one's from 16 March 1995, source PVM Version 3.4 β€” so yes it's older than both of us and it still ate. πŸ’–βœ¨πŸŽ€ bye ily, go freeze responsibly πŸ¦‹

πŸ“¦ where this page comes from