Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit d9ca211

Browse files
another set of cleanup edits for environment variables in the manual.
1 parent 1e8fea6 commit d9ca211

2 files changed

Lines changed: 37 additions & 33 deletions

File tree

20.2 KB
Binary file not shown.

doc/manual/environ.tex

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,40 @@
33
\chapter{Environment Variables}
44

55
\HPCToolkit{}'s measurement subsystem decides what and how to measure
6-
using information it obtains from environment variables. When using
6+
using information it obtains from environment variables.
7+
This chapter describes all of the environment variables that control
8+
\HPCToolkit's measurement subsystem.
9+
10+
When using
711
\HPCToolkit{}'s \hpcrun{} script to measure the performance of
812
dynamically-linked executables, \hpcrun{} takes information passed
913
to it in command-line arguments and communicates it to \HPCToolkit{}'s
1014
measurement subsystem by appropriately setting environment variables.
1115
To measure statically-linked executables, one first adds \HPCToolkit's
1216
measurement subsystem to a binary as it is linked by using \HPCToolkit's
13-
\hpclink script. Prior to launching a statically-linked binary that
14-
includes \HPCToolkit's measurement subsystem, environment variables
15-
must be set manually by the user prior to launching an application.
16-
This section describes all of the environment variables that control
17-
\HPCToolkit's measurement subsystem. Section~\ref{user-env} describes
17+
\hpclink{} script. Prior to launching a statically-linked binary that
18+
includes \HPCToolkit's measurement subsystem, a user
19+
must manually set environment variables.
20+
21+
Section~\ref{user-env} describes
1822
environment variables of interest to users. Section~\ref{system-env}
1923
describes environment variables designed for use by \HPCToolkit{}
2024
developers. In some cases, \HPCToolkit's developers will ask a user
21-
to set some of these environment variables to generate a detailed error
25+
to set some of the environment variables described in Section~\ref{system-env} to generate a detailed error
2226
report when problems arise.
2327

2428
\section{Environment Variables for Users}
2529
\label{user-env}
2630

2731
\paragraph{HPCRUN\_EVENT\_LIST.}
2832

29-
This environment variable is used provide
30-
HPCToolkit's measurement library with a set of sample (event, period)
31-
pairs that will be used for sample-based measurement. HPCRUN\_EVENT\_LIST
32-
must be set otherwise HPCToolkit's measurement facility will terminate
33+
This environment variable is used provide a set of (event, period)
34+
pairs that will be used to configure \HPCToolkit's measurement subsystem to perform
35+
asynchronous sampling. The HPCRUN\_EVENT\_LIST environment variable
36+
must be set otherwise HPCToolkit's measurement subsystem will terminate
3337
execution. If an application should run with sampling disabled,
3438
HPCRUN\_EVENT\_LIST should be set to NONE. Otherwise, HPCToolkit's
35-
measurement library expects an event list of the form shown below.
39+
measurement subsystem expects an event list of the form shown below.
3640
$$event1[@period1];...;eventN[@periodN]$$ As denoted by the
3741
square brackets, periods are optional. The default period is 1
3842
million.
@@ -46,7 +50,7 @@ \section{Environment Variables for Users}
4650
\paragraph{HPCRUN\_TRACE.}
4751

4852
If this environment variable is set, HPCToolkit's measurement
49-
facility will collect a trace of sample events as part of a measurement
53+
subsystem will collect a trace of sample events as part of a measurement
5054
database in addition to a profile. HPCToolkit's hpctraceviewer
5155
utility can be used to view the trace after the measurement database
5256
are processed with either HPCToolkit's hpcprof or hpcprofmpi
@@ -57,7 +61,7 @@ \section{Environment Variables for Users}
5761

5862
\paragraph{HPCRUN\_OUT\_PATH}
5963

