ADDHOSTS(3PVM)

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

πŸ’– ADDHOSTS β€” pvm_addhosts πŸ’–

okay so bestie, we're in section 3PVM of the PVM Version 3.4 manual, and this page is literally all about pvm_addhosts, the glow-up-your-cluster routine. sit down, hydrate, let's go 🫢


✨ NAME ✨

pvm_addhosts</purl> β€” Add hosts to the virtual machine.

like. that's the whole vibe. you got computers, you want MORE computers, this is the function. πŸ’…


🌸 SYNOPSIS 🌸

C girlies:

int info = pvm_addhosts( char **hosts, int nhost, int *infos )

Fortran besties:

call pvmfaddhost( host, info )

πŸŽ€ PARAMETERS πŸŽ€

  • hosts β€” an array of strings, each one naming a host you wanna add. heads up tho: Pvmd must already be installed on those hosts, and you gotta have an account on them. no account, no vibes, no host. πŸ™ˆ
  • nhost β€” an integer, and it's just the length of the hosts array. how many you're adding. simple.
  • infos β€” an integer array of length nhost that returns the status for each host. values less than zero mean error (sad), while positive values are TIDs of the new hosts (iconic ✨).
  • host β€” a character string naming the host to be added. (this is the Fortran one, she's singular, she's solo, she's main character energy.)
  • info β€” integer status code the routine hands back. values less than nhost mean partial failure, and values less than 1 mean total failure. 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so pvm_addhosts adds the computers named in hosts to the configuration of computers making up the virtual machine. the names should have the same syntax as lines of a pvmd hostfile (go read the man page for pvmd3 if you need it, iykyk): a hostname followed by options of the form xx=y. periodt.

If pvm_addhosts is successful, info will be equal to nhost. Partial success is indicated by 0 < info < nhost, and total failure by info < 1. The array infos can be checked to determine which host caused the error. like, it's giving receipts, you can see exactly which one ghosted you. πŸ”

The Fortran routine pvmfaddhost adds a single host to the configuration with each call. info will be 1 if successful or < 0 if error.

The status of hosts can be requested by the application using pvm_mstat and pvm_config. If a host fails it will be automatically deleted from the configuration. Using pvm_addhosts a replacement host can be added by the application, however it is the responsibility of the application developer to make his application tolerant of host failure. that's on you bestie, not on PVM, fr fr.

Another use of this feature would be to add more hosts as they become available, for example on a weekend, or if the application dynamically determines it could use more computational power. like casually picking up more CPU when the cluster's feeling generous?? we love a scalable queen. πŸ‘‘


🌈 EXAMPLES 🌈

C:

static char *hosts[] = {
    "sparky",
    "thud.cs.utk.edu",
};
info = pvm_addhosts( hosts, 2, infos );

Fortran:

CALL PVMFADDHOST( 'azure', INFO )

πŸ’€ ERRORS πŸ’€

The following error conditions can be returned by pvm_addhosts:

  • PvmBadParam β€” giving an invalid argument value. girl, what did you pass in. 😭
  • PvmAlready β€” another task is currently adding hosts. it's giving one-at-a-time, wait your turn.
  • PvmSysErr β€” local pvmd is not responding. she's not picking up the phone. πŸ“΅

and in the infos vector:

  • PvmBadParam β€” bad hostname syntax. typo detected, vibe rejected.
  • PvmNoHost β€” no such host. doesn't exist. never did. πŸ’€
  • PvmCantStart β€” failed to start pvmd on host.
  • PvmDupHost β€” host already configured. she's already here bestie, stop trying to re-add her.
  • PvmBadVersion β€” pvmd protocol versions don't match. mismatch era, awkward.
  • PvmOutOfRes β€” PVM has run out of system resources. no more room, the club is full. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

  • pvm_pvmd3(1PVM)
  • pvm_delhosts(3PVM)
  • pvm_start_pvmd(3PVM)
  • pvm_config(3PVM)
  • pvm_mstat(3PVM)

go read those, they're all part of the same friend group. 🫢


and that's the page babes!! this lil masterpiece came from the PVM Version 3.4 manual, dated 22 February, 1994 β€” yeah she's vintage, she's retro, she's still slaying. πŸ’–βœ¨πŸŽ€ mwah, study hard, add those hosts responsibly. πŸ’…

πŸ“¦ where this page comes from