From 69828116f3e07315efef1c04fe926dd1d966b86b Mon Sep 17 00:00:00 2001 From: rastogi Date: Wed, 10 Dec 2025 09:03:11 +0100 Subject: [PATCH] Sned control flgas after control iteration and enable Cl threshold --- bin/run_poet.sh | 8 ++++---- src/Chemistry/WorkerFunctions.cpp | 2 -- src/Control/ControlModule.cpp | 16 ++++++++++++++-- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/bin/run_poet.sh b/bin/run_poet.sh index 8e107a069..b0263e054 100644 --- a/bin/run_poet.sh +++ b/bin/run_poet.sh @@ -1,7 +1,7 @@ #!/bin/bash -#SBATCH --job-name=p1_eps0035_200 -#SBATCH --output=p1_eps0035_200_%j.out -#SBATCH --error=p1_eps0035_200_%j.err +#SBATCH --job-name=p1_eps0035_cl_200_r2 +#SBATCH --output=p1_eps0035_cl_200_r2_%j.out +#SBATCH --error=p1_eps0035_cl_200_r2_%j.err #SBATCH --partition=long #SBATCH --nodes=6 #SBATCH --ntasks-per-node=24 @@ -15,5 +15,5 @@ module purge module load cmake gcc openmpi #mpirun -n 144 ./poet dolo_fgcs_3.R dolo_fgcs_3.qs2 dolo_only_pqc -mpirun -n 144 ./poet --interp dolo_fgcs_3_rt.R dolo_fgcs_3.qs2 p1_eps0035_200 +mpirun -n 144 ./poet --interp dolo_fgcs_3_rt.R dolo_fgcs_3.qs2 p1_eps0035_cl_200_r2 #mpirun -n 144 ./poet --interp barite_fgcs_4_new/barite_fgcs_4_new_rt.R barite_fgcs_4_new/barite_fgcs_4_new.qs2 barite \ No newline at end of file diff --git a/src/Chemistry/WorkerFunctions.cpp b/src/Chemistry/WorkerFunctions.cpp index 73a8e3ae1..b16083c6f 100644 --- a/src/Chemistry/WorkerFunctions.cpp +++ b/src/Chemistry/WorkerFunctions.cpp @@ -217,14 +217,12 @@ void poet::ChemistryModule::WorkerDoWork(MPI_Status &probe_status, int double_co } /* skip simulation of cells cells where Cl concentration is below threshold */ - /* for (std::size_t wp_i = 0; wp_i < s_curr_wp.size; wp_i++) { if (s_curr_wp.input[wp_i][CL_INDEX] < CL_THRESHOLD) { s_curr_wp.mapping[wp_i] = CHEM_SKIP; s_curr_wp.output[wp_i] = s_curr_wp.input[wp_i]; } } - */ // std::cout << this->comm_rank << ":" << counter++ << std::endl; if (dht_enabled || interp_enabled || stab_enabled) { diff --git a/src/Control/ControlModule.cpp b/src/Control/ControlModule.cpp index eb2dac888..63cfdaec4 100644 --- a/src/Control/ControlModule.cpp +++ b/src/Control/ControlModule.cpp @@ -98,9 +98,12 @@ void poet::ControlModule::readCheckpoint(uint32_t ¤t_iter, uint32_t rollba void poet::ControlModule::writeMetrics(const std::string &out_dir, const std::vector &species) { - if (rb_count > config.rb_limit) { + + /* + if (rb_count > config.rb_limit) { return; } + */ double stats_a, stats_b; stats_a = MPI_Wtime(); @@ -235,7 +238,16 @@ void poet::ControlModule::processCheckpoint(uint32_t ¤t_iter, } bool poet::ControlModule::needsFlagBcast() const { - return (config.rb_limit > 0) && !rbLimitReached(); + // return (config.rb_limit > 0) && !rbLimitReached(); + /* + if (rb_count > config.rb_limit) { + return false; + } + */ + if (global_iter == 1 || global_iter % config.ctrl_interval == 1) { + return true; + } + return false; } inline bool poet::ControlModule::rbLimitReached() const {