From c44d6c69f2b7d4665ec5e1917f1ba356c28e3bc7 Mon Sep 17 00:00:00 2001 From: Thomas Padioleau Date: Fri, 17 Nov 2023 13:59:56 +0000 Subject: [PATCH] Resolve "PCpp error handling silently suppress errors in PDI initialization" --- .../geometryXVx/bump_on_tail/bumpontail_fem_uniform.cpp | 4 ++-- simulations/geometryXVx/bump_on_tail/bumpontail_fft.cpp | 4 ++-- simulations/geometryXVx/landau/landau_fem_uniform.cpp | 4 ++-- simulations/geometryXVx/landau/landau_fft.cpp | 4 ++-- simulations/geometryXVx/sheath/sheath.cpp | 4 ++-- simulations/geometryXYVxVy/landau/landau4d_fft.cpp | 6 ++---- 6 files changed, 12 insertions(+), 14 deletions(-) diff --git a/simulations/geometryXVx/bump_on_tail/bumpontail_fem_uniform.cpp b/simulations/geometryXVx/bump_on_tail/bumpontail_fem_uniform.cpp index 5d7759e2c..0e019776d 100644 --- a/simulations/geometryXVx/bump_on_tail/bumpontail_fem_uniform.cpp +++ b/simulations/geometryXVx/bump_on_tail/bumpontail_fem_uniform.cpp @@ -76,7 +76,9 @@ int main(int argc, char** argv) << endl; return EXIT_FAILURE; } + PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); PC_errhandler(PC_NULL_HANDLER); + PDI_init(conf_pdi); // Reading config // --> Mesh info @@ -164,8 +166,6 @@ int main(int argc, char** argv) std::move(mean_velocity_bot)); init_fequilibrium(allfequilibrium_device); - PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); - PDI_init(conf_pdi); ddc::expose_to_pdi("iter_start", iter_start); device_t allfdistribu_device(meshSpXVx); diff --git a/simulations/geometryXVx/bump_on_tail/bumpontail_fft.cpp b/simulations/geometryXVx/bump_on_tail/bumpontail_fft.cpp index faa74de6d..f1eeee20d 100644 --- a/simulations/geometryXVx/bump_on_tail/bumpontail_fft.cpp +++ b/simulations/geometryXVx/bump_on_tail/bumpontail_fft.cpp @@ -72,7 +72,9 @@ int main(int argc, char** argv) << endl; return EXIT_FAILURE; } + PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); PC_errhandler(PC_NULL_HANDLER); + PDI_init(conf_pdi); // Reading config // --> Mesh info @@ -156,8 +158,6 @@ int main(int argc, char** argv) std::move(mean_velocity_bot)); init_fequilibrium(allfequilibrium_device); - PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); - PDI_init(conf_pdi); ddc::expose_to_pdi("iter_start", iter_start); device_t allfdistribu_device(meshSpXVx); diff --git a/simulations/geometryXVx/landau/landau_fem_uniform.cpp b/simulations/geometryXVx/landau/landau_fem_uniform.cpp index e2dff3232..5a4c1d536 100644 --- a/simulations/geometryXVx/landau/landau_fem_uniform.cpp +++ b/simulations/geometryXVx/landau/landau_fem_uniform.cpp @@ -75,7 +75,9 @@ int main(int argc, char** argv) << endl; return EXIT_FAILURE; } + PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); PC_errhandler(PC_NULL_HANDLER); + PDI_init(conf_pdi); // Reading config // --> Mesh info @@ -162,8 +164,6 @@ int main(int argc, char** argv) std::move(mean_velocity_eq)); init_fequilibrium(allfequilibrium_device); - PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); - PDI_init(conf_pdi); ddc::expose_to_pdi("iter_start", iter_start); device_t allfdistribu_device(meshSpXVx); diff --git a/simulations/geometryXVx/landau/landau_fft.cpp b/simulations/geometryXVx/landau/landau_fft.cpp index 0573df227..a837c6143 100644 --- a/simulations/geometryXVx/landau/landau_fft.cpp +++ b/simulations/geometryXVx/landau/landau_fft.cpp @@ -72,7 +72,9 @@ int main(int argc, char** argv) << endl; return EXIT_FAILURE; } + PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); PC_errhandler(PC_NULL_HANDLER); + PDI_init(conf_pdi); // Reading config // --> Mesh info @@ -159,8 +161,6 @@ int main(int argc, char** argv) std::move(mean_velocity_eq)); init_fequilibrium(allfequilibrium_device); - PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); - PDI_init(conf_pdi); ddc::expose_to_pdi("iter_start", iter_start); device_t allfdistribu_device(meshSpXVx); diff --git a/simulations/geometryXVx/sheath/sheath.cpp b/simulations/geometryXVx/sheath/sheath.cpp index 147b5b4a7..949f536c2 100644 --- a/simulations/geometryXVx/sheath/sheath.cpp +++ b/simulations/geometryXVx/sheath/sheath.cpp @@ -77,7 +77,9 @@ int main(int argc, char** argv) << endl; return EXIT_FAILURE; } + PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); PC_errhandler(PC_NULL_HANDLER); + PDI_init(conf_pdi); // Reading config // --> Mesh info @@ -164,8 +166,6 @@ int main(int argc, char** argv) std::move(mean_velocity_eq)); init_fequilibrium(allfequilibrium_device); - PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); - PDI_init(conf_pdi); ddc::expose_to_pdi("iter_start", iter_start); device_t allfdistribu_device(meshSpXVx); diff --git a/simulations/geometryXYVxVy/landau/landau4d_fft.cpp b/simulations/geometryXYVxVy/landau/landau4d_fft.cpp index ac354fbd4..9289769b2 100644 --- a/simulations/geometryXYVxVy/landau/landau4d_fft.cpp +++ b/simulations/geometryXYVxVy/landau/landau4d_fft.cpp @@ -72,7 +72,9 @@ int main(int argc, char** argv) cerr << "usage: " << argv[0] << " [--dump-config] " << endl; return EXIT_FAILURE; } + PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); PC_errhandler(PC_NULL_HANDLER); + PDI_init(conf_pdi); // Reading config // --> Mesh info @@ -203,10 +205,6 @@ int main(int argc, char** argv) double const time_diag = PCpp_double(conf_voicexx, ".Output.time_diag"); int const nbstep_diag = int(time_diag / deltat); - PC_tree_t conf_pdi = PC_parse_string(PDI_CFG); - - PDI_init(conf_pdi); - // Create spline evaluator ConstantExtrapolationBoundaryValue bv_x_min(x_min); ConstantExtrapolationBoundaryValue bv_x_max(x_max);