Commit 47a6c64a authored by Shane Snyder's avatar Shane Snyder

bug fix in reduction of min nonzero counters

parent 0a6399f3
...@@ -428,10 +428,11 @@ static void hdf5_record_reduction_op(void* infile_v, void* inoutfile_v, ...@@ -428,10 +428,11 @@ static void hdf5_record_reduction_op(void* infile_v, void* inoutfile_v,
/* min non-zero (if available) value */ /* min non-zero (if available) value */
for(j=HDF5_F_OPEN_TIMESTAMP; j<=HDF5_F_OPEN_TIMESTAMP; j++) for(j=HDF5_F_OPEN_TIMESTAMP; j<=HDF5_F_OPEN_TIMESTAMP; j++)
{ {
if(infile->fcounters[j] > inoutfile->fcounters[j] && inoutfile->fcounters[j] > 0) if((infile->fcounters[j] < inoutfile->fcounters[j] &&
tmp_file.fcounters[j] = inoutfile->fcounters[j]; infile->fcounters[j] > 0) || inoutfile->fcounters[j] == 0)
else
tmp_file.fcounters[j] = infile->fcounters[j]; tmp_file.fcounters[j] = infile->fcounters[j];
else
tmp_file.fcounters[j] = inoutfile->fcounters[j];
} }
/* max */ /* max */
......
...@@ -1096,10 +1096,11 @@ static void mpiio_record_reduction_op( ...@@ -1096,10 +1096,11 @@ static void mpiio_record_reduction_op(
/* min non-zero (if available) value */ /* min non-zero (if available) value */
for(j=MPIIO_F_OPEN_TIMESTAMP; j<=MPIIO_F_WRITE_START_TIMESTAMP; j++) for(j=MPIIO_F_OPEN_TIMESTAMP; j<=MPIIO_F_WRITE_START_TIMESTAMP; j++)
{ {
if(infile->fcounters[j] > inoutfile->fcounters[j] && inoutfile->fcounters[j] > 0) if((infile->fcounters[j] < inoutfile->fcounters[j] &&
tmp_file.fcounters[j] = inoutfile->fcounters[j]; infile->fcounters[j] > 0) || inoutfile->fcounters[j] == 0)
else
tmp_file.fcounters[j] = infile->fcounters[j]; tmp_file.fcounters[j] = infile->fcounters[j];
else
tmp_file.fcounters[j] = inoutfile->fcounters[j];
} }
/* max */ /* max */
......
...@@ -440,10 +440,11 @@ static void pnetcdf_record_reduction_op(void* infile_v, void* inoutfile_v, ...@@ -440,10 +440,11 @@ static void pnetcdf_record_reduction_op(void* infile_v, void* inoutfile_v,
/* min non-zero (if available) value */ /* min non-zero (if available) value */
for(j=PNETCDF_F_OPEN_TIMESTAMP; j<=PNETCDF_F_OPEN_TIMESTAMP; j++) for(j=PNETCDF_F_OPEN_TIMESTAMP; j<=PNETCDF_F_OPEN_TIMESTAMP; j++)
{ {
if(infile->fcounters[j] > inoutfile->fcounters[j] && inoutfile->fcounters[j] > 0) if((infile->fcounters[j] < inoutfile->fcounters[j] &&
tmp_file.fcounters[j] = inoutfile->fcounters[j]; infile->fcounters[j] > 0) || inoutfile->fcounters[j] == 0)
else
tmp_file.fcounters[j] = infile->fcounters[j]; tmp_file.fcounters[j] = infile->fcounters[j];
else
tmp_file.fcounters[j] = inoutfile->fcounters[j];
} }
/* max */ /* max */
......
...@@ -1829,11 +1829,11 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v, ...@@ -1829,11 +1829,11 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
/* min non-zero (if available) value */ /* min non-zero (if available) value */
for(j=POSIX_F_OPEN_TIMESTAMP; j<=POSIX_F_WRITE_START_TIMESTAMP; j++) for(j=POSIX_F_OPEN_TIMESTAMP; j<=POSIX_F_WRITE_START_TIMESTAMP; j++)
{ {
if(infile->fcounters[j] > inoutfile->fcounters[j] && if((infile->fcounters[j] < inoutfile->fcounters[j] &&
inoutfile->fcounters[j] > 0) infile->fcounters[j] > 0) || inoutfile->fcounters[j] == 0)
tmp_file.fcounters[j] = inoutfile->fcounters[j];
else
tmp_file.fcounters[j] = infile->fcounters[j]; tmp_file.fcounters[j] = infile->fcounters[j];
else
tmp_file.fcounters[j] = inoutfile->fcounters[j];
} }
/* max */ /* max */
......
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