added changes as discussed in PR 4827

This commit is contained in:
Josh Bowden 2023-09-01 18:28:03 +02:00
parent 84d3530fd9
commit 6e4f3bd37e

View File

@ -329,8 +329,8 @@ private:
// Reset to false as we cannot use Damaris if there is only one rank.
if ((enableDamarisOutput_ == true) && (EclGenericVanguard::comm().size() == 1)) {
std::string msg ;
msg = "\nUse of Damaris (command line argument --enable-damaris-output=true) has been dissabled for run with only one rank.\n" ;
OpmLog::info(msg);
msg = "\nUse of Damaris (command line argument --enable-damaris-output=true) has been disabled for run with only one rank.\n" ;
OpmLog::warning(msg);
enableDamarisOutput_ = false ;
}
@ -342,13 +342,16 @@ private:
// Guard for when the Damaris core(s) return from damaris_start()
// which happens when damaris_stop() is called in main simulation
if (isSimulationRank_) {
if (!isSimulationRank_) {
exitCode = EXIT_SUCCESS;
return true;
}
int mpiRank = EclGenericVanguard::comm().rank();
outputCout_ = false;
if (mpiRank == 0)
outputCout_ = EWOMS_GET_PARAM(PreTypeTag, bool, EnableTerminalOutput);
if (deckFilename.empty()) {
if (mpiRank == 0) {
std::cerr << "No input case given. Try '--help' for a usage description.\n";
@ -365,9 +368,9 @@ private:
if ( mpiRank == 0 ) {
std::cerr << "Exception received: " << e.what() << ". Try '--help' for a usage description.\n";
}
#if HAVE_MPI
#if HAVE_MPI
MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE);
#endif
#endif
exitCode = EXIT_FAILURE;
return false;
}
@ -403,13 +406,12 @@ private:
std::cerr << "Failed to create valid EclipseState object." << std::endl;
std::cerr << "Exception caught: " << e.what() << std::endl;
}
#if HAVE_MPI
#if HAVE_MPI
MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE);
#endif
#endif
exitCode = EXIT_FAILURE;
return false;
}
}
exitCode = EXIT_SUCCESS;
return true;