PVMD {rpvm}R Documentation

Vitural Machine Control

Description

Start new pvm daemon, add or delete hosts and stop pvmd.

Usage

.PVM.start.pvmd (hosts = "", block = T)
.PVM.addhosts (hosts)
.PVM.delhosts (hosts)
.PVM.halt ()

Arguments

hosts a character vector, arguments to pvmd
block logical, if true, block until startup of all hosts complete

Details

.PVM.start.pvmd starts a pvmd3 process, the master of a new virtual machine. It returns as soon as the pvmd is started and ready for work. If the block parameter is nonzero and a hostfile is passed to the pvmd as a parameter, it returns when all hosts marked to start have been added.

.PVM.addhosts takes a vector of host names and add them to 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.

The status of hosts can be requested by the application using .PVM.mstats 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. 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.

.PVM.delhosts deletes the computers pointed to in hosts from the existing configuration of computers making up the virtual machine. All PVM processes and the pvmd running on these computers are killed as the computer is deleted.

If a host fails, the PVM system will continue to function and will automatically delete this host from the virtual machine. An application can be notified of a host failure by calling .PVM.notify. It is still the responsibility of the application developer to make his application tolerant of host failure.

.PVM.halt shuts down the the entire PVM system including remote tasks, remote pvmds, the local tasks (including the calling task) and the local pvmd. Note, when I did this, it also kills the current R session.

Value

.PVM.start.pvmd will return the result from .PVM.config.
.PVM.halt returns TRUE if successful.
.PVM.addhosts returns a vector of host ids that has been successfully added to the virtual machine.
.PVM.delhosts returns a vector of status codes for each hosts successfulled removed from the virtual machine.

Author(s)

Na (Michael) Li nali@umn.edu and A.J. Rossini rossini@u.washington.edu

References

PVM documentation

Examples

# start a new virtual machine on local machine 
## Not run: 
.PVM.start.pvmd ()
# add two more hosts to it
.PVM.addhosts ("sparky",
               "thud.cs.utk.edu  ep=$R_LIBS/rpvm/")
# do some work ...
# finished with one machine
.PVM.delhosts ("thud.cs.utk.edu")
# do some other work ...
# finished with pvm
.PVM.halt ()
## End(Not run)

[Package rpvm version 0.6-2 Index]