ADDHOSTS(3PVM)
π 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:Pvmdmust 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 thehostsarray. how many you're adding. simple.infosβ an integer array of lengthnhostthat 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 thannhostmean 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β localpvmdis 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 startpvmdon host.PvmDupHostβ host already configured. she's already here bestie, stop trying to re-add her.PvmBadVersionβpvmdprotocol 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
- 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