File: pvm_setopt.3

package info (click to toggle)
pvm 3.4.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 8,280 kB
  • sloc: ansic: 72,074; makefile: 1,197; fortran: 631; sh: 282; csh: 74; asm: 37
file content (277 lines) | stat: -rw-r--r-- 9,661 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
.\" $Id: pvm_setopt.3,v 1.2 2000/02/11 22:28:07 pvmsrc Exp $
.TH SETOPT 3PVM "4 April, 1994" "" "PVM Version 3.4"
.SH NAME
pvm_setopt \- Sets libpvm options.

.SH SYNOPSIS
.nf
.ft B
C	int oldval = pvm_setopt( int what, int val )
.br

Fortran	call pvmfsetopt( what, val, oldval )
.fi

.SH PARAMETERS
.IP what 0.8i
Integer defining what to set.  One of:
.nf
PvmRoute              1    Message routing policy
PvmDebugMask          2    Libpvm debug mask
PvmAutoErr            3    Auto error reporting
PvmOutputTid          4    Stdout destination for children
PvmOutputCode         5    Output message tag for children
PvmTraceTid           6    Trace data destination for children
PvmTraceCode          7    Trace message tag for children
PvmTraceBuffer        8    Trace buffer size for children
PvmTraceOptions       9    Trace collection options for children
PvmFragSize          10    Message fragment size
PvmResvTids          11    Allow messages to reserved tags and TIDs
PvmSelfOutputTid     12    Stdout destination
PvmSelfOutputCode    13    Output message tag
PvmSelfTraceTid      14    Trace data destination
PvmSelfTraceCode     15    Trace message tag
PvmSelfTraceBuffer   16    Trace buffer size
PvmSelfTraceOptions  17    Trace collection options
PvmShowTids          18    pvm_catchout prints task ids with output
PvmPollType          19    Message wait policy (shared memory)
PvmPollTime          20    Message spinwait duration
PvmOutputContext     21    Output message context for children
PvmTraceContext      22    Trace message context for children
PvmSelfOutputContext 23    Output message context
PvmSelfTraceContext  24    Trace message context
PvmNoReset           25    Do not kill task on reset
.fi
.br
.IP val
Integer specifying new setting of option.
.sp
Predefined values for \fIPvmRoute\fR are:
.nf
PvmDontRoute      1    Don't request or grant connections
PvmAllowDirect    2    (Default) Don't request but allow
PvmRouteDirect    3    Request and allow connections
.fi
.sp
Predefined values for \fIPvmTraceOptions\fR are:
.nf
PvmTraceFull      1    (Default) Do full trace events
PvmTraceTime      2    Only do PVM routine timings
PvmTraceCount     3    Only do PVM routine profiling (call counts)
.fi
.sp
Predefined values for \fIPvmPollType\fR are:
.nf
PvmPollConstant   1    Spin on its message queue
PvmPollSleep      2    Poll the message queue PvmPollTime times
.fi
.sp
.IP oldval
Integer returning the previous setting of the option.

