1ADDHOSTS(3PVM) PVM Version 3.4 ADDHOSTS(3PVM)
2
3
4
6 pvm_addhosts - Add hosts to the virtual machine.
7
9 C int info = pvm_addhosts( char **hosts, int nhost, int *infos )
10
11 Fortran call pvmfaddhost( host, info )
12
13
15 hosts An array of strings naming the hosts to be added. Pvmd must
16 already be installed and the user must have an account on the
17 specified hosts.
18
19 nhost Integer specifying the length of array hosts.
20
21 infos Integer array of length nhost which returns the status for each
22 host. Values less than zero indicate an error, while positive
23 values are TIDs of the new hosts.
24
25 host Character string naming the host to be added.
26
27 info Integer status code returned by the routine. Values less than
28 nhost indicate partial failure, and values less than 1 indicate
29 total failure.
30
31
33 The routine pvm_addhosts adds the computers named in hosts to the con‐
34 figuration of computers making up the virtual machine. The names
35 should have the same syntax as lines of a pvmd hostfile (see man page
36 for pvmd3): A hostname followed by options of the form xx=y.
37
38 If pvm_addhosts is successful, info will be equal to nhost. Partial
39 success is indicated by 0 < info < nhost, and total failure by info <
40 1. The array infos can be checked to determine which host caused the
41 error.
42
43 The Fortran routine pvmfaddhost adds a single host to the configuration
44 with each call. info will be 1 if successful or < 0 if error.
45
46 The status of hosts can be requested by the application using pvm_mstat
47 and pvm_config. If a host fails it will be automatically deleted from
48 the configuration. Using pvm_addhosts a replacement host can be added
49 by the application, however it is the responsibility of the application
50 developer to make his application tolerant of host failure. Another
51 use of this feature would be to add more hosts as they become avail‐
52 able, for example on a weekend, or if the application dynamically
53 determines it could use more computational power.
54
55
57 C:
58 static char *hosts[] = {
59 "sparky",
60 "thud.cs.utk.edu",
61 };
62 info = pvm_addhosts( hosts, 2, infos );
63
64 Fortran:
65 CALL PVMFADDHOST( 'azure', INFO )
66
67
69 The following error conditions can be returned by pvm_addhosts:
70
71 PvmBadParam
72 giving an invalid argument value.
73
74 PvmAlready
75 another task is currently adding hosts.
76
77 PvmSysErr
78 local pvmd is not responding.
79
80 and in the infos vector:
81
82 PvmBadParam
83 bad hostname syntax.
84
85 PvmNoHost
86 no such host.
87
88 PvmCantStart
89 failed to start pvmd on host.
90
91 PvmDupHost
92 host already configured.
93
94 PvmBadVersion
95 pvmd protocol versions don't match.
96
97 PvmOutOfRes
98 PVM has run out of system resources.
99
101 pvm_pvmd3(1PVM), pvm_delhosts(3PVM), pvm_start_pvmd(3PVM), pvm_con‐
102 fig(3PVM), pvm_mstat(3PVM)
103
104
105
106 22 February, 1994 ADDHOSTS(3PVM)