mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
ebos: abort the program correctly in the parallel case
all processes must be aborted, whilst the error message should only be printed once. Also, calling std::exit(1) results in "nicer" output (at least on openMPI) because mpirun does not try to print a stack trace for every process.
This commit is contained in:
@@ -130,12 +130,13 @@ public:
|
||||
int mpiSize = 1;
|
||||
MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank);
|
||||
MPI_Comm_size(MPI_COMM_WORLD, &mpiSize);
|
||||
if (mpiRank == 0 && mpiSize > 1) {
|
||||
// TODO: remove the two statements below as soon as Dune::CpGrid works
|
||||
// correctly for the Norne deck!
|
||||
std::cerr << "Since Dune::CpGrid is buggy when load balancing, "
|
||||
<< "ebos currently disables parallelism when using Dune::CpGrid.\n";
|
||||
std::abort();
|
||||
if (mpiSize > 1) {
|
||||
// TODO: always load balance as soon as Dune::CpGrid works correctly for the
|
||||
// Norne deck!
|
||||
if (mpiRank == 0)
|
||||
std::cerr << "Since Dune::CpGrid is buggy when load balancing, "
|
||||
<< "ebos currently disables parallelism when using Dune::CpGrid.\n";
|
||||
std::exit(1);
|
||||
|
||||
// distribute the grid and switch to the distributed view.
|
||||
grid_->loadBalance();
|
||||
|
||||
Reference in New Issue
Block a user