Commit c53dd65a authored by Shane Snyder's avatar Shane Snyder
Browse files

add reduction to check for partial flag

parent ac48a609
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -63,6 +63,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
......
......@@ -261,6 +261,7 @@ void darshan_core_shutdown()
double header1, header2;
double tm_end;
uint64_t gz_fp = 0;
unsigned char tmp_partial_flag;
MPI_File log_fh;
MPI_Status status;
......@@ -549,6 +550,13 @@ void darshan_core_shutdown()
mod2[i] = DARSHAN_MPI_CALL(PMPI_Wtime)();
}
/* run a reduction to determine if any application processes had to set the
* partial flag. this happens when a process has tracked too many records
* at once and cannot track new records
*/
DARSHAN_MPI_CALL(PMPI_Reduce)(&(final_core->log_header.partial_flag),
&tmp_partial_flag, 1, MPI_UNSIGNED_CHAR, MPI_MAX, 0, MPI_COMM_WORLD);
if(internal_timing_flag)
header1 = DARSHAN_MPI_CALL(PMPI_Wtime)();
/* rank 0 is responsible for writing the log header */
......@@ -558,6 +566,7 @@ void darshan_core_shutdown()
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;
final_core->log_header.partial_flag = tmp_partial_flag;
all_ret = DARSHAN_MPI_CALL(PMPI_File_write_at)(log_fh, 0, &(final_core->log_header),
sizeof(struct darshan_header), MPI_BYTE, &status);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment