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

NAME

6       pvm_setopt - Sets libpvm options.
7
8

SYNOPSIS

10       C    int oldval = pvm_setopt( int what, int val )
11
12       Fortran   call pvmfsetopt( what, val, oldval )
13
14

PARAMETERS

16       what    Integer defining what to set.  One of:
17               PvmRoute              1    Message routing policy
18               PvmDebugMask          2    Libpvm debug mask
19               PvmAutoErr            3    Auto error reporting
20               PvmOutputTid          4    Stdout destination for children
21               PvmOutputCode         5    Output message tag for children
22               PvmTraceTid           6    Trace data destination for children
23               PvmTraceCode          7    Trace message tag for children
24               PvmTraceBuffer        8    Trace buffer size for children
25               PvmTraceOptions       9    Trace collection options for children
26               PvmFragSize          10    Message fragment size
27               PvmResvTids          11    Allow messages to reserved tags and TIDs
28               PvmSelfOutputTid     12    Stdout destination
29               PvmSelfOutputCode    13    Output message tag
30               PvmSelfTraceTid      14    Trace data destination
31               PvmSelfTraceCode     15    Trace message tag
32               PvmSelfTraceBuffer   16    Trace buffer size
33               PvmSelfTraceOptions  17    Trace collection options
34               PvmShowTids          18    pvm_catchout prints task ids with output
35               PvmPollType          19    Message wait policy (shared memory)
36               PvmPollTime          20    Message spinwait duration
37               PvmOutputContext     21    Output message context for children
38               PvmTraceContext      22    Trace message context for children
39               PvmSelfOutputContext 23    Output message context
40               PvmSelfTraceContext  24    Trace message context
41               PvmNoReset           25    Do not kill task on reset
42
43       val     Integer specifying new setting of option.
44
45               Predefined values for PvmRoute are:
46               PvmDontRoute      1    Don't request or grant connections
47               PvmAllowDirect    2    (Default) Don't request but allow
48               PvmRouteDirect    3    Request and allow connections
49
50               Predefined values for PvmTraceOptions are:
51               PvmTraceFull      1    (Default) Do full trace events
52               PvmTraceTime      2    Only do PVM routine timings
53               PvmTraceCount     3    Only do PVM routine profiling (call counts)
54
55               Predefined values for PvmPollType are:
56               PvmPollConstant   1    Spin on its message queue
57               PvmPollSleep      2    Poll the message queue PvmPollTime times
58
59
60       oldval  Integer returning the previous setting of the option.
61
62

DESCRIPTION

