Example #1
0
//-----------------------------------------------------------------------------
// Function      : safeBarrier
// Purpose       : This barrier will exit cleanly in parallel if one PE exits
//                 with an error.  The region covered is that following a
//                 previous call to startSafeBarrier
// Special Notes :
// Scope         : Public
// Creator       : Dave Shirley, PSSi
// Creation Date : 07/18/05
//-----------------------------------------------------------------------------
void safeBarrier(Parallel::Machine comm)
{
  // Collect all pending message to the log file.
  pout(comm);

  unsigned count = get_message_count(MSG_FATAL) + get_message_count(MSG_ERROR);

  if (Parallel::is_parallel_run(comm))
    Parallel::AllReduce(comm, MPI_SUM, &count, 1);

  if (count > 0) {
    UserFatal0().die() << "Simulation aborted due to error";

    Xyce_exit(-1);
  }
}
Example #2
0
unsigned
get_warning_count()
{
    return get_message_count(MSG_WARNING);
}
Example #3
0
unsigned int
get_doomed_count()
{
  return get_message_count(MSG_DOOMED);
}