Commit bc716559 authored by Philip Carns's avatar Philip Carns

more warnings in place of assertions

parent f6576fd5
......@@ -271,14 +271,32 @@ static int darshan_psx_io_workload_load(const char *params, int app_id, int rank
dur_cur->mpiio_file_rec = *mpiio_file_rec;
break;
}
if((dur_cur->psx_file_rec.base_rec.id == mpiio_file_rec->base_rec.id)
&& (dur_cur->psx_file_rec.base_rec.rank == -1)
&& (mpiio_file_rec->base_rec.rank != -1))
{
fprintf(stderr, "WARNING: id %" PRIu64 " has non-shared MPI record and shared POSIX record. Skipping POSIX record which may have been generated by stat() calls.\n", mpiio_file_rec->base_rec.id);
dur_cur->psx_file_rec.counters[POSIX_OPENS] = 0;
}
}
/* if we exit loop with null dur_cur, that means that an mpiio record is present
/* if we fall through to here, that means that an mpiio record is present
* for which there is no exact match in the posix records. This
* could (for example) happen if mpiio was using deferred opens,
* producing a shared record in mpi and unique records in posix. Or
* if mpiio is using a non-posix back end
* if mpiio is using a non-posix back end. Or if we skip the posix
* records because the app issued a stat() on every rank but only
* did I/O on a subset.
*/
assert(dur_cur);
dur_new = calloc(1, sizeof(*dur_new));
assert(dur_new);
dur_new->mpiio_file_rec = *mpiio_file_rec;
dur_new->next = dur_head;
dur_head = dur_new;
}
/* file records have all been retrieved from darshan log. Now we loop
......@@ -744,7 +762,8 @@ static void generate_psx_file_events(
if(file->base_rec.rank == -1)
meta_op_time /= total_rank_cnt;
assert(meta_op_time >= 0);
if(meta_op_time < 0)
meta_op_time = DARSHAN_NEGLIGIBLE_DELAY;
/* set the create flag if the file was written to */
if (file->counters[POSIX_BYTES_WRITTEN])
......@@ -1259,6 +1278,15 @@ static void psx_calc_io_delays(
*inter_io_delay = 0;
return;
}
if(num_io_ops == 0)
{
*first_io_delay = 0;
*close_delay = 0;
*inter_io_delay = 0;
fprintf(stderr, "WARNING: id %" PRIu64 " has unaccounted total_delay, possibly stat() calls that are not supported by generator.\n", file->base_rec.id);
return;
}
/* determine the start time of the first io operation */
first_io_time = MIN(
......
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