File tree Expand file tree Collapse file tree 2 files changed +12
-23
lines changed
darshan-util/pydarshan/darshan/backend Expand file tree Collapse file tree 2 files changed +12
-23
lines changed Original file line number Diff line number Diff line change 21
21
struct darshan_file_category_counters;
22
22
};
23
23
24
-
25
-
26
- struct darshan_accumulator {
27
- int64_t module_id;
28
- int64_t job_nprocs;
29
- void* agg_record;
30
- int num_records;
31
- void *file_hash_table;
32
- double shared_io_total_time_by_slowest;
33
- int64_t total_bytes;
34
- double *rank_cumul_io_total_time;
35
- double *rank_cumul_rw_only_time;
36
- double *rank_cumul_md_only_time;
37
- };
38
-
39
24
struct darshan_mnt_info
40
25
{
41
26
char mnt_type[3031];
51
36
int partial_flag;
52
37
};
53
38
54
- int darshan_accumulator_emit(struct darshan_accumulator, struct darshan_derived_metrics*, void* aggregation_record);
55
- int darshan_accumulator_destroy(struct darshan_accumulator);
56
- int darshan_accumulator_create(enum darshan_module_id, int64_t, struct darshan_accumulator*);
57
- int darshan_accumulator_inject(struct darshan_accumulator, void*, int);
39
+ /* opaque accumulator reference */
40
+ struct darshan_accumulator_st;
41
+ typedef struct darshan_accumulator_st* darshan_accumulator;
42
+
43
+ int darshan_accumulator_create(enum darshan_module_id, int64_t, darshan_accumulator*);
44
+ int darshan_accumulator_inject(darshan_accumulator, void*, int);
45
+ int darshan_accumulator_emit(darshan_accumulator, struct darshan_derived_metrics*, void* aggregation_record);
46
+ int darshan_accumulator_destroy(darshan_accumulator);
58
47
59
48
/* from darshan-log-format.h */
60
49
typedef uint64_t darshan_record_id;
Original file line number Diff line number Diff line change @@ -662,14 +662,14 @@ def log_get_accumulator(log, mod_name: str):
662
662
return None
663
663
mod_type = _structdefs [mod_name ]
664
664
665
- darshan_accumulator = ffi .new ("struct darshan_accumulator *" )
666
665
buf = ffi .new ("void **" )
667
666
r = libdutil .darshan_log_get_record (log ['handle' ], modules [mod_name ]['idx' ], buf )
668
667
rbuf = ffi .cast (mod_type , buf )
669
668
670
- libdutil .darshan_accumulator_create (modules [mod_name ]['idx' ],
671
- jobrec [0 ].nprocs ,
672
- darshan_accumulator )
669
+ darshan_accumulator = ffi .new ("darshan_accumulator *" )
670
+ r = libdutil .darshan_accumulator_create (modules [mod_name ]['idx' ],
671
+ jobrec [0 ].nprocs ,
672
+ darshan_accumulator )
673
673
674
674
# TODO: fix the segfault on the inject call below
675
675
r = libdutil .darshan_accumulator_inject (darshan_accumulator [0 ], rbuf [0 ], 1 )
You can’t perform that action at this time.
0 commit comments