Skip to content

Commit b9043e1

Browse files
authored
Merge pull request #884 from tylerjereddy/treddy_issue_860
ENH: WAIT_TIME in Python summary
2 parents 57e50ef + 141d97b commit b9043e1

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

darshan-util/pydarshan/darshan/cli/summary.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,8 @@ def register_figures(self):
402402
"Average (across all ranks) amount of run time that each process "
403403
"spent performing I/O, broken down by access type. See the right "
404404
"edge bar graph on heat maps in preceding section to indicate if "
405-
"I/O activity was balanced across processes."
405+
"I/O activity was balanced across processes. The 'Wait' category "
406+
"is only meaningful for PNETCDF asynchronous I/O operations."
406407
)
407408
io_cost_params = {
408409
"section_title": "Cross-Module Comparisons",

darshan-util/pydarshan/darshan/experimental/plots/plot_io_cost.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def get_by_avg_series(df: Any, mod_key: str, nprocs: int) -> Any:
3030
Returns
3131
-------
3232
by_avg_series: a ``pd.Series`` containing the
33-
average read, write, and meta times.
33+
average read, write, meta, and wait times.
3434
3535
"""
3636
# filter out all except the following columns
@@ -39,11 +39,16 @@ def get_by_avg_series(df: Any, mod_key: str, nprocs: int) -> Any:
3939
f"{mod_key}_F_WRITE_TIME",
4040
f"{mod_key}_F_META_TIME",
4141
]
42+
if "PNETCDF_FILE" in mod_key:
43+
cols.append("PNETCDF_FILE_F_WAIT_TIME")
44+
else:
45+
cols.append("Wait")
4246
by_avg_series = df.filter(cols, axis=1).sum(axis=0) / nprocs
4347
# reindex to ensure 3 rows are always created
4448
by_avg_series = by_avg_series.reindex(cols, fill_value=0.0)
4549
# rename the columns so the labels are automatically generated when plotting
4650
name_dict = {cols[0]: "Read", cols[1]: "Write", cols[2]: "Meta"}
51+
name_dict[cols[3]] = "Wait"
4752
by_avg_series.rename(index=name_dict, inplace=True)
4853
return by_avg_series
4954

darshan-util/pydarshan/darshan/tests/test_plot_io_cost.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,37 @@
2323
"ior_hdf5_example.darshan",
2424
pd.DataFrame(
2525
np.array([
26-
[0.0196126699, 0.1342029571533203, 0.0074423551],
27-
[0.0196372866, 0.13425052165985107, 0.0475],
28-
[0.016869, 0.086689, 0.097160],
29-
[0.0, 2.5570392608642578e-05, 0.0],
26+
[0.0196126699, 0.1342029571533203, 0.0074423551, 0.0],
27+
[0.0196372866, 0.13425052165985107, 0.0475, 0.0],
28+
[0.016869, 0.086689, 0.097160, 0.0],
29+
[0.0, 2.5570392608642578e-05, 0.0, 0.0],
3030
]),
3131
["POSIX", "MPIIO", "HDF5", "STDIO"],
32-
["Read", "Write", "Meta"],
32+
["Read", "Write", "Meta", "Wait"],
3333
),
3434
),
3535
(
3636
"sample-badost.darshan",
3737
pd.DataFrame(
3838
np.array([
39-
[0.0, 33.48587587394286, 0.5547398688504472],
40-
[0.011203573201783001, 4.632166e-07, 0.135187],
39+
[0.0, 33.48587587394286, 0.5547398688504472, 0.0],
40+
[0.011203573201783001, 4.632166e-07, 0.135187, 0.0],
4141
]),
4242
["POSIX", "STDIO"],
43-
["Read", "Write", "Meta"],
43+
["Read", "Write", "Meta", "Wait"],
4444
),
4545
),
4646
(
4747
"shane_ior-PNETCDF_id438100-438100_11-9-41525-10280033558448664385_1.darshan",
4848
pd.DataFrame(
4949
np.array([
50-
[0.000378787518, 0.002514898777, 0.000068306923],
51-
[0.000397562981, 0.002540826797, 0.001559376717],
52-
[0.000402510166, 0.002579867840, 0.001994967461],
53-
[0.000000000000, 0.000120997429, 0.000000000000],
50+
[0.000378787518, 0.002514898777, 0.000068306923, 0.0],
51+
[0.000397562981, 0.002540826797, 0.001559376717, 0.0],
52+
[0.000402510166, 0.002579867840, 0.001994967461, 0.0],
53+
[0.000000000000, 0.000120997429, 0.000000000000, 0.0],
5454
]),
5555
["POSIX", "MPIIO", "PNETCDF", "STDIO"],
56-
["Read", "Write", "Meta"],
56+
["Read", "Write", "Meta", "Wait"],
5757
),
5858
),
5959
],
@@ -160,8 +160,8 @@ def test_plot_io_cost_y_ticks_and_labels(logname, expected_yticks):
160160
],
161161
),
162162
pd.Series(
163-
data=[1.2, .6, 3.0],
164-
index=["Read", "Write", "Meta"],
163+
data=[1.2, .6, 3.0, 0.0],
164+
index=["Read", "Write", "Meta", "Wait"],
165165
),
166166
),
167167
(
@@ -179,8 +179,8 @@ def test_plot_io_cost_y_ticks_and_labels(logname, expected_yticks):
179179
],
180180
),
181181
pd.Series(
182-
data=[3000.0, 300.0, 30.0],
183-
index=["Read", "Write", "Meta"],
182+
data=[3000.0, 300.0, 30.0, 0.0],
183+
index=["Read", "Write", "Meta", "Wait"],
184184
),
185185
),
186186
(
@@ -199,8 +199,8 @@ def test_plot_io_cost_y_ticks_and_labels(logname, expected_yticks):
199199
],
200200
),
201201
pd.Series(
202-
data=[3001.2, 300.6, 33.0],
203-
index=["Read", "Write", "Meta"],
202+
data=[3001.2, 300.6, 33.0, 0.0],
203+
index=["Read", "Write", "Meta", "Wait"],
204204
),
205205
)
206206
])
@@ -217,11 +217,11 @@ def test_get_by_avg_series(mod_key, input_df, expected_series):
217217
"nonmpi_dxt_anonymized.darshan",
218218
pd.DataFrame(
219219
np.array([
220-
[0.281718, 0.504260, 0.170138],
221-
[0.232386, 0.165982, 0.072751],
220+
[0.281718, 0.504260, 0.170138, 0.0],
221+
[0.232386, 0.165982, 0.072751, 0.0],
222222
]),
223223
["POSIX", "STDIO"],
224-
["Read", "Write", "Meta"],
224+
["Read", "Write", "Meta", "Wait"],
225225
),
226226
),
227227
])

0 commit comments

Comments
 (0)