class PvmHostSet: public set< PvmHost, less< PvmHost > >

A set of hosts in the PVM.

Inheritance:

PvmHostSet


Public Methods

[more]PvmTask Spawn (const string &Task) const
starts the task with name Task on one of the hosts in the set and returns the corresponding instance of PvmTask.
[more]void Spawn (const string &Task, int Num, PvmTaskSet &Result) const
starts Num instances of the task with name Task on the hosts in the set and returns the set of started tasks in Result.


Documentation

A set of hosts in the PVM.

This class represents a set of hosts in the PVM. As it is publically derived from the STL-set, all STL-features can be used. Here is a short example:

      // get all hosts except the one, I'm on.
      PvmHostSet AllHosts;
      Pvm ().Hosts (AllHosts);
      AllHosts.erase (Pvm ().I ().Host ());
      // start one task on all those hosts
      PvmTaskSet AllTasks;
      PvmHostSet::iterator Current; 
      for (Current = AllHosts.begin (); Current != AllHosts.end (); ++Current)
        { 
          // save all started tasks to AllTasks.
          AllTasks.insert (Current->Spawn (PROGNAME)); 
        }
    
ovoid Spawn(const string &Task, int Num, PvmTaskSet &Result) const
starts Num instances of the task with name Task on the hosts in the set and returns the set of started tasks in Result. The PVM rules regarding the default search path apply. The tasks are distributed evenly, taking into account the speed (as set by PVM) of the hosts.

oPvmTask Spawn(const string &Task) const
starts the task with name Task on one of the hosts in the set and returns the corresponding instance of PvmTask. This function is not very useful actually, but only here because of consistency.


This class has no child classes.

Alphabetic index Hierarchy of classes



This page was generated with the help of DOC++.