diff --git a/bin/dolo_fgcs_3_rt.R b/bin/dolo_fgcs_3_rt.R index 874eb8327..b189aecd9 100644 --- a/bin/dolo_fgcs_3_rt.R +++ b/bin/dolo_fgcs_3_rt.R @@ -2,14 +2,14 @@ iterations <- 10000 dt <- 200 chkpt_interval <- 100 stab_interval <- 100 -mape_threshold <- rep(0.0035, 13) +mape_threshold <- rep(0.01, 13) mape_threshold[5] <- 1 #Charge zero_abs <- 1e-13 rb_limit <- 3 -rb_interval_limit <- 100 +rb_interval_limit <- 300 ctrl_cell_ids <- seq(0, (400*400)/2 - 1, by = 401) -#out_save <- seq(500, iterations, by = 500) -out_save = c(seq(1, 10), seq(10, 100, by= 10), seq(200, iterations, by=100)) +out_save <- seq(500, iterations, by = 500) +#out_save = c(seq(1, 10), seq(10, 100, by= 10), seq(200, iterations, by=100)) list( diff --git a/bin/run_poet.sh b/bin/run_poet.sh index a5fec3cf6..c8fc5d49b 100644 --- a/bin/run_poet.sh +++ b/bin/run_poet.sh @@ -1,7 +1,7 @@ #!/bin/bash -#SBATCH --job-name=p2_eps0035_v3 -#SBATCH --output=p2_eps0035_v3_%j.out -#SBATCH --error=p2_eps0035_v3_%j.err +#SBATCH --job-name=p2_eps01_300 +#SBATCH --output=p2_eps01_300_%j.out +#SBATCH --error=p2_eps01_300_%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 --rds dolo_fgcs_3_rt.R dolo_fgcs_3.qs2 p2_eps0035_v3 +mpirun -n 144 ./poet --interp dolo_fgcs_3_rt.R dolo_fgcs_3.qs2 p2_eps01_300 #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/share/poet/barite/barite_het.qs2 b/share/poet/barite/barite_het.qs2 index cebfb1897..0b4be7be6 100644 Binary files a/share/poet/barite/barite_het.qs2 and b/share/poet/barite/barite_het.qs2 differ diff --git a/share/poet/surfex/PoetEGU_surfex_500.qs2 b/share/poet/surfex/PoetEGU_surfex_500.qs2 index fc7e85bb4..6324f91cd 100644 Binary files a/share/poet/surfex/PoetEGU_surfex_500.qs2 and b/share/poet/surfex/PoetEGU_surfex_500.qs2 differ diff --git a/src/Chemistry/MasterFunctions.cpp b/src/Chemistry/MasterFunctions.cpp index 46ceb45bc..cc959581d 100644 --- a/src/Chemistry/MasterFunctions.cpp +++ b/src/Chemistry/MasterFunctions.cpp @@ -457,13 +457,13 @@ void poet::ChemistryModule::MasterRunParallel(double dt) { ChemBCast(&this->ai_surrogate_validity_vector.front(), this->n_cells, MPI_INT); } - if (control->needsFlagBcast()) { + //if (control->needsFlagBcast()) { ftype = CHEM_CTRL_FLAGS; PropagateFunctionType(ftype); uint32_t ctrl_flags = buildCtrlFlags(this->dht_enabled, this->interp_enabled, this->stab_enabled); ChemBCast(&ctrl_flags, 1, MPI_UINT32_T); - } + //} this->ctrl_batch.clear(); ftype = CHEM_WORK_LOOP; diff --git a/src/Control/ControlModule.cpp b/src/Control/ControlModule.cpp index 562e733aa..0fcbc4ac1 100644 --- a/src/Control/ControlModule.cpp +++ b/src/Control/ControlModule.cpp @@ -49,6 +49,8 @@ void poet::ControlModule::updateSurrState(bool dht_enabled, bool interp_enabled) if (surr_active > config.rb_interval_limit) { surr_active = 0; rb_count -= 1; + std::cout << "Surr active counter: " << surr_active + << ", rb interval limit: " << config.rb_interval_limit << std::endl; std::cout << "Rollback count reset to: " << rb_count << "." << std::endl; } } @@ -103,6 +105,10 @@ uint32_t poet::ControlModule::calcRbIter() { std::optional poet::ControlModule::findRbTarget(const std::vector &species) { + if (rbLimitReached()) { + return std::nullopt; + } + /* Skip threshold checking if already in stabilization phase*/ if (s_history.empty() || rb_enabled) { return std::nullopt; @@ -270,6 +276,8 @@ void poet::ControlModule::processCheckpoint(uint32_t ¤t_iter, } bool poet::ControlModule::needsFlagBcast() const { + // Keep broadcasting flags so all ranks disable interpolation even after rb_limit is + // reached return (config.rb_limit > 0) && !rbLimitReached(); }