60-
If this environment variable is set, HPCToolkit's measurement library
64+
If this environment variable is set, HPCToolkit's measurement subsystem
6165
will use the value specified as the name of the directory where
6266
output data will be recorded. The default directory for a command
6367
$command$ running under control of a job launcher with as job ID
@@ -71,15 +75,15 @@ \section{Environment Variables for Users}
7175
Flags to set output path with \hpcrun: \verb|-o/--output| $directoryName$
7276

7377
\paragraph{HPCRUN\_PROCESS\_FRACTION}
74-
78+
\sloppy
7579
If this environment variable is set, \HPCToolkit's measurement
76-
library will measure only a fraction of an execution’s processes.
80+
subsystem will measure only a fraction of an execution’s processes.
7781
The value of HPCRUN\_PROCESS\_FRACTION may be written as a a floating
7882
point number or as a fraction. So, '0.10' and '1/10' are equivalent.
7983
If HPCRUN\_PROCESS\_FRACTION is set to a value with an unrecognized
80-
format, \HPCToolkit's measurement library will use the default
84+
format, \HPCToolkit's measurement subsystem will use the default
8185
probability of 0.1. For each process, \HPCToolkit's measurement
82-
library will generate a pseudo-random value in the range [0.0, 1.0).
86+
subsystem will generate a pseudo-random value in the range [0.0, 1.0).
8387
If the generated random number is less than the value of
8488
HPCRUN\_PROCESS\_FRACTION, then \HPCToolkit{} will collect performance
8589
measurements for that process.
@@ -90,16 +94,16 @@ \section{Environment Variables for Users}
9094
\paragraph{HPCRUN\_MEMLEAK\_PROB}
9195

9296
If this environment variable is set, \HPCToolkit's measurement
93-
library will measure only a fraction of an execution’s memory
97+
subsystem will measure only a fraction of an execution’s memory
9498
allocations, e.g., calls to \verb|malloc|, \verb|calloc|, \verb|realloc|,
9599
\verb|posix_memalign|, \verb|memalign|, and valloc. All allocations
96100
monitored will have their corresponding calls to free monitored as
97101
well. The value of HPCRUN\_MEMLEAK\_PROB may be written as a a
98102
floating point number or as a fraction. So, '0.10' and '1/10' are
99103
equivalent. If HPCRUN\_MEMLEAK\_PROB is set to a value with an
100-
unrecognized format, \HPCToolkit's measurement library will use the
104+
unrecognized format, \HPCToolkit's measurement subsystem will use the
101105
default probability of 0.1. For each memory allocation, \HPCToolkit's
102-
measurement library will generate a pseudo-random value in the range
106+
measurement subsystem will generate a pseudo-random value in the range
103107
[0.0, 1.0). If the generated random number is less than the value
104108
of HPCRUN\_MEMLEAK\_PROB, then \HPCToolkit{} will monitor that
105109
allocation.
@@ -110,7 +114,7 @@ \section{Environment Variables for Users}
110114
\paragraph{HPCRUN\_DELAY\_SAMPLING}
111115

112116
\sloppy
113-
If this environment variable is set, HPCToolkit's measurement library
117+
If this environment variable is set, HPCToolkit's measurement subsystem
114118
will initialize itself but not begin measurement using sampling
115119
until the program turns on sampling by calling
116120
\verb|hpctoolkit_sampling_start()|. To measure only a part of a
@@ -124,7 +128,7 @@ \section{Environment Variables for Users}
124128
\paragraph{HPCRUN\_RETAIN\_RECURSION}
125129

126130
Unless this environment variable is set, by default HPCToolkit's
127-
measurement library will summarize call chains from recursive calls
131+
measurement subsystem will summarize call chains from recursive calls
128132
at a depth of two. Typically, application developers have no need
129133
to see performance attribution at all recursion depths when an
130134
application calls recursive procedures such as quicksort. Setting
@@ -137,7 +141,7 @@ \section{Environment Variables for Users}
137141

138142
\paragraph{HPCRUN\_MEMSIZE}
139143

