Let only master process print information about exception.

Previously, each process did this in a parallel run which
clutters the terminal output quite a bit in a parallel run.
This commit is contained in:
Markus Blatt 2019-05-15 11:14:06 +02:00
parent 4a5dcdca75
commit b885c1a013

View File

@ -162,7 +162,11 @@ int main(int argc, char** argv)
deckFilename = PreVanguard::canonicalDeckPath(deckFilename).string();
}
catch (const std::exception& e) {
std::cerr << "Exception received: " << e.what() << ". Try '--help' for a usage description.\n";
if ( mpiRank == 0 )
std::cerr << "Exception received: " << e.what() << ". Try '--help' for a usage description.\n";
#if HAVE_MPI
MPI_Finalize();
#endif
return 1;
}