File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed
libmpdata++/solvers/detail Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,10 @@ namespace libmpdataxx
7171
7272 virtual void avg_edge_sclr (typename parent_t ::arr_t &arr) final
7373 {
74+ this ->mem ->barrier ();
7475 for (auto &bc : this ->bcs [0 ]) bc->copy_edge_sclr_to_halo1_cyclic (arr);
7576 for (auto &bc : this ->bcs [0 ]) bc->avg_edge_and_halo1_sclr_cyclic (arr);
77+ this ->mem ->barrier ();
7678 }
7779
7880 real_t courant_number (const arrvec_t <typename parent_t ::arr_t > &arrvec) final
Original file line number Diff line number Diff line change @@ -189,12 +189,12 @@ namespace libmpdataxx
189189 const idx_t <2 > &range_ijk
190190 ) final
191191 {
192+ this ->mem ->barrier ();
192193 for (auto &bc : this ->bcs [0 ]) bc->copy_edge_sclr_to_halo1_cyclic (arr, range_ijk[1 ]);
193194 for (auto &bc : this ->bcs [0 ]) bc->avg_edge_and_halo1_sclr_cyclic (arr, range_ijk[1 ]);
194195
195196 for (auto &bc : this ->bcs [1 ]) bc->copy_edge_sclr_to_halo1_cyclic (arr, range_ijk[0 ]);
196197 for (auto &bc : this ->bcs [1 ]) bc->avg_edge_and_halo1_sclr_cyclic (arr, range_ijk[0 ]);
197-
198198 this ->mem ->barrier ();
199199 }
200200
Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ namespace libmpdataxx
232232 const idx_t <3 > &range_ijk
233233 ) final
234234 {
235+ this ->mem ->barrier ();
235236 for (auto &bc : this ->bcs [0 ]) bc->copy_edge_sclr_to_halo1_cyclic (arr, range_ijk[1 ], range_ijk[2 ]);
236237 for (auto &bc : this ->bcs [0 ]) bc->avg_edge_and_halo1_sclr_cyclic (arr, range_ijk[1 ], range_ijk[2 ]);
237238
@@ -240,6 +241,7 @@ namespace libmpdataxx
240241
241242 for (auto &bc : this ->bcs [2 ]) bc->copy_edge_sclr_to_halo1_cyclic (arr, range_ijk[0 ], range_ijk[1 ]);
242243 for (auto &bc : this ->bcs [2 ]) bc->avg_edge_and_halo1_sclr_cyclic (arr, range_ijk[0 ], range_ijk[1 ]);
244+ this ->mem ->barrier ();
243245 }
244246
245247 void hook_ante_loop (const typename parent_t ::advance_arg_t nt) // TODO: this nt conflicts in fact with multiple-advance()-call logic!
You can’t perform that action at this time.
0 commit comments