File tree Expand file tree Collapse file tree 4 files changed +13
-9
lines changed
Expand file tree Collapse file tree 4 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 2222#include < udf_handle.hpp>
2323#include < utility>
2424#include < vector>
25-
25+ #ifndef NO_MPI
26+ # include < mpi_w/wrap_mpi.hpp>
27+ #endif
2628constexpr int ID_VERIF = 2025 ;
2729
2830#define CHECK_OR_RETURN (cond, msg ) \
@@ -66,7 +68,12 @@ namespace Api
6668 void
6769 finalise ()
6870 {
69-
71+ if constexpr (AutoGenerated::FlagCompileTime::use_mpi)
72+ {
73+ #ifndef NO_MPI
74+ WrapMPI::finalize ();
75+ #endif
76+ }
7077 if (!Kokkos::is_finalized () && Kokkos::is_initialized ())
7178 {
7279 Kokkos::finalize ();
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ delete_handle(Handle* handle)
115115{
116116 if (handle != nullptr )
117117 {
118+
118119 delete *handle; // NOLINT
119120 *handle = nullptr ;
120121 }
Original file line number Diff line number Diff line change @@ -178,13 +178,6 @@ namespace Core
178178 }
179179 }
180180
181- if constexpr (AutoGenerated::FlagCompileTime::use_mpi)
182- {
183- #ifndef NO_MPI
184- std::atexit (WrapMPI::finalize);
185- #endif
186- }
187-
188181 info.current_rank = static_cast <size_t >(rank);
189182 info.n_rank = static_cast <size_t >(size);
190183
Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ ExportHandler::pre_post_export(
5353 event_span = simulation.mc_unit ->events .get_span ();
5454 }
5555
56+ // TODO: Multi rank context : tally are not merged before exporting then
57+ // events tally only correspond to rank 0
58+
5659 // Update the main exporter with the current simulation data
5760 main_exporter->update_fields (current_time,
5861 simulation.getCliqData (),
You can’t perform that action at this time.
0 commit comments