NAME
pvm_tasks - Returns information about the tasks running on the virtual machine.
SYNOPSIS
C int info = pvm_tasks( int where, int *ntask, struct pvmtaskinfo **taskp )
where Integer specifying what tasks to return information about. The options are:
taskp Returns pointer to an array of structures which contain information about each task including its task ID, parent tid, pvmd task ID, status flag, and the name of this task's executable file. The status flag values are: waiting for a message, waiting for the pvmd, and running.
tid Integer returning task ID of one task
ptid Integer returning parent task ID
dtid Integer returning pvmd task ID of host task is on.
flag Integer returning status of task
aout Character string returning the name of spawned task. Manually started tasks return blank.
info Integer status code returned by the routine. Values less than zero indicate an error.
the virtual machine. The information returned is the same as that available from the console command ps. The C function returns information about the entire virtual machine in one call. The Fortran function returns information about one task per call and cycles through all the tasks. Thus, if where = 0, and pvmftasks is called ntask times, all tasks will be represented. If pvm_tasks is successful, info will be 0. If some error occurs then info will be < 0.
EXAMPLES
C:
struct pvmtaskinfo *taskp; int i, ntask; info = pvm_tasks( 0, &ntask, &taskp ); for (i = 0; i < ntask; i++) printf("t%x\n", taskp[i].ti_tid);Fortran:
ERRORS
The following error condition can be returned by pvm_tasks