Section: PVM Version 3.4 (3PVM)Updated: 22 February, 1994Local indexUp
pvm_addhosts - Add hosts to the virtual machine.
C int info = pvm_addhosts( char **hosts, int nhost, int *infos )
Fortran call pvmfaddhost( host, info )
An array of strings
naming the hosts to be added.
Pvmd must already be installed and
the user must have an account on the specified hosts.
Integer specifying the length of array hosts.
Integer array of length
which returns the
status for each host.
Values less than zero indicate an error,
while positive values are TIDs of the new hosts.
Character string naming the host to be added.
Integer status code returned by the routine.
Values less than nhost indicate partial failure,
values less than 1 indicate total failure.
adds the computers named in
to the configuration of computers making up the virtual machine.
The names should have the same syntax as lines of a pvmd hostfile
(see man page for pvmd3):
A hostname followed by options of the form xx=y.
If pvm_addhosts is successful,
will be equal to
Partial success is indicated by 0 < info < nhost,
and total failure by info < 1.
can be checked to determine which host caused the error.
The Fortran routine
adds a single host to the configuration with each call.
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,
it is the responsibility of the
application developer to make his application tolerant of host failure.
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.