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
812dynamically-linked executables, \hpcrun {} takes information passed
913to it in command-line arguments and communicates it to \HPCToolkit {}'s
1014measurement subsystem by appropriately setting environment variables.
1115To measure statically-linked executables, one first adds \HPCToolkit 's
1216measurement 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
1822environment variables of interest to users. Section~\ref {system-env }
1923describes environment variables designed for use by \HPCToolkit {}
2024developers. 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
2226report 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
3337execution. If an application should run with sampling disabled,
3438HPCRUN\_ 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
3741square brackets, periods are optional. The default period is 1
3842million.
@@ -46,7 +50,7 @@ \section{Environment Variables for Users}
4650\paragraph {HPCRUN\_ TRACE. }
4751
4852If 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
5054database in addition to a profile. HPCToolkit's hpctraceviewer
5155utility can be used to view the trace after the measurement database
5256are 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
6165will use the value specified as the name of the directory where
6266output 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}
7175Flags to set output path with \hpcrun : \verb |-o/--output | $ directoryName$
7276
7377\paragraph {HPCRUN\_ PROCESS\_ FRACTION }
74-
78+ \sloppy
7579If 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.
7781The value of HPCRUN\_ PROCESS\_ FRACTION may be written as a a floating
7882point number or as a fraction. So, '0.10' and '1/10' are equivalent.
7983If 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
8185probability 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).
8387If the generated random number is less than the value of
8488HPCRUN\_ PROCESS\_ FRACTION, then \HPCToolkit {} will collect performance
8589measurements for that process.
@@ -90,16 +94,16 @@ \section{Environment Variables for Users}
9094\paragraph {HPCRUN\_ MEMLEAK\_ PROB }
9195
9296If 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
9498allocations, e.g., calls to \verb |malloc |, \verb |calloc |, \verb |realloc |,
9599\verb |posix_memalign |, \verb |memalign |, and valloc. All allocations
96100monitored will have their corresponding calls to free monitored as
97101well. The value of HPCRUN\_ MEMLEAK\_ PROB may be written as a a
98102floating point number or as a fraction. So, '0.10' and '1/10' are
99103equivalent. 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
101105default 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
104108of HPCRUN\_ MEMLEAK\_ PROB, then \HPCToolkit {} will monitor that
105109allocation.
@@ -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
114118will initialize itself but not begin measurement using sampling
115119until 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
126130Unless 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
128132at a depth of two. Typically, application developers have no need
129133to see performance attribution at all recursion depths when an
130134application 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
141145will allocate memory for measurement data in segments using the
142146value specified for HPCRUN\_ MEMSIZE (rounded up to the nearest
143147enclosing 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
152156will allocate another segment of measurement data when the amount
153157of free space available in the current segment is less than the
154158value 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
167171will spin wait for a user to attach a debugger. After attaching a
168172debugger, 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
170174execution. To continue after attaching a debugger, use the debugger
171175to set the program variable DEBUGGER\_ WAIT=0 and then continue.
172176Note: 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
181185as it records sample events. If HPCRUN\_ DEBUG\_ FLAGS is set, this
182186environment variable is expected to contain a list of tokens separated
183187by a space, comma, or semicolon. If a token is the name of a debugging
184188flag, 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
186190executes. The complete list of dynamic debugging flags can be found
187191in HPCToolkit's source code in the file
188192src/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
205209If 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
207211used to specify the number of seconds that an application should
208212be allowed to execute. After executing for the number of seconds
209213specified 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
211215dump (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
220224If 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
222226variables to log information about HPCToolkit's stack unwinding
223227based 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:
225229TROLL (when a return address was not found algorithmically
226230and \HPCToolkit {} begins looking for possible return address values
227231on the call stack), SUSPICIOUS\_ INTERVAL (when an x86 unwind recipe
0 commit comments