mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-10 02:35:34 -06:00
Also print information about parallel run to PRT file.
Up to now this information is only output to standard out. To help with debugging and replicating (e.g. in case of crashes) without saved standard putput, we now also print the imformation about MPI processes and OMP threads to the PRT file.
This commit is contained in:
parent
b9ecc2ac8f
commit
4f619f8f38
@ -50,7 +50,8 @@ unsigned long long getTotalSystemMemory()
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void printPRTHeader(const std::string& parameters,
|
||||
void printPRTHeader(const int nprocs, const int nthreads,
|
||||
const std::string& parameters,
|
||||
std::string_view moduleVersion,
|
||||
std::string_view compileTimestamp)
|
||||
{
|
||||
@ -85,7 +86,7 @@ void printPRTHeader(const std::string& parameters,
|
||||
ss << "User = " << user << std::endl;
|
||||
}
|
||||
ss << "Simulation started on " << tmstr << " hrs\n";
|
||||
|
||||
ss << "Using "<< nprocs << " MPI processes with "<< nthreads <<" OMP threads on each \n";
|
||||
ss << "Parameters used by Flow:\n" << parameters;
|
||||
|
||||
OpmLog::note(ss.str());
|
||||
|
@ -31,7 +31,8 @@ struct SimulatorReport;
|
||||
struct SimulatorReportSingle;
|
||||
|
||||
// Print an ASCII-art header to the PRT and DEBUG files.
|
||||
void printPRTHeader(const std::string& parameters,
|
||||
void printPRTHeader(const int nprocs, const int nthreads,
|
||||
const std::string& parameters,
|
||||
std::string_view moduleVersion,
|
||||
std::string_view compileTimestamp);
|
||||
|
||||
|
@ -182,6 +182,7 @@ void Main::readDeck(const std::string& deckFilename,
|
||||
const bool allRanksDbgPrtLog,
|
||||
const std::string& parsingStrictness,
|
||||
const int mpiRank,
|
||||
const std::size_t numThreads,
|
||||
const int output_param,
|
||||
const std::string& parameters,
|
||||
std::string_view moduleVersion,
|
||||
@ -194,7 +195,8 @@ void Main::readDeck(const std::string& deckFilename,
|
||||
outputCout_, "STDOUT_LOGGER", allRanksDbgPrtLog);
|
||||
|
||||
if (outputCout_) {
|
||||
printPRTHeader(parameters, moduleVersion, compileTimestamp);
|
||||
printPRTHeader(EclGenericVanguard::comm().size(), numThreads,
|
||||
parameters, moduleVersion, compileTimestamp);
|
||||
OpmLog::info("Reading deck file '" + deckFilename + "'");
|
||||
}
|
||||
|
||||
|
@ -394,6 +394,7 @@ private:
|
||||
EWOMS_GET_PARAM(PreTypeTag, bool, EnableLoggingFalloutWarning),
|
||||
EWOMS_GET_PARAM(PreTypeTag, std::string, ParsingStrictness),
|
||||
mpiRank,
|
||||
getNumThreads<PreTypeTag>(),
|
||||
EWOMS_GET_PARAM(PreTypeTag, int, EclOutputInterval),
|
||||
cmdline_params,
|
||||
Opm::moduleVersion(),
|
||||
@ -668,6 +669,7 @@ private:
|
||||
const bool allRanksDbgPrtLog,
|
||||
const std::string& parsingStrictness,
|
||||
const int mpiRank,
|
||||
const std::size_t numThreads,
|
||||
const int output_param,
|
||||
const std::string& parameters,
|
||||
std::string_view moduleVersion,
|
||||
|
Loading…
Reference in New Issue
Block a user