Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jakob Luettgau
darshan
Commits
b770409e
Commit
b770409e
authored
Jan 13, 2016
by
Shane Snyder
Browse files
minor bug fix in darshan-diff tool
parent
4bbe8e64
Changes
1
Hide whitespace changes
Inline
Side-by-side
darshan-util/darshan-diff.c
View file @
b770409e
...
...
@@ -408,11 +408,24 @@ static int darshan_build_global_record_hash(
mod_rec
->
rank
=
base_rec
->
rank
;
HASH_FIND
(
hlink
,
*
rec_hash
,
&
tmp_rec_id
,
sizeof
(
darshan_record_id
),
file_rec
);
if
(
file_rec
)
if
(
!
file_rec
)
{
/* the
global record already exists, so we need to just add the
*
module record to the linked list of records for this module
/* the
re is no entry in the global hash table of darshan records
*
for this log file, so create one and add it.
*/
file_rec
=
malloc
(
sizeof
(
struct
darshan_file_record_ref
));
assert
(
file_rec
);
memset
(
file_rec
,
0
,
sizeof
(
struct
darshan_file_record_ref
));
file_rec
->
rec_id
=
tmp_rec_id
;
HASH_ADD
(
hlink
,
*
rec_hash
,
rec_id
,
sizeof
(
darshan_record_id
),
file_rec
);
}
/* add new record into the linked list of this module's records */
if
(
file_rec
->
mod_recs
[
i
])
{
/* there is already an initialized linked list for this module */
/* we start at the end of the list and work backwards to insert this
* record (the list is sorted according to increasing ranks, and in
...
...
@@ -449,17 +462,9 @@ static int darshan_build_global_record_hash(
}
else
{
/* there
is no
ent
r
y
in the global hash table of darshan records
*
for this log file, so create one and add it.
/* there
are curr
ent
l
y
no records for this module, so just
*
initialize a new linked list
*/
file_rec
=
malloc
(
sizeof
(
struct
darshan_file_record_ref
));
assert
(
file_rec
);
memset
(
file_rec
,
0
,
sizeof
(
struct
darshan_file_record_ref
));
file_rec
->
rec_id
=
tmp_rec_id
;
HASH_ADD
(
hlink
,
*
rec_hash
,
rec_id
,
sizeof
(
darshan_record_id
),
file_rec
);
/* also, add this record to this module's linked list of records */
mod_rec
->
prev
=
mod_rec
->
next
=
mod_rec
;
file_rec
->
mod_recs
[
i
]
=
mod_rec
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment