TASKS(3PVM)
π TASKS(3PVM) β pvm_tasks π
okay bestie, so this one is pvm_tasks from PVM Version 3.4, and it's literally your backstage pass to the whole virtual machine. it hands you info about the tasks running on the VM β same tea the console command ps spills. no cap. π
β¨ 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 )
struct pvmtaskinfo {
int ti_tid;
int ti_ptid;
int ti_host;
int ti_flag;
char *ti_a_out;
} taskp;
Fortran:
call pvmftasks( where, ntask, tid, ptid, dtid, flag, aout, info )
πΈ PARAMETERS πΈ
whereβ an Integer that says which tasks you want the receipts on. the options are, and i quote:0β for all the tasks on the virtual machinepvmd tidβ for all tasks on a given hosttidβ for a specific task
ntaskβ an Integer coming back at you with the number of tasks being reported on.taskpβ returns a pointer to an array of structures holding the deets about each task: 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β an Integer returning task ID of one task.ptidβ an Integer returning parent task ID.dtidβ an Integer returning pvmd task ID of host task is on.flagβ an Integer returning status of task.aoutβ a Character string returning the name of spawned task. ngl, manually started tasks return blank. πinfoβ the Integer status code returned by the routine. values less than zero indicate an error. π
π DESCRIPTION π
so pvm_tasks returns information about tasks presently running on the virtual machine. the information returned is the same as that available from the console command ps. iconic.
the C function returns information about the entire virtual machine in one single call. main character energy. meanwhile the Fortran function returns information about one task per call and cycles through all the tasks. so if where = 0, and pvmftasks is called ntask times, all tasks will be represented. slay. β¨
not me needing you to know this though: in Fortran the reported value ofntaskand the set of tasks do not change until the function resets at the end of a complete cycle. the user can resetpvmftasks()at any time by calling it withntask = -1. that's the cheat code, bestie. π
if pvm_tasks is successful, info will be 0. if some error occurs then info will be < 0. simple as.
π 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:
Do i=1, NTASK
CALL PVMFTASKS( DTID, NTASK, TID(i), PTID(i), DTID(i),
& FLAG(i), AOUT(i), INFO )
EndDo
π ERRORS π
the following error condition can be returned by pvm_tasks:
PvmBadParamβ invalid value forwhereargument. bestie. read the options again. πPvmSysErrβpvmdnot responding. it's giving ghosted. πPvmNoHostβ specified host not in virtual machine.
π«Ά SEE ALSO π«Ά
pvm_config(3PVM)pvm_tidtohost(3PVM)
and that's the whole page, periodt. π this lil' number is dated 31 August, 1994 and comes to you from the PVM Version 3.4 era β so yeah, it's vintage, it's archival, and it still ate. stay curious, check your info codes, and never forget: ntask = -1 resets the cycle. mwah. πβ¨
π¦ where this page comes from
- debian bookworm: pvm-dev 3.4.6-5
- ubuntu jammy: pvm-dev 3.4.6-3.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms