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
Cristian Simarro
darshan
Commits
814b1266
Commit
814b1266
authored
Aug 20, 2015
by
Shane Snyder
Browse files
add macro to detect partial posix file recs
parent
e5bfa490
Changes
2
Hide whitespace changes
Inline
Side-by-side
darshan-posix-log-format.h
View file @
814b1266
...
...
@@ -176,4 +176,11 @@ struct darshan_posix_file
double
fcounters
[
POSIX_F_NUM_INDICES
];
};
/* This macro can be used to identify files that have been opened using
* pnetcdf, hdf5, or mpi-io, but were never opened at the posix level. As a
* result the record will not necessarily have all of the expected fields
* populated.
*/
#define POSIX_FILE_PARTIAL(__file)((((__file)->counters[POSIX_OPENS] || (__file)->counters[POSIX_FOPENS] || (__file)->counters[POSIX_STATS]) ? 0 : 1))
#endif
/* __DARSHAN_POSIX_LOG_FORMAT_H */
darshan-runtime/lib/darshan-posix.c
View file @
814b1266
...
...
@@ -1719,7 +1719,10 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
tmp_file
.
counters
[
j
]
=
infile
->
counters
[
j
]
+
inoutfile
->
counters
[
j
];
}
tmp_file
.
counters
[
POSIX_MODE
]
=
infile
->
counters
[
POSIX_MODE
];
if
(
POSIX_FILE_PARTIAL
(
infile
))
tmp_file
.
counters
[
POSIX_MODE
]
=
inoutfile
->
counters
[
POSIX_MODE
];
else
tmp_file
.
counters
[
POSIX_MODE
]
=
infile
->
counters
[
POSIX_MODE
];
/* sum */
for
(
j
=
POSIX_BYTES_READ
;
j
<=
POSIX_BYTES_WRITTEN
;
j
++
)
...
...
@@ -1742,8 +1745,10 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
tmp_file
.
counters
[
j
]
=
infile
->
counters
[
j
]
+
inoutfile
->
counters
[
j
];
}
tmp_file
.
counters
[
POSIX_MEM_ALIGNMENT
]
=
infile
->
counters
[
POSIX_MEM_ALIGNMENT
];
tmp_file
.
counters
[
POSIX_FILE_ALIGNMENT
]
=
infile
->
counters
[
POSIX_FILE_ALIGNMENT
];
if
(
POSIX_FILE_PARTIAL
(
infile
))
tmp_file
.
counters
[
POSIX_MEM_ALIGNMENT
]
=
inoutfile
->
counters
[
POSIX_MEM_ALIGNMENT
];
else
tmp_file
.
counters
[
POSIX_MEM_ALIGNMENT
]
=
infile
->
counters
[
POSIX_MEM_ALIGNMENT
];
/* sum */
for
(
j
=
POSIX_FILE_NOT_ALIGNED
;
j
<=
POSIX_FILE_NOT_ALIGNED
;
j
++
)
...
...
@@ -1751,6 +1756,11 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
tmp_file
.
counters
[
j
]
=
infile
->
counters
[
j
]
+
inoutfile
->
counters
[
j
];
}
if
(
POSIX_PARTIAL_FILE
(
infile
))
tmp_file
.
counters
[
POSIX_FILE_ALIGNMENT
]
=
inoutfile
->
counters
[
POSIX_FILE_ALIGNMENT
];
else
tmp_file
.
counters
[
POSIX_FILE_ALIGNMENT
]
=
infile
->
counters
[
POSIX_FILE_ALIGNMENT
];
/* skip POSIX_MAX_*_TIME_SIZE; handled in floating point section */
for
(
j
=
POSIX_SIZE_READ_0_100
;
j
<=
POSIX_SIZE_WRITE_1G_PLUS
;
j
++
)
...
...
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