140-
If this environment variable is set, HPCToolkit's measurement library
144+
If this environment variable is set, HPCToolkit's measurement subsystem
141145
will allocate memory for measurement data in segments using the
142146
value specified for HPCRUN\_MEMSIZE (rounded up to the nearest
143147
enclosing multiple of system page size) as the segment size. The
@@ -148,7 +152,7 @@ \section{Environment Variables for Users}
148152

149153
\paragraph{HPCRUN\_LOW\_MEMSIZE}
150154

151-
If this environment variable is set, HPCToolkit's measurement library
155+
If this environment variable is set, HPCToolkit's measurement subsystem
152156
will allocate another segment of measurement data when the amount
153157
of free space available in the current segment is less than the
154158
value specified by HPCRUN\_LOW\_MEMSIZE. The default for low memory
@@ -163,10 +167,10 @@ \section{Environment Variables for Developers}
163167

164168
\paragraph{HPCRUN\_WAIT}
165169

166-
If this environment variable is set, HPCToolkit's measurement library
170+
If this environment variable is set, HPCToolkit's measurement subsystem
167171
will spin wait for a user to attach a debugger. After attaching a
168172
debugger, a user can set breakpoints or watchpoints in the user
169-
program or HPCToolkit's measurement library before continuing
173+
program or HPCToolkit's measurement subsystem before continuing
170174
execution. To continue after attaching a debugger, use the debugger
171175
to set the program variable DEBUGGER\_WAIT=0 and then continue.
172176
Note: Setting HPCRUN\_WAIT can only be cleared by a debugger
@@ -177,12 +181,12 @@ \section{Environment Variables for Developers}
177181
\paragraph{HPCRUN\_DEBUG\_FLAGS}
178182

179183
\HPCToolkit{} supports a multitude of debugging flags that enable a
180-
developer to log information about HPCToolkit's measurement facility
184+
developer to log information about HPCToolkit's measurement subsystem
181185
as it records sample events. If HPCRUN\_DEBUG\_FLAGS is set, this
182186
environment variable is expected to contain a list of tokens separated
183187
by a space, comma, or semicolon. If a token is the name of a debugging
184188
flag, the flag will be enabled, it will cause HPCToolkit's measurement
185-
facility to log messages guarded with that flag as an application
189+
subsystem to log messages guarded with that flag as an application
186190
executes. The complete list of dynamic debugging flags can be found
187191
in HPCToolkit's source code in the file
188192
src/tool/hpcrun/messages/messages.flag-defns. A special flag value
@@ -203,11 +207,11 @@ \section{Environment Variables for Developers}
203207
\paragraph{HPCRUN\_ABORT\_TIMEOUT}
204208

205209
If an execution hangs when profiled with HPCToolkit's measurement
206-
facility, the environment variable HPCRUN\_ABORT\_TIMEOUT can be
210+
subsystem, the environment variable HPCRUN\_ABORT\_TIMEOUT can be
207211
used to specify the number of seconds that an application should
208212
be allowed to execute. After executing for the number of seconds
209213
specified in HPCRUN\_ABORT\_TIMEOUT, HPCToolkit's measurement
210-
facility will forcibly terminate the execution and record a core
214+
subsystem will forcibly terminate the execution and record a core
211215
dump (assuming that core dumps are enabled) to aid in debugging.
212216

213217
\parg
@@ -218,10 +222,10 @@ \section{Environment Variables for Developers}
218222
\paragraph{HPCRUN\_QUIET}
219223

220224
If this unfortunately-named environment variable is set, HPCToolkit's
221-
measurement facility will turn on a default set of dynamic debugging
225+
measurement subsystem will turn on a default set of dynamic debugging
222226
variables to log information about HPCToolkit's stack unwinding
223227
based on on-the-fly binary analysis. If set, HPCToolkit's measurement
224-
facility log information associated with the following debug flags:
228+
subsystem log information associated with the following debug flags:
225229
TROLL (when a return address was not found algorithmically
226230
and \HPCToolkit{} begins looking for possible return address values
227231
on the call stack), SUSPICIOUS\_INTERVAL (when an x86 unwind recipe

0 commit comments

Comments
 (0)