1REG_TASKER(3PVM)                PVM Version 3.4               REG_TASKER(3PVM)
2
3
4

NAME

6       pvm_reg_tasker - Register task as PVM task starter.
7
8

SYNOPSIS

10       C    #include <pvmsdpro.h>
11
12            int cc = pvm_reg_tasker()
13
14       Fortran   Not Available
15
16

DESCRIPTION

18       Registers  the  calling  task  as a PVM task starter.  When a tasker is
19       registered with a pvmd,  and  the  pvmd  receives  a  DM_EXEC  message,
20       instead of fork()ing and exec()ing the task itself, it passes a message
21       to the tasker, which does the dirty work and sends a  message  back  to
22       the pvmd.
23
24       Note:  If this doesn't make sense, don't worry about it.  This function
25       is for folks who are writing stuff like debugger  servers  and  so  on.
26       For  a  more  complete  explanation of what's going on here, you should
27       refer to the PVM source code and/or user guide section  on  implementa‐
28       tion; this is only a man page.  That said...
29
30       When  the  pvmd receives a DM_EXEC message (request to exec new tasks),
31       it searches epath (the PVM executable search path) for the  file  name.
32       If  it  finds  the file, it then either attempts to start the processes
33       (using fork() and exec()) or, if a tasker has registered,  sends  it  a
34       SM_STTASK message.
35
36       The format of the SM_STTASK message is:
37           int tid               // of task
38           int flags             // as passed to spawn()
39           string path           // absolute path of the executable
40           int argc              // number of args to process
41           string argv[argc]     // args
42           int nenv              // number of envars to pass to task
43           string env[nenv]      // environment strings
44
45       The  tasker must attempt to start the process when it gets one of these
46       messages.  The tasker doesn't reply to the pvmd if the task is success‐
47       fully  started;  the  task will reconnect to the pvmd on its own, using
48       the cookie in envar PVMEPID to identify itself to the pvmd.
49
50       The tasker must send a SM_TASKX message to the pvmd when any task  that
51       it  owns  (has  started) exits, or if it can't start a particular task.
52       The format of the SM_TASKX message is:
53
54           int tid               // of task
55           int status            // the Unix exit status (from wait())
56           int u_sec             // user time used by the task, seconds
57           int u_usec            // microseconds
58           int s_sec             // system time used by the task, seconds
59           int s_usec            // microseconds
60
61       The tasker task must use pvm_setopt(PvmResvTids, 1)  to  allow  sending
62       reserved messages.  Messages should be packed using encoding PvmDataDe‐
63       fault to ensure they can be unpacked anywhere in the system.
64
65       pvm_reg_tasker() returns PvmOk when successful.
66
67

SEE ALSO

69       pvm_spawn(3PVM), pvm_tasks(3PVM),
70
71
72
73                                16 March, 1994                REG_TASKER(3PVM)
Impressum