ADDHOSTS(3PVM)

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

πŸ’– ADDHOSTS β€” it's giving "let's add more computers to the squad" (3PVM) πŸ’–

okay bestie, sit down, hydrate, because we're talking about pvm_addhosts from PVM Version 3.4 and it's genuinely iconic. this is the function that grows your virtual machine's little computer family. more hosts = more power = more main character energy. ✨


🌸 NAME 🌸

pvm_addhosts β€” Add hosts to the virtual machine. periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

C:

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

Fortran:

call pvmfaddhost( host, info )

πŸŽ€ PARAMETERS πŸŽ€

  • hosts β€” an array of strings naming the hosts you wanna add. heads up though: Pvmd has to already be installed on them, and you gotta have an account on those hosts. no account, no vibes, no host. πŸ’…
  • nhost β€” integer, the length of the hosts array. just tell it how many you're bringing.
  • infos β€” integer array of length nhost that returns the status for each host. values less than zero mean error (πŸ’€), and positive values are TIDs of the new hosts (slay ✨).
  • host β€” character string naming the host to be added (the Fortran single-host girlie).
  • info β€” integer status code returned by the routine. values less than nhost mean partial failure, and values less than 1 mean total failure. 😭

πŸ’œ DESCRIPTION πŸ’œ

pvm_addhosts adds the computers named in hosts to the configuration of computers making up the virtual machine. it's literally expanding the friend group.

the names should have the same syntax as lines of a pvmd hostfile (go peek at the man page for pvmd3): a hostname followed by options of the form xx=y. iykyk.

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 infos array can be checked to figure out which host caused the error β€” it's always one of them, bestie, and now you can find out which. πŸ”

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 β€” but listen, it is the responsibility of the application developer to make their application tolerant of host failure. that's on you, not on PVM. πŸ™ˆ

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. honestly? adding hosts on a weekend because you suddenly want more compute is such a mood. πŸ”₯


🌈 EXAMPLES 🌈

C:

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

Fortran:

CALL PVMFADDHOST( 'azure', INFO )

⭐ ERRORS ⭐

these are the error conditions pvm_addhosts can throw at you:

  • PvmBadParam β€” giving an invalid argument value. not the vibe.
  • PvmAlready β€” another task is currently adding hosts. wait your turn bestie.
  • PvmSysErr β€” local pvmd is not responding. it's ghosting you. πŸ’€

and in the infos vector:

  • PvmBadParam β€” bad hostname syntax.
  • PvmNoHost β€” no such host.
  • PvmCantStart β€” failed to start pvmd on host.
  • PvmDupHost β€” host already configured. she's already here.
  • PvmBadVersion β€” pvmd protocol versions don't match.
  • PvmOutOfRes β€” PVM has run out of system resources.
fr fr, read your infos array. it's not decorative, it's telling you which host is being dramatic. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

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


okay that's the whole page, you ate that. this was PVM Version 3.4, and the page itself is dated 22 February, 1994 β€” yes she's an elder but she's still serving. go forth and add hosts, bestie. πŸ’–βœ¨πŸ¦‹πŸŽ€πŸŒΈπŸ’…

πŸ“¦ where this page comes from