1REG_HOSTER(3PVM) PVM Version 3.4 REG_HOSTER(3PVM)
2
3
4
6 pvm_reg_hoster - Register task as PVM slave starter.
7
8
10 C #include <pvmsdpro.h>
11
12 int cc = pvm_reg_hoster()
13
14 Fortran Not Available
15
16
18 Registers the calling task as a PVM slave pvmd starter. When the mas‐
19 ter pvmd receives a DM_ADD message, instead of starting the new slave
20 pvmd processes itself, it passes a message to the hoster, which does
21 the dirty work and sends a message back to the pvmd.
22
23 Note: This function isn't for beginners. If you don't grok what it
24 does, you probably don't need it. For a more complete explanation of
25 what's going on here, you should refer to the PVM source code and/or
26 user guide section on implementation; this is just a man page. That
27 said...
28
29 When the master pvmd receives a DM_ADD message (request to add hosts to
30 the virtual machine), it looks up the new host IP addresses, gets
31 parameters from the host file if it was started with one, and sets
32 default parameters. It then either attempts to start the processes
33 (using rsh or rexec()) or, if a hoster has registered, sends it a
34 SM_STHOST message.
35
36 The format of the SM_STHOST message is:
37 int nhosts // number of hosts
38 {
39 int tid // of host
40 string options // from hostfile so= field
41 string login // in form ``[username@]hostname.domain''
42 string command // to run on remote host
43 } [nhosts]
44
45 The hoster should attempt to run each command on each host and record
46 the result. A command usually looks like:
47 $PVM_ROOT/lib/pvmd -s -d8 -nhonk 1 80a9ca95:0f5a 4096 3
48 80a95c43:0000
49
50 and a reply from a slave pvmd like:
51 ddpro<2312> arch<ALPHA> ip<80a95c43:0b3f> mtu<4096>
52
53 When finished, the hoster should send a SM_STHOSTACK message back to
54 the address of the sender (the master pvmd). The format of the reply
55 message is:
56
57 {
58 int tid // of host, must match request
59 string status // result line from slave or error code
60 } [] // implied count
61
62 The TIDs in the reply must match those in the request. They may be in
63 a different order, however.
64
65 The result string should contain the entire reply (a single line) from
66 each new slave pvmd, or an error code if something went wrong. Legal
67 error codes are the literal names of the pvm_errno codes, for example
68 ``PvmCantStart''. The default PVM hoster can return PvmDSysErr or Pvm‐
69 CantStart, and the slave pvmd itself can return PvmDupHost.
70
71 The hoster must use pvm_setmwid() to set the wait ID in the reply mes‐
72 sage to the same value as in the request. The wait ID in the request
73 is obtained by calling pvm_getmwid().
74
75 The hoster task must use pvm_setopt(PvmResvTids, 1) to allow sending
76 reserved messages. Messages should be packed using encoding PvmDataDe‐
77 fault to ensure they can be unpacked anywhere in the system.
78
79 pvm_reg_hoster() returns PvmOk when successful.
80
81
83 pvm_addhosts(3PVM), pvm_config(3PVM), pvm_setmwid(3PVM)
84
85
86
87 4 March, 1994 REG_HOSTER(3PVM)