Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
darshan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
72
Issues
72
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
darshan
darshan
Commits
b770409e
Commit
b770409e
authored
Jan 13, 2016
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor bug fix in darshan-diff tool
parent
4bbe8e64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
darshan-util/darshan-diff.c
darshan-util/darshan-diff.c
+18
-13
No files found.
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 entry in the global hash table of darshan records
*
for this log file, so create one and add it.
/* there
are currently 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
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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