Skip to content

Commit c83718f

Browse files
author
Shane Snyder
committed
updated pydarshan for DFS module
1 parent a3f2b32 commit c83718f

12 files changed

+99
-100
lines changed

darshan-util/pydarshan/darshan/backend/api_def_c.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,21 @@
9898
struct darshan_dfs_file
9999
{
100100
struct darshan_base_record base_rec;
101-
int64_t counters[54];
101+
int64_t counters[52];
102102
double fcounters[15];
103+
unsigned char pool_uuid[16];
104+
unsigned char cont_uuid[16];
105+
};
106+
107+
struct darshan_daos_object
108+
{
109+
struct darshan_base_record base_rec;
110+
int64_t counters[63];
111+
double fcounters[15];
112+
unsigned char pool_uuid[16];
113+
unsigned char cont_uuid[16];
114+
uint64_t oid_hi;
115+
uint64_t oid_lo;
103116
};
104117
105118
struct darshan_stdio_file
@@ -212,6 +225,8 @@
212225
extern char *posix_f_counter_names[];
213226
extern char *dfs_counter_names[];
214227
extern char *dfs_f_counter_names[];
228+
extern char *daos_counter_names[];
229+
extern char *daos_f_counter_names[];
215230
extern char *stdio_counter_names[];
216231
extern char *stdio_f_counter_names[];
217232

darshan-util/pydarshan/darshan/backend/cffi_backend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def mod_name_to_idx(mod_name):
8787
"PNETCDF_VAR": "struct darshan_pnetcdf_var **",
8888
"POSIX": "struct darshan_posix_file **",
8989
"DFS": "struct darshan_dfs_file **",
90+
"DAOS": "struct darshan_daos_object **",
9091
"STDIO": "struct darshan_stdio_file **",
9192
"APXC-HEADER": "struct darshan_apxc_header_record **",
9293
"APXC-PERF": "struct darshan_apxc_perf_record **",

darshan-util/pydarshan/darshan/experimental/aggregators/agg_ioops.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@ def agg_ioops(self, mode='append'):
1111
None or dict: Depending on mode
1212
"""
1313

14-
series = [
15-
{'name': 'POSIX', 'type': 'bar', 'data': [0, 0, 0, 0, 0, 0, 0] },
16-
{'name': 'MPI-IO Indep.', 'type': 'bar', 'data': [0, 0, 0, 0, 0, 0, 0] },
17-
{'name': 'MPI-IO Coll.', 'type': 'bar', 'data': [0, 0, 0, 0, 0, 0, 0] },
18-
{'name': 'STDIO', 'type': 'bar', 'data': [0, 0, 0, 0, 0, 0, 0] },
19-
{'name': 'DFS', 'type': 'bar', 'data': [0, 0, 0, 0, 0, 0, 0] },
20-
]
21-
22-
2314
# convienience
2415
recs = self.records
2516
ctx = {}
@@ -121,6 +112,11 @@ def agg_ioops(self, mode='append'):
121112
'Writex': agg[mod + '_WRITEXS'],
122113
'Open': agg[mod + '_OPENS'],
123114
'GlobalOpen': agg[mod + '_GLOBAL_OPENS'],
115+
'Lookup': agg[mod + '_LOOKUPS'],
116+
'Get Size': agg[mod + '_GET_SIZES'],
117+
'Punch': agg[mod + '_PUNCHES'],
118+
'Remove': agg[mod + '_REMOVES'],
119+
'Stat': agg[mod + '_STATS'],
124120
}
125121
ctx[mod] = agg
126122
ctx[mod + '_simple'] = tmp

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

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,6 @@ def gather_count_data(report, mod):
4949
0, # faulty? mod_data['POSIX_MMAPS'],
5050
mod_data['POSIX_FSYNCS'] + mod_data['POSIX_FDSYNCS']
5151
]
52-
elif mod == 'DFS':
53-
labels = ['Read', 'Readx', 'Write', 'Writex', 'Open', 'GlobalOpen']
54-
counts = [
55-
mod_data['DFS_READS'],
56-
mod_data['DFS_READXS'],
57-
mod_data['DFS_WRITES'],
58-
mod_data['DFS_WRITEXS'],
59-
mod_data['DFS_OPENS'],
60-
mod_data['DFS_GLOBAL_OPENS'],
61-
]
6252

6353
# Gather MPIIO
6454
elif mod == 'MPI-IO':
@@ -164,6 +154,22 @@ def gather_count_data(report, mod):
164154
report.summary['agg_ioops']['PNETCDF_FILE']['PNETCDF_FILE_COLL_WAITS'],
165155
]
166156

157+
elif mod == 'DFS':
158+
labels = ['Read', 'Readx', 'Write', 'Writex', 'Open', 'GlobalOpen', 'Lookup', 'Get Size', 'Punch', 'Remove', 'Stat']
159+
counts = [
160+
mod_data['DFS_READS'],
161+
mod_data['DFS_READXS'],
162+
mod_data['DFS_WRITES'],
163+
mod_data['DFS_WRITEXS'],
164+
mod_data['DFS_OPENS'],
165+
mod_data['DFS_GLOBAL_OPENS'],
166+
mod_data['DFS_LOOKUPS'],
167+
mod_data['DFS_GET_SIZES'],
168+
mod_data['DFS_PUNCHES'],
169+
mod_data['DFS_REMOVES'],
170+
mod_data['DFS_STATS'],
171+
]
172+
167173
return labels, counts
168174

169175
def plot_opcounts(report, mod, ax=None):

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"log_path, mod, func, expected_xticklabels",
1515
[
1616
(
17-
"snyders_ior-DFS_id531897-30546_8-18-57619-12789084789544057019_1.darshan",
17+
"snyder_ior-DFS_id1057716-201712_11-8-64400-1922568413188514066_1.darshan",
1818
"DFS",
1919
plot_access_histogram,
2020
["0-100", "101-1K", "1K-10K", "10K-100K", "100K-1M",
@@ -72,10 +72,10 @@
7272
"1M-4M", "4M-10M", "10M-100M", "100M-1G", "1G+"],
7373
),
7474
(
75-
"snyders_ior-DFS_id531897-30546_8-18-57619-12789084789544057019_1.darshan",
75+
"snyder_ior-DFS_id1057716-201712_11-8-64400-1922568413188514066_1.darshan",
7676
"DFS",
7777
plot_opcounts,
78-
['Read', 'Readx', 'Write', 'Writex', 'Open', 'GlobalOpen'],
78+
['Read', 'Readx', 'Write', 'Writex', 'Open', 'GlobalOpen', 'Lookup', 'Get Size', 'Punch', 'Remove', 'Stat'],
7979
),
8080
(
8181
"dxt.darshan",

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@
5757
),
5858
),
5959
(
60-
"snyders_ior-DFS_id531897-30546_8-18-57619-12789084789544057019_1.darshan",
60+
"snyder_ior-DFS_id1057716-201712_11-8-64400-1922568413188514066_1.darshan",
6161
pd.DataFrame(
6262
np.array([
63-
[0.0, 0, 6.973743438720703e-06],
64-
[0, 3.337860107421875e-05, 0.0],
65-
[0.001381218433380127, 0.009676456451416016, 0.028002262115478516],
63+
[0.0, 0.0, 0.0, 0.0],
64+
[0.0, 4.515051841e-06, 0.0, 0.0],
65+
[0.001456562, 0.002266062, 0.007923812, 0.0],
6666
]),
6767
["POSIX", "STDIO", "DFS"],
68-
["Read", "Write", "Meta"],
68+
["Read", "Write", "Meta", "Wait"],
6969
),
7070
),
7171
],
@@ -100,8 +100,8 @@ def test_get_io_cost_df(logname, expected_df):
100100
[0.0, 1111.0],
101101
),
102102
(
103-
"snyders_ior-DFS_id531897-30546_8-18-57619-12789084789544057019_1.darshan",
104-
[0.0, 1],
103+
"snyder_ior-DFS_id1057716-201712_11-8-64400-1922568413188514066_1.darshan",
104+
[0.0, 0.80276728],
105105
),
106106
],
107107
)
@@ -121,28 +121,28 @@ def test_plot_io_cost_ylims(logname, expected_ylims):
121121
assert_allclose(actual_ylims, [0.0, 100.0])
122122

123123
@pytest.mark.parametrize(
124-
"logname, expected_yticks", [
124+
"logname, expected_yticks, expected_yticklabels", [
125125
(
126126
"ior_hdf5_example.darshan",
127127
[0.0, 0.2, 0.4, 0.6, 0.8, 1.0],
128+
['0.0', '0.2', '0.4', '0.6', '0.8', '1.0'],
128129
),
129130
(
130131
"sample-badost.darshan",
131132
[0, 156, 312, 468, 624, 780],
133+
['0', '156', '312', '468', '624', '780'],
132134
),
133135
(
134-
"snyders_ior-DFS_id531897-30546_8-18-57619-12789084789544057019_1.darshan",
135-
[0.0, 0.2, 0.4, 0.6, 0.8, 1.0],
136+
"snyder_ior-DFS_id1057716-201712_11-8-64400-1922568413188514066_1.darshan",
137+
[0.0 , 0.16055346, 0.32110691, 0.48166037, 0.64221382, 0.80276728],
138+
['0.0000' , '0.1606', '0.3211', '0.4817', '0.6422', '0.8028'],
136139
),
137140
],
138141
)
139-
def test_plot_io_cost_y_ticks_and_labels(logname, expected_yticks):
142+
def test_plot_io_cost_y_ticks_and_labels(logname, expected_yticks, expected_yticklabels):
140143
# check the y-axis tick marks are at the appropriate
141144
# locations and the labels are as expected
142145

143-
# create the expected y-axis tick labels from the y ticks
144-
expected_yticklabels = [str(i) for i in expected_yticks]
145-
146146
logpath = get_log_path(logname)
147147
with darshan.DarshanReport(logpath) as report:
148148
fig = plot_io_cost(report=report)

0 commit comments

Comments
 (0)