.SH DESCRIPTION
The routine
.I pvm_setopt
is a general purpose function used to set
miscellaneous options in the PVM library.
\fIWhat\fR is one of:
.sp
.IP PvmRoute
Advises PVM on whether
to set up direct task-to-task links
.I PvmRouteDirect
(using TCP) for all subsequent communication.
Once a link is established it persists until the application finishes.
If a direct link can not be established because one of the two tasks
has requested
.I PvmDontRoute
or because adequate resources aren't available,
then the default route through the PVM daemons is used.
On multiprocessors such as Intel Paragon this option is ignored
because the communication between tasks on these machines
always uses the native protocol for direct communication.
pvm_setopt can be called multiple times to selectively establish
direct links,
but is typically set only once near the beginning of each task.
.I PvmAllowDirect
is the default route setting.
This setting on task A allows other tasks to set up direct links to A.
Once a direct link is established between tasks
both tasks will use it for sending messages.
.sp
.IP PvmDebugMask
When debugging is turned on, PVM will log detailed information
about its operations and progress on its \fIstderr\fR stream.
\fIval\fR is the debugging level.
Default is not to print any debug information.
.PP
.IP PvmAutoErr
When an error results from a libpvm function call
and \fIPvmAutoErr\fR is set to 1 (the default),
an error message is automatically printed on \fIstderr\fR.
A setting of 0 disables this.
A setting of 2 causes the library to terminate the task
by calling exit() after printing the error message.
A setting of 3 causes the library to abort
after printing the error message.
.sp
.IP PvmOutputTid
Sets the \fIstdout\fR destination for children tasks
(spawned after the call to pvm_setopt).
Everything printed on the standard output of
tasks spawned by the calling task is
packed into messages and sent to the destination.
\fIval\fR is the TID of a PVM task.
Setting PvmOutputTid to
0 redirects stdout to the master pvmd,
which writes to the log file /tmp/pvml.<uid>
The default setting is inherited from the parent task,
else is 0.
.sp
.IP PvmOutputCode
Sets the message tag for standard output messages.
Should only be set when a task has \fIPvmOutputTid\fR set to itself.
.sp
.IP PvmTraceTid
Sets the trace data message destination for children tasks
(spawned after the call to pvm_setopt).
Libpvm trace data is sent as messages to the destination.
\fIval\fR is the TID of a PVM task.
Setting PvmTraceTid to 0
discards trace data.
The default setting is inherited from the parent task,
else is 0.
.sp
.IP PvmTraceCode
Sets the message tag for trace data messages.
Should only be set when a task has \fIPvmTraceTid\fR set to itself.
.sp
.IP PvmTraceBuffer
Sets the trace buffer size for trace event collection (in bytes).
Rather than send a separate message for each trace event, the
events are written to a message buffer until the buffer reaches
PvmTraceBuffer bytes.  Then a single large trace message is sent.
This can greatly reduce tracing intrusion.  Make sure you call
pvm_exit() in your tasks to flush the trace buffer!
.sp
.IP PvmTraceOptions
Sets the PVM built-in tracing options.  This is useful for
custom trace collection tools to allow analysis of library
routine execution times and invocation counts.  By default,
tracing with \fIPvmTraceFull\fR produces full trace events with
calling arguments and return values.  Using \fIPvmTraceTime\fR
produces total time spent executing each library routine.
The \fIPvmTraceCount\fR option keep only a count of the
number of times each routine was called.
.sp
.IP PvmFragSize
\fIVal\fR specifies the message fragment size in bytes.
Default value varies with host architecture.
.sp
.IP PvmResvTids
A \fIval\fR of 1 enables the task to send messages with reserved
tags and to non-task destinations.
The default (0) causes libpvm to generate a \fIPvmBadParam\fR error
when a reserved identifier is specified.
.sp
.IP PvmSelfOutputTid
Sets the \fIstdout\fR destination for the calling task.
Everything printed on \fIstdout\fR is
packed into messages and sent to the destination.
Note: this only works for spawned tasks,
because the pvmd doesn't get the output from tasks started
by other means.
\fIval\fR is the TID of a PVM task.
Setting PvmSelfOutputTid to
0 redirects stdout to the master pvmd,
which writes to the log file /tmp/pvml.<uid>.
The default setting is inherited from the parent task,
else is 0.
Setting either PvmSelfOutputTid
or PvmSelfOutputCode
also causes both \fIPvmOutputTid\fR
and \fIPvmOutputCode\fR to take
on the values of PvmSelfOutputTid and PvmSelfOutputCode,
respectively.
.sp
.IP PvmSelfOutputCode
Sets the message tag for standard output messages.
.sp
.IP PvmSelfTraceTid
Sets the trace data message destination for the calling task.
Libpvm trace data is sent as messages to the destination.
\fIval\fR is the TID of a PVM task.
Setting PvmSelfTraceTid to 0
discards trace data.
The default setting is inherited from the parent task,
else is 0.
Setting either PvmSelfTraceTid
or PvmSelfTraceCode
also causes both \fIPvmTraceTid\fR
and \fIPvmTraceCode\fR to take
on the values of PvmSelfTraceTid and PvmSelfTraceCode,
respectively.
.sp
.IP PvmSelfTraceCode
Sets the message tag for trace data messages.
.sp
.IP PvmSelfTraceBuffer
Sets the trace buffer size for trace event collection (in bytes).
.sp
.IP PvmSelfTraceOptions
Sets the PVM built-in tracing options for the calling task
(see PvmTraceOptions).
.sp
.IP PvmShowTids
If true (nonzero), \fIpvm_catchout\fR tags each line of output printed
by a child task with the task id.
Otherwise, output is exactly as printed.
.sp
.IP PvmPollType
Sets the message wait policy when using shared-memory message transport.
Setting PvmPollType to PvmPollConstant
causes the application to spin on its message queue waiting for a message.
Setting PvmPollType to PvmPollSleep causes the application to poll the message
queue for messages PvmPollTime times before pending on the semaphore.
.sp
.IP PvmPollTime
Sets the poll count for applications checking their message queue before they
pend on the semaphore.  This option is ignored if PvmPollType is set to
PvmPollConstant.
.sp
.IP PvmOutputContext
Sets the message context for output collection messages from children.
.sp
.IP PvmTraceContext
Sets the message context for trace data messages from children.
.sp
.IP PvmSelfOutputContext
Sets the message context for output collection from the calling task.
.sp
.IP PvmSelfTraceContext
Sets the message context for trace data messages from the calling task.
.sp
.IP PvmNoReset
When set true (non-zero integer value) informs PVM *not* to kill off
the calling task when performing a "reset" command, such as issued
by the "pvm" console.
.sp
.PP
pvm_setopt returns the previous value of the option.
If an error occurs,
the PVM error code is returned in place of the option value.

.SH EXAMPLES
.nf
C:
	oldval = pvm_setopt( PvmRoute, PvmRouteDirect );
Fortran:
	CALL PVMFSETOPT( PVMAUTOERR, 1, OLDVAL )

.SH ERRORS
This error condition can be returned
.IP PvmBadParam
giving an invalid value.
.PP
.SH SEE ALSO
pvm_getopt(3PVM)