Skip to content
GitLab
Menu
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
d8b6e0dc
Commit
d8b6e0dc
authored
Aug 17, 2015
by
Shane Snyder
Browse files
update darshan log header to show compression type
parent
53c9e15b
Changes
2
Hide whitespace changes
Inline
Side-by-side
darshan-log-format.h
View file @
d8b6e0dc
...
...
@@ -60,6 +60,13 @@ static char * const darshan_module_names[] =
};
#undef X
/* compression method used on darshan log file */
enum
darshan_comp_type
{
DARSHAN_ZLIB_COMP
,
DARSHAN_BZIP2_COMP
,
};
/* the darshan_log_map structure is used to indicate the location of
* specific module data in a Darshan log. Note that 'off' and 'len' are
* the respective offset and length of the data in the file, in *uncompressed*
...
...
@@ -80,6 +87,7 @@ struct darshan_header
{
char
version_string
[
8
];
int64_t
magic_nr
;
enum
darshan_comp_type
comp_type
;
struct
darshan_log_map
rec_map
;
struct
darshan_log_map
mod_map
[
DARSHAN_MAX_MODS
];
};
...
...
darshan-runtime/lib/darshan-core.c
View file @
d8b6e0dc
...
...
@@ -534,6 +534,7 @@ void darshan_core_shutdown()
/* initialize the remaining header fields */
strcpy
(
final_core
->
log_header
.
version_string
,
DARSHAN_LOG_VERSION
);
final_core
->
log_header
.
magic_nr
=
DARSHAN_MAGIC_NR
;
final_core
->
log_header
.
comp_type
=
DARSHAN_ZLIB_COMP
;
all_ret
=
DARSHAN_MPI_CALL
(
PMPI_File_write_at
)(
log_fh
,
0
,
&
(
final_core
->
log_header
),
sizeof
(
struct
darshan_header
),
MPI_BYTE
,
&
status
);
...
...
@@ -559,7 +560,7 @@ void darshan_core_shutdown()
DARSHAN_MPI_CALL
(
PMPI_File_close
)(
&
log_fh
);
/* if we got this far, there are no errors, so rename from *.darshan_partial
* to *-<logwritetime>.darshan
.gz
, which indicates that this log file is
* to *-<logwritetime>.darshan, which indicates that this log file is
* complete and ready for analysis
*/
if
(
my_rank
==
0
)
...
...
@@ -585,7 +586,7 @@ void darshan_core_shutdown()
end_log_time
=
DARSHAN_MPI_CALL
(
PMPI_Wtime
)();
strcat
(
new_logfile_name
,
logfile_name
);
tmp_index
=
strstr
(
new_logfile_name
,
".darshan_partial"
);
sprintf
(
tmp_index
,
"_%d.darshan
.gz
"
,
(
int
)(
end_log_time
-
start_log_time
+
1
));
sprintf
(
tmp_index
,
"_%d.darshan"
,
(
int
)(
end_log_time
-
start_log_time
+
1
));
rename
(
logfile_name
,
new_logfile_name
);
/* set permissions on log file */
#ifdef __CP_GROUP_READABLE_LOGS
...
...
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