From c4de48b17e2b5c73bd1d51fe8afec4e4e1cf1f99 Mon Sep 17 00:00:00 2001 From: Max Luebke Date: Tue, 15 Aug 2023 17:33:10 +0200 Subject: [PATCH] fix: only write PHT dump file if advised to do so --- src/ChemistryModule/WorkerFunctions.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ChemistryModule/WorkerFunctions.cpp b/src/ChemistryModule/WorkerFunctions.cpp index a46030f79..e13641941 100644 --- a/src/ChemistryModule/WorkerFunctions.cpp +++ b/src/ChemistryModule/WorkerFunctions.cpp @@ -1,4 +1,4 @@ -// Time-stamp: "Last modified 2023-08-11 14:07:03 delucia" +// Time-stamp: "Last modified 2023-08-15 17:33:00 mluebke" #include "poet/ChemistryModule.hpp" #include "poet/DHT_Wrapper.hpp" @@ -232,18 +232,20 @@ void poet::ChemistryModule::WorkerPostIter(MPI_Status &prope_status, interp_calls.push_back(interp->getInterpolationCount()); interp->resetCounter(); interp->writePHTStats(); - out << this->dht_file_out_dir << "/iter_" << std::setfill('0') - << std::setw(this->file_pad) << iteration << ".pht"; - interp->dumpPHTState(out.str()); + if (this->dht_snaps_type == DHT_SNAPS_ITEREND) { + out << this->dht_file_out_dir << "/iter_" << std::setfill('0') + << std::setw(this->file_pad) << iteration << ".pht"; + interp->dumpPHTState(out.str()); + } } } void poet::ChemistryModule::WorkerPostSim(uint32_t iteration) { - if (this->dht_enabled && this->dht_snaps_type == DHT_SNAPS_SIMEND) { + if (this->dht_enabled && this->dht_snaps_type >= DHT_SNAPS_ITEREND) { WorkerWriteDHTDump(iteration); } - if (this->interp_enabled) { + if (this->interp_enabled && this->dht_snaps_type >= DHT_SNAPS_ITEREND) { std::stringstream out; out << this->dht_file_out_dir << "/iter_" << std::setfill('0') << std::setw(this->file_pad) << iteration << ".pht";