int tid = pvm_parent (void)
call pvmfparent (tid)
tid
of the process that spawned this task
PvmNoParent
if not created by
pvm_spawn()
CALL PVMFPARENT (PTID) IF (PTID .EQ. PvmNoParent) THEN C I have been spawned from the pvm console C or from the shell
int status = pvm_pstat (int tid)
tid
status is |
PvmOk if the task is running |
PvmNoTask if not |
|
PvmBadParam if the tid is bad
|
ptid = pvm_parent () ; status = pvm_stat (ptid) ;
int status = pvm_mstat (char *host)
Returns | PvmOk if the machine host is running |
PvmHostFail if host is unreachable |
|
PvmNoHost if host is not in the virtual machine
|
status = pvm_mstat ("ms2.ens.lifl.fr") ; status = pvm_mstat ("ms2") ;
int info = pvm_config (int *nhost, int *narch,
struct hostinfo **hostp)
conf
command of the pvm
console
nhost
narch
struct hostinfo { int hi_tid ; /* task ID */ char *hi_name ; /* host machine */ char *hi_arch ; /* architecture of the host machine */ int hi_speed ; /* relative speed */ } ;
struct hostinfo *hi ; int nh, na ; pvm_config (&nh, &na, &hi) ;
int info = pvm_tasks (int which, int *ntask,
struct taskinfo **taskp)
ps
command of the pvm
console
which
specifies the tasks to return
information about:
ntask
taskp
is a pointer to an array of
taskinfo
structures of size ntask
struct taskinfo { int ti_tid ; /* task ID */ int ti_ptid ; /* parent tid */ int ti_host ; /* pvmd tid */ int ti_flag ; /* status flag */ char *ti_a_out ; /* task executable name */ };
a.out
only for ``spawned'' tasks
/* info for the tasks on the current host */ me = pvm_mytid () ; (void) pvm_tasks (me, &nb, &taskp) ; (void) pvm_tasks (taskp[0]. ti_host, &nb, &taskp) ;