6.3.   PVM 235



# include "pvm3.h"

int pvm_spawn(char *task, char **argv, int flag,

char *location,int ntask,int *taskids);

int pvm_kill(int taskid);

int pvm_exit(void) ;

int pvm_addhosts(char **hosts,int nhosts,int *status) ;

int pvm_delhosts(char **hosts,int nhosts,int *status) ;

int pvm_halt(void) ;

 task   ,    
pvm_spawn ().  ,    
pvm_spawn (),  ,     
.       argv.  location -
 ,       . 
taskids     ,   ,
   ,      
.  ntasks ,     .
 pvm_kill()    ,   
 taskid.        , -
    PVM,   .   -
  SIGTERM PVM-,  . 
pvm_exit ()        PVM.  
     PVM, ,    ,
  .    ,  ,  
PVM-,     ,      PVM.
 pvm_exit ()    ,     -
   PVM-.  pvm_addhosts ()  -
      PVM.    
pvm_addhosts ()     , :

int Status [3] ;

char *Hosts[] = {"porthos", "dartagnan","athos"};

pvm_addhosts("porthose",1,&Status) ;

//. . .

pvm_addhosts(Hosts,3,Status) ;

 Hosts     (  ), -
   . rhosts  .xpvm_hosts.  nhost  
,     PVM,   status  , -
   nhosts     pvm_addhosts ().
         , , 
,    1.       
, ,  ,     -
 .  pvrn_delhosts ()    
 PVM     .  hosts  
,   nhosts    , :

pvm_delhosts("dartagnan", 1) ;