ADDHOSTS(3PVM)
π 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:Pvmdhas 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 thehostsarray. just tell it how many you're bringing.infosβ integer array of lengthnhostthat 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 thannhostmean partial failure, and values less than1mean 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β localpvmdis not responding. it's ghosting you. π
and in the infos vector:
PvmBadParamβ bad hostname syntax.PvmNoHostβ no such host.PvmCantStartβ failed to startpvmdon host.PvmDupHostβ host already configured. she's already here.PvmBadVersionβpvmdprotocol 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
- debian bookworm: pvm-dev 3.4.6-5
- ubuntu jammy: pvm-dev 3.4.6-3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms