Merge pull request #5031 from blattms/print-parallel-info-to-prt

Also print information about parallel run to PRT file.
This commit is contained in:
Bård Skaflestad 2023-12-13 18:16:50 +01:00 committed by GitHub
commit b42b920b7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 4 deletions

View File

@ -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());

View File

@ -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);

View File

@ -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 + "'");
}

View File

@ -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,