mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Update 1 for code after code review of PR 4889
This commit is contained in:
@@ -240,19 +240,25 @@ void Main::setupDamaris(const std::string& outputDir )
|
||||
ensureOutputDirExists(outputDir);
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> find_replace_map ;
|
||||
find_replace_map = Opm::DamarisOutput::DamarisKeywords<PreTypeTag>(EclGenericVanguard::comm(), outputDir);
|
||||
//const auto find_replace_map;
|
||||
//const auto find_replace_map = Opm::DamarisOutput::DamarisKeywords<PreTypeTag>(EclGenericVanguard::comm(), outputDir);
|
||||
std::map<std::string, std::string> find_replace_map;
|
||||
find_replace_map = Opm::DamarisOutput::getDamarisKeywords<PreTypeTag>(EclGenericVanguard::comm(), outputDir);
|
||||
|
||||
// By default EnableDamarisOutputCollective is true so all simulation results will
|
||||
// be written into one single file for each iteration using Parallel HDF5.
|
||||
// It set to false, FilePerCore mode is used in Damaris, then simulation results in each
|
||||
// If set to false, FilePerCore mode is used in Damaris, then simulation results in each
|
||||
// node are aggregated by dedicated Damaris cores and stored to separate files per Damaris core.
|
||||
// Irrespective of mode, output is written asynchronously at the end of each timestep.
|
||||
// Using the ModifyModel class to set the XML file for Damaris.
|
||||
DamarisOutput::initializeDamaris(EclGenericVanguard::comm(), EclGenericVanguard::comm().rank(), find_replace_map);
|
||||
DamarisOutput::initializeDamaris(EclGenericVanguard::comm(),
|
||||
EclGenericVanguard::comm().rank(),
|
||||
find_replace_map);
|
||||
int is_client;
|
||||
MPI_Comm new_comm;
|
||||
int err = damaris_start(&is_client);
|
||||
// damaris_start() is where the Damaris Server ranks will block, until damaris_stop()
|
||||
// is called from the client ranks
|
||||
int err = damaris_start(&is_client);
|
||||
isSimulationRank_ = (is_client > 0);
|
||||
if (isSimulationRank_ && err == DAMARIS_OK) {
|
||||
damaris_client_comm_get(&new_comm);
|
||||
|
@@ -344,7 +344,7 @@ private:
|
||||
}
|
||||
|
||||
if (enableDamarisOutput_) {
|
||||
this->setupDamaris(outputDir);
|
||||
this->setupDamaris(outputDir); // Damaris server ranks will block here until damaris_stop() is called by client ranks
|
||||
}
|
||||
#endif // HAVE_DAMARIS
|
||||
|
||||
|
Reference in New Issue
Block a user