Commit 81683bb5 authored by Shane Snyder's avatar Shane Snyder

don't sum invalid posix counters

parent 6639a912
......@@ -1435,6 +1435,8 @@ static void posix_record_reduction_op(void* infile_v, void* inoutfile_v,
for(j=POSIX_OPENS; j<=POSIX_FDSYNCS; j++)
{
tmp_file.counters[j] = infile->counters[j] + inoutfile->counters[j];
if(tmp_file.counters[j] < 0) /* make sure invalid counters are -1 exactly */
tmp_file.counters[j] = -1;
}
tmp_file.counters[POSIX_MODE] = infile->counters[POSIX_MODE];
......
......@@ -387,6 +387,8 @@ static void darshan_log_agg_posix_files(void *rec, void *agg_rec, int init_flag)
case POSIX_SIZE_WRITE_1G_PLUS:
/* sum */
agg_psx_rec->counters[i] += psx_rec->counters[i];
if(agg_psx_rec->counters[i] < 0) /* make sure invalid counters are -1 exactly */
agg_psx_rec->counters[i] = -1;
break;
case POSIX_MODE:
case POSIX_MEM_ALIGNMENT:
......
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