Skip to content

Commit

Permalink
Resolve "PCpp error handling silently suppress errors in PDI initiali…
Browse files Browse the repository at this point in the history
…zation"
  • Loading branch information
tpadioleau committed Nov 17, 2023
1 parent 3155588 commit c44d6c6
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<DFieldSpXVx> allfdistribu_device(meshSpXVx);
Expand Down
4 changes: 2 additions & 2 deletions simulations/geometryXVx/bump_on_tail/bumpontail_fft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<DFieldSpXVx> allfdistribu_device(meshSpXVx);
Expand Down
4 changes: 2 additions & 2 deletions simulations/geometryXVx/landau/landau_fem_uniform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<DFieldSpXVx> allfdistribu_device(meshSpXVx);
Expand Down
4 changes: 2 additions & 2 deletions simulations/geometryXVx/landau/landau_fft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<DFieldSpXVx> allfdistribu_device(meshSpXVx);
Expand Down
4 changes: 2 additions & 2 deletions simulations/geometryXVx/sheath/sheath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<DFieldSpXVx> allfdistribu_device(meshSpXVx);
Expand Down
6 changes: 2 additions & 4 deletions simulations/geometryXYVxVy/landau/landau4d_fft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ int main(int argc, char** argv)
cerr << "usage: " << argv[0] << " [--dump-config] <config_file.yml>" << 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
Expand Down Expand Up @@ -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<BSplinesX> bv_x_min(x_min);
ConstantExtrapolationBoundaryValue<BSplinesX> bv_x_max(x_max);
Expand Down

0 comments on commit c44d6c6

Please sign in to comment.