REG_RM(3PVM)

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

πŸ’– REG_RM(3PVM) πŸ’–

okay bestie, sit down, hydrate, and let's talk about pvm_reg_rm from PVM Version 3.4 β€” this one is lowkey a big deal and highkey not for the faint of heart 🫢


✨ NAME ✨

pvm_reg_rm β€” Register task as PVM resource manager.

periodt. that's the whole vibe. you're not just using PVM anymore, you're running the place πŸ’…


🌸 SYNOPSIS 🌸

C    #include <pvmsdpro.h>

     int cc = pvm_reg_rm( struct pvmhostinfo **hip )
     struct pvmhostinfo {
          int  hi_tid;
          char *hi_name;
          char *hi_arch;
          int  hi_speed;
     };

Fortran   Not Available
Fortran girlies, I love you, but this one is simply not available. no pvm_reg_rm for you today, I'm so sorry 😭

πŸŽ€ PARAMETERS πŸŽ€

  • hostp β€” Returns pointer to a pvmhostinfo structure which contains information about the master host. like, it hands you the receipts on who's in charge πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does it actually do, bestie? It registers the calling task as a PVM task and slave host manager. Translation: your task now intercepts certain libpvm calls from other tasks so it gets a say in scheduling policy. main character energy, honestly. πŸ‘‘

The resource manager will asynchronously receive messages from tasks containing requests for service, plus messages from pvmds notifying it of system failures. so like, your phone is always buzzing, but it's PVM and not your group chat πŸ“±πŸ’€

⚠️ before you start using this function, be warned β€” it's not a trivial thing, i.e. you can't just call it to turn off the default round-robin task assignment. Rather, it allows you to write your own resource manager and hook it to PVM. no shortcuts, no easy wins, it's giving "build it yourself or go home" 🧚

To understand what the following messages mean, you should refer to the PVM source code and/or user guide section on implementation; There's just too much to say about them. (fr fr, this page is not gonna hold your hand through all of that.)

πŸ’« the libpvm calls β†’ RM messages πŸ’«

When one of the following libpvm functions is called in a task with resource manager set, the given message tag is sent to the resource manager:

  • pvm_addhosts() β€” RM message: SM_ADDHOST β€” normal message: TM_ADDHOST
  • pvm_config() β€” RM message: SM_CONFIG β€” normal message: TM_CONFIG
  • pvm_delhosts() β€” RM message: SM_DELHOST β€” normal message: TM_DELHOST
  • pvm_notify() β€” RM message: SM_NOTIFY β€” normal message: TM_NOTIFY
  • pvm_spawn() β€” RM message: SM_SPAWN β€” normal message: TM_SPAWN
  • pvm_tasks() β€” RM message: SM_TASK β€” normal message: TM_TASK
  • pvm_reg_rm() β€” RM message: SM_SCHED β€” normal message: TM_SCHED

🌈 the messages YOU have to send back 🌈

The resource manager must in turn compose the following messages and send them to the pvmds:

  • RM message: SM_EXEC β€” normal message: DM_EXEC
  • RM message: SM_EXECACK β€” normal message: DM_EXECACK
  • RM message: SM_ADD β€” normal message: DM_ADD
  • RM message: SM_ADDACK β€” normal message: DM_ADDACK
  • RM message: SM_HANDOFF β€” (none - change of resource manager)

⭐ the messages the system just sends you ⭐

The following messages are sent asynchronously to the resource manager by the system:

  • RM message: SM_TASKX β€” meaning: notify of task exit/fail πŸ’€
  • RM message: SM_HOSTX β€” meaning: notify of host delete/fail πŸ’€

🧚 housekeeping rules 🧚

The resource manager task must use pvm_setopt(PvmResvTids, 1) to allow sending reserved messages. Messages should be packed using encoding PvmDataDefault to ensure they can be unpacked anywhere in the system. no cap, do this or nothing works πŸ”₯

pvm_reg_rm() returns PvmOk when successful. slay. ✨


πŸ‘‘ SEE ALSO πŸ‘‘

  • pvm_addhosts(3PVM)
  • pvm_config(3PVM)
  • pvm_delhosts(3PVM)
  • pvm_notify(3PVM)
  • pvm_spawn(3PVM)
  • pvm_tasks(3PVM)

okay that's the whole page, you ate it up, you're a certified resource manager now πŸŽ€ this was PVM Version 3.4, dated 4 March, 1994 β€” yes bestie, 1994, ancient history, and it's still iconic. mwah, go forth and schedule πŸ’‹πŸ’–πŸ¦‹

πŸ“¦ where this page comes from