Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
darshan
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
57
Issues
57
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
darshan
darshan
Commits
500db6a0
Commit
500db6a0
authored
Nov 29, 2018
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert all darshan fprintf calls to internal call
parent
67efd831
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
26 deletions
+25
-26
darshan-core.c
darshan-runtime/lib/darshan-core.c
+22
-22
darshan-hdf5.c
darshan-runtime/lib/darshan-hdf5.c
+2
-2
darshan-lustre.c
darshan-runtime/lib/darshan-lustre.c
+1
-1
darshan-stdio.c
darshan-runtime/lib/darshan-stdio.c
+0
-1
No files found.
darshan-runtime/lib/darshan-core.c
View file @
500db6a0
...
...
@@ -330,8 +330,8 @@ void darshan_core_initialize(int argc, char **argv)
MPI_DOUBLE
,
MPI_MAX
,
0
,
MPI_COMM_WORLD
);
if
(
my_rank
==
0
)
{
fprintf
(
stderr
,
"#darshan:<op>
\t
<nprocs>
\t
<time>
\n
"
);
fprintf
(
stderr
,
"darshan:init
\t
%d
\t
%f
\n
"
,
nprocs
,
init_max
);
darshan_core_
fprintf
(
stderr
,
"#darshan:<op>
\t
<nprocs>
\t
<time>
\n
"
);
darshan_core_
fprintf
(
stderr
,
"darshan:init
\t
%d
\t
%f
\n
"
,
nprocs
,
init_max
);
}
}
...
...
@@ -439,7 +439,7 @@ void darshan_core_shutdown()
if
(
strlen
(
logfile_name
)
==
0
)
{
/* failed to generate log file name */
fprintf
(
stderr
,
"darshan library warning: unable to determine log file path
\n
"
);
darshan_core_
fprintf
(
stderr
,
"darshan library warning: unable to determine log file path
\n
"
);
free
(
logfile_name
);
darshan_core_cleanup
(
final_core
);
return
;
...
...
@@ -476,7 +476,7 @@ void darshan_core_shutdown()
{
if
(
my_rank
==
0
)
{
fprintf
(
stderr
,
"darshan library warning: unable to create log file %s
\n
"
,
darshan_core_
fprintf
(
stderr
,
"darshan library warning: unable to create log file %s
\n
"
,
logfile_name
);
}
free
(
logfile_name
);
...
...
@@ -498,7 +498,7 @@ void darshan_core_shutdown()
final_core
->
comp_buf
,
&
comp_buf_sz
);
if
(
all_ret
)
{
fprintf
(
stderr
,
"darshan library warning: unable to compress job data
\n
"
);
darshan_core_
fprintf
(
stderr
,
"darshan library warning: unable to compress job data
\n
"
);
unlink
(
logfile_name
);
}
else
...
...
@@ -509,7 +509,7 @@ void darshan_core_shutdown()
final_core
->
comp_buf
,
comp_buf_sz
,
MPI_BYTE
,
&
status
);
if
(
all_ret
!=
MPI_SUCCESS
)
{
fprintf
(
stderr
,
darshan_core_
fprintf
(
stderr
,
"darshan library warning: unable to write job data to log file %s
\n
"
,
logfile_name
);
unlink
(
logfile_name
);
...
...
@@ -544,7 +544,7 @@ void darshan_core_shutdown()
{
if
(
my_rank
==
0
)
{
fprintf
(
stderr
,
darshan_core_
fprintf
(
stderr
,
"darshan library warning: unable to write record hash to log file %s
\n
"
,
logfile_name
);
unlink
(
logfile_name
);
...
...
@@ -632,7 +632,7 @@ void darshan_core_shutdown()
{
if
(
my_rank
==
0
)
{
fprintf
(
stderr
,
darshan_core_
fprintf
(
stderr
,
"darshan library warning: unable to write %s module data to log file %s
\n
"
,
darshan_module_names
[
i
],
logfile_name
);
unlink
(
logfile_name
);
...
...
@@ -670,7 +670,7 @@ void darshan_core_shutdown()
sizeof
(
struct
darshan_header
),
MPI_BYTE
,
&
status
);
if
(
all_ret
!=
MPI_SUCCESS
)
{
fprintf
(
stderr
,
"darshan library warning: unable to write header to log file %s
\n
"
,
darshan_core_
fprintf
(
stderr
,
"darshan library warning: unable to write header to log file %s
\n
"
,
logfile_name
);
unlink
(
logfile_name
);
}
...
...
@@ -776,18 +776,18 @@ void darshan_core_shutdown()
if
(
my_rank
==
0
)
{
fprintf
(
stderr
,
"#darshan:<op>
\t
<nprocs>
\t
<time>
\n
"
);
fprintf
(
stderr
,
"darshan:log_open
\t
%d
\t
%f
\n
"
,
nprocs
,
open_slowest
);
fprintf
(
stderr
,
"darshan:job_write
\t
%d
\t
%f
\n
"
,
nprocs
,
job_slowest
);
fprintf
(
stderr
,
"darshan:hash_write
\t
%d
\t
%f
\n
"
,
nprocs
,
rec_slowest
);
fprintf
(
stderr
,
"darshan:header_write
\t
%d
\t
%f
\n
"
,
nprocs
,
header_slowest
);
darshan_core_
fprintf
(
stderr
,
"#darshan:<op>
\t
<nprocs>
\t
<time>
\n
"
);
darshan_core_
fprintf
(
stderr
,
"darshan:log_open
\t
%d
\t
%f
\n
"
,
nprocs
,
open_slowest
);
darshan_core_
fprintf
(
stderr
,
"darshan:job_write
\t
%d
\t
%f
\n
"
,
nprocs
,
job_slowest
);
darshan_core_
fprintf
(
stderr
,
"darshan:hash_write
\t
%d
\t
%f
\n
"
,
nprocs
,
rec_slowest
);
darshan_core_
fprintf
(
stderr
,
"darshan:header_write
\t
%d
\t
%f
\n
"
,
nprocs
,
header_slowest
);
for
(
i
=
0
;
i
<
DARSHAN_MAX_MODS
;
i
++
)
{
if
(
global_mod_use_count
[
i
])
fprintf
(
stderr
,
"darshan:%s_shutdown
\t
%d
\t
%f
\n
"
,
darshan_module_names
[
i
],
darshan_core_
fprintf
(
stderr
,
"darshan:%s_shutdown
\t
%d
\t
%f
\n
"
,
darshan_module_names
[
i
],
nprocs
,
mod_slowest
[
i
]);
}
fprintf
(
stderr
,
"darshan:core_shutdown
\t
%d
\t
%f
\n
"
,
nprocs
,
all_slowest
);
darshan_core_
fprintf
(
stderr
,
"darshan:core_shutdown
\t
%d
\t
%f
\n
"
,
nprocs
,
all_slowest
);
}
}
...
...
@@ -851,7 +851,7 @@ static void *darshan_init_mmap_log(struct darshan_core_runtime* core, int jobid)
mmap_fd
=
open
(
core
->
mmap_log_name
,
O_CREAT
|
O_RDWR
|
O_EXCL
,
0644
);
if
(
mmap_fd
<
0
)
{
fprintf
(
stderr
,
"darshan library warning: "
darshan_core_
fprintf
(
stderr
,
"darshan library warning: "
"unable to create darshan log file %s
\n
"
,
core
->
mmap_log_name
);
return
(
NULL
);
}
...
...
@@ -861,7 +861,7 @@ static void *darshan_init_mmap_log(struct darshan_core_runtime* core, int jobid)
ret
=
ftruncate
(
mmap_fd
,
mmap_size
);
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"darshan library warning: "
darshan_core_
fprintf
(
stderr
,
"darshan library warning: "
"unable to allocate darshan log file %s
\n
"
,
core
->
mmap_log_name
);
close
(
mmap_fd
);
unlink
(
core
->
mmap_log_name
);
...
...
@@ -874,7 +874,7 @@ static void *darshan_init_mmap_log(struct darshan_core_runtime* core, int jobid)
mmap_p
=
mmap
(
NULL
,
mmap_size
,
PROT_WRITE
,
MAP_SHARED
,
mmap_fd
,
0
);
if
(
mmap_p
==
MAP_FAILED
)
{
fprintf
(
stderr
,
"darshan library warning: "
darshan_core_
fprintf
(
stderr
,
"darshan library warning: "
"unable to mmap darshan log file %s
\n
"
,
core
->
mmap_log_name
);
close
(
mmap_fd
);
unlink
(
core
->
mmap_log_name
);
...
...
@@ -1078,13 +1078,13 @@ static void darshan_get_exe_and_mounts(struct darshan_core_runtime *core,
if
(
strncmp
(
env_exclusions
,
"none"
,
strlen
(
env_exclusions
))
>=
0
)
{
if
(
my_rank
==
0
)
fprintf
(
stderr
,
"Darshan info: no system dirs will be excluded
\n
"
);
darshan_core_
fprintf
(
stderr
,
"Darshan info: no system dirs will be excluded
\n
"
);
darshan_path_exclusions
[
0
]
=
NULL
;
}
else
{
if
(
my_rank
==
0
)
fprintf
(
stderr
,
"Darshan info: the following system dirs will be excluded: %s
\n
"
,
darshan_core_
fprintf
(
stderr
,
"Darshan info: the following system dirs will be excluded: %s
\n
"
,
env_exclusions
);
string
=
strdup
(
env_exclusions
);
i
=
0
;
...
...
@@ -1329,7 +1329,7 @@ static void darshan_get_logfile_name(char* logfile_name, int jobid, struct tm* s
{
if
(
strlen
(
user_logfile_name
)
>=
(
PATH_MAX
-
1
))
{
fprintf
(
stderr
,
"darshan library warning: user log file name too long.
\n
"
);
darshan_core_
fprintf
(
stderr
,
"darshan library warning: user log file name too long.
\n
"
);
logfile_name
[
0
]
=
'\0'
;
}
else
...
...
darshan-runtime/lib/darshan-hdf5.c
View file @
500db6a0
...
...
@@ -137,7 +137,7 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
my_rank
);
if
(
my_rank
==
0
)
{
fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version does not match Darshan module.
\n
"
);
darshan_core_
fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version does not match Darshan module.
\n
"
);
}
return
(
-
1
);
}
...
...
@@ -185,7 +185,7 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
my_rank
);
if
(
my_rank
==
0
)
{
fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version does not match Darshan module.
\n
"
);
darshan_core_
fprintf
(
stderr
,
"Darshan HDF5 module error: runtime library version does not match Darshan module.
\n
"
);
}
return
(
-
1
);
}
...
...
darshan-runtime/lib/darshan-lustre.c
View file @
500db6a0
...
...
@@ -251,7 +251,7 @@ static void lustre_shutdown(
if
(
rec_ref
)
rec_ref
->
record
->
base_rec
.
rank
=
-
1
;
else
fprintf
(
stderr
,
"WARNING: unexpected condition in Darshan, possibly triggered by memory corruption. Darshan log may be incorrect.
\n
"
);
darshan_core_
fprintf
(
stderr
,
"WARNING: unexpected condition in Darshan, possibly triggered by memory corruption. Darshan log may be incorrect.
\n
"
);
}
/* sort the array of files descending by rank so that we get all of the
...
...
darshan-runtime/lib/darshan-stdio.c
View file @
500db6a0
...
...
@@ -530,7 +530,6 @@ int DARSHAN_DECL(printf)(const char *format, ...)
return
(
ret
);
}
int
DARSHAN_DECL
(
fprintf
)(
FILE
*
stream
,
const
char
*
format
,
...)
{
int
ret
;
...
...
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