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
darshan
darshan
Commits
7d70eb0c
Commit
7d70eb0c
authored
Jan 22, 2019
by
Shane Snyder
Browse files
bug fix in handling dxt in darshan-convert tool
parent
e65be62d
Changes
1
Hide whitespace changes
Inline
Side-by-side
darshan-util/darshan-convert.c
View file @
7d70eb0c
...
...
@@ -258,7 +258,7 @@ int main(int argc, char **argv)
struct
darshan_mnt_info
*
mnt_data_array
;
struct
darshan_name_record_ref
*
name_hash
=
NULL
;
struct
darshan_name_record_ref
*
ref
,
*
tmp
;
char
*
mod_buf
;
char
*
mod_buf
,
*
tmp_mod_buf
;
enum
darshan_comp_type
comp_type
;
int
bzip2
;
int
obfuscate
;
...
...
@@ -388,26 +388,46 @@ int main(int argc, char **argv)
continue
;
}
/* we have module data to convert */
memset
(
mod_buf
,
0
,
DEF_MOD_BUF_SIZE
);
/* for dxt, don't use static record buffer and instead have
* darshan-logutils malloc us memory for the trace data
*/
if
(
i
==
DXT_POSIX_MOD
||
i
==
DXT_MPIIO_MOD
)
{
tmp_mod_buf
=
NULL
;
}
else
{
tmp_mod_buf
=
mod_buf
;
memset
(
tmp_mod_buf
,
0
,
DEF_MOD_BUF_SIZE
);
}
/* loop over each of the module's records and convert */
while
((
ret
=
mod_logutils
[
i
]
->
log_get_record
(
infile
,
(
void
**
)
&
mod_buf
))
==
1
)
while
((
ret
=
mod_logutils
[
i
]
->
log_get_record
(
infile
,
(
void
**
)
&
tmp_
mod_buf
))
==
1
)
{
base_rec
=
(
struct
darshan_base_record
*
)
mod_buf
;
base_rec
=
(
struct
darshan_base_record
*
)
tmp_
mod_buf
;
if
(
!
hash
||
hash
==
base_rec
->
id
)
{
ret
=
mod_logutils
[
i
]
->
log_put_record
(
outfile
,
mod_buf
);
ret
=
mod_logutils
[
i
]
->
log_put_record
(
outfile
,
tmp_
mod_buf
);
if
(
ret
<
0
)
{
if
(
i
==
DXT_POSIX_MOD
||
i
==
DXT_MPIIO_MOD
)
free
(
tmp_mod_buf
);
darshan_log_close
(
infile
);
darshan_log_close
(
outfile
);
unlink
(
outfile_name
);
return
(
-
1
);
}
}
memset
(
mod_buf
,
0
,
DEF_MOD_BUF_SIZE
);
if
(
i
==
DXT_POSIX_MOD
||
i
==
DXT_MPIIO_MOD
)
{
free
(
tmp_mod_buf
);
tmp_mod_buf
=
NULL
;
}
else
{
memset
(
tmp_mod_buf
,
0
,
DEF_MOD_BUF_SIZE
);
}
}
if
(
ret
<
0
)
...
...
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