64       The  routine  pvm_setopt is a general purpose function used to set mis‐
65       cellaneous options in the PVM library.  What is one of:
66
67
68       PvmRoute
69              Advises PVM on whether to set up direct task-to-task links  Pvm‐
70              RouteDirect  (using TCP) for all subsequent communication.  Once
71              a link is established it persists  until  the  application  fin‐
72              ishes.   If  a direct link can not be established because one of
73              the two tasks has requested  PvmDontRoute  or  because  adequate
74              resources  aren't  available, then the default route through the
75              PVM daemons is used.  On multiprocessors such as  Intel  Paragon
76              this  option  is ignored because the communication between tasks
77              on these machines always uses the  native  protocol  for  direct
78              communication.   pvm_setopt  can  be  called  multiple  times to
79              selectively establish direct links, but is  typically  set  only
80              once  near  the  beginning  of each task.  PvmAllowDirect is the
81              default route setting.  This setting  on  task  A  allows  other
82              tasks to set up direct links to A.  Once a direct link is estab‐
83              lished between tasks both tasks will use  it  for  sending  mes‐
84              sages.
85
86
87       PvmDebugMask
88              When  debugging  is turned on, PVM will log detailed information
89              about its operations and progress on its stderr stream.  val  is
90              the debugging level.  Default is not to print any debug informa‐
91              tion.
92
93       PvmAutoErr
94              When an error results from a libpvm function call and PvmAutoErr
95              is  set  to  1  (the default), an error message is automatically
96              printed on stderr.  A setting of 0 disables this.  A setting  of
97              2  causes  the  library  to terminate the task by calling exit()
98              after printing the error message.  A setting  of  3  causes  the
99              library to abort after printing the error message.
100
101
102       PvmOutputTid
103              Sets  the  stdout  destination for children tasks (spawned after
104              the call to pvm_setopt).  Everything  printed  on  the  standard
105              output  of tasks spawned by the calling task is packed into mes‐
106              sages and sent to the destination.  val is  the  TID  of  a  PVM
107              task.   Setting PvmOutputTid to 0 redirects stdout to the master
108              pvmd, which writes to the log file /tmp/pvml.<uid>  The  default
109              setting is inherited from the parent task, else is 0.
110
111
112       PvmOutputCode
113              Sets  the message tag for standard output messages.  Should only
114              be set when a task has PvmOutputTid set to itself.
115
116
117       PvmTraceTid
118              Sets the trace  data  message  destination  for  children  tasks
119              (spawned  after  the  call to pvm_setopt).  Libpvm trace data is
120              sent as messages to the destination.  val is the TID  of  a  PVM
121              task.   Setting  PvmTraceTid  to  0  discards  trace  data.  The
122              default setting is inherited from the parent task, else is 0.
123
124
125       PvmTraceCode
126              Sets the message tag for trace data messages.   Should  only  be
127              set when a task has PvmTraceTid set to itself.
128
129
130       PvmTraceBuffer
131              Sets  the  trace  buffer  size  for  trace  event collection (in
132              bytes).  Rather than send a  separate  message  for  each  trace
133              event, the events are written to a message buffer until the buf‐
134              fer reaches PvmTraceBuffer bytes.  Then  a  single  large  trace
135              message  is  sent.   This  can greatly reduce tracing intrusion.
136              Make sure you call pvm_exit() in your tasks to flush  the  trace
137              buffer!
138
139
140       PvmTraceOptions
141              Sets  the PVM built-in tracing options.  This is useful for cus‐
142              tom trace collection tools to allow analysis of library  routine
143              execution times and invocation counts.  By default, tracing with
144              PvmTraceFull produces full trace events with  calling  arguments
145              and return values.  Using PvmTraceTime produces total time spent
146              executing each library routine.  The PvmTraceCount  option  keep
147              only a count of the number of times each routine was called.
148
149
150       PvmFragSize
151              Val specifies the message fragment size in bytes.  Default value
152              varies with host architecture.
153
154
155       PvmResvTids
156              A val of 1 enables the task to send messages with reserved  tags
157              and  to non-task destinations.  The default (0) causes libpvm to
158              generate a PvmBadParam error when a reserved identifier is spec‐
159              ified.
160
161
162       PvmSelfOutputTid
163              Sets  the  stdout  destination for the calling task.  Everything
164              printed on stdout is packed into messages and sent to the desti‐
165              nation.   Note:  this  only works for spawned tasks, because the
166              pvmd doesn't get the output from tasks started by  other  means.
167              val  is  the  TID  of a PVM task.  Setting PvmSelfOutputTid to 0
168              redirects stdout to the master pvmd, which  writes  to  the  log
169              file /tmp/pvml.<uid>.  The default setting is inherited from the
170              parent task, else is 0.  Setting either PvmSelfOutputTid or Pvm‐
171              SelfOutputCode  also  causes both PvmOutputTid and PvmOutputCode
172              to take on the values of PvmSelfOutputTid and PvmSelfOutputCode,
173              respectively.
174
175
176       PvmSelfOutputCode
177              Sets the message tag for standard output messages.
178
179
180       PvmSelfTraceTid
181              Sets  the  trace  data message destination for the calling task.
182              Libpvm trace data is sent as messages to the  destination.   val
183              is the TID of a PVM task.  Setting PvmSelfTraceTid to 0 discards
184              trace data.  The default setting is inherited  from  the  parent
185              task,  else  is  0.   Setting either PvmSelfTraceTid or PvmSelf‐
186              TraceCode also causes both PvmTraceTid and PvmTraceCode to  take
187              on  the  values of PvmSelfTraceTid and PvmSelfTraceCode, respec‐
188              tively.
189
190
191       PvmSelfTraceCode
192              Sets the message tag for trace data messages.
193
194
195       PvmSelfTraceBuffer
196              Sets the trace  buffer  size  for  trace  event  collection  (in
197              bytes).
198
199
200       PvmSelfTraceOptions
201              Sets  the PVM built-in tracing options for the calling task (see
202              PvmTraceOptions).
203
204
205       PvmShowTids
206              If true (nonzero), pvm_catchout tags each line of output printed
207              by  a child task with the task id.  Otherwise, output is exactly
208              as printed.
209
210
211       PvmPollType
212              Sets the message wait policy when  using  shared-memory  message
213              transport.   Setting  PvmPollType  to PvmPollConstant causes the
214              application to spin on its message queue waiting for a  message.
215              Setting  PvmPollType  to  PvmPollSleep causes the application to
216              poll the message queue for  messages  PvmPollTime  times  before
217              pending on the semaphore.
218
219
220       PvmPollTime
221              Sets  the  poll  count  for  applications checking their message
222              queue before they pend on the semaphore.  This option is ignored
223              if PvmPollType is set to PvmPollConstant.
224
225
226       PvmOutputContext
227              Sets  the  message  context  for output collection messages from
228              children.
229
230
231       PvmTraceContext
232              Sets the message context for trace data messages from children.
233
234
235       PvmSelfOutputContext
236              Sets the message context for output collection from the  calling
237              task.
238
239
240       PvmSelfTraceContext
241              Sets  the message context for trace data messages from the call‐
242              ing task.
243
244
245       PvmNoReset
246              When set true (non-zero integer value) informs PVM *not* to kill
247              off  the calling task when performing a "reset" command, such as
248              issued by the "pvm" console.
249
250
251       pvm_setopt returns the previous value  of  the  option.   If  an  error
252       occurs, the PVM error code is returned in place of the option value.
253
254

EXAMPLES

256       C:
257            oldval = pvm_setopt( PvmRoute, PvmRouteDirect );
258       Fortran:
259            CALL PVMFSETOPT( PVMAUTOERR, 1, OLDVAL )
260
261

ERRORS

263       This error condition can be returned
264
265       PvmBadParam
266              giving an invalid value.
267

SEE ALSO

269       pvm_getopt(3PVM)
270
271
272
273                                 4 April, 1994                    SETOPT(3PVM)
Impressum