File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
libmpdata++/output/detail Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,9 @@ namespace libmpdataxx
5151 {
5252 for (const auto &v : outvars)
5353 intrp_vars[v.first ](this ->ijk ) = this ->mem ->advectee (v.first )(this ->ijk );
54+ this ->mem ->barrier ();
5455 }
5556
56- this ->mem ->barrier ();
57-
5857 if (this ->rank == 0 )
5958 {
6059 record_time = this ->time ;
@@ -81,6 +80,7 @@ namespace libmpdataxx
8180 int next_idx = std::floor (next_time / outfreq);
8281 int curr_idx = std::floor (this ->time / outfreq);
8382
83+ do_record = false ;
8484 if (next_idx > curr_idx)
8585 {
8686 do_record = true ;
@@ -105,6 +105,7 @@ namespace libmpdataxx
105105 intrp_vars[v.first ](this ->ijk ) += (record_time - prev_time) / (this ->time - prev_time) *
106106 this ->mem ->advectee (v.first )(this ->ijk );
107107 }
108+ this ->mem ->barrier ();
108109 }
109110
110111 if (this ->rank == 0 )
@@ -114,7 +115,6 @@ namespace libmpdataxx
114115 if (this ->var_dt && do_record)
115116 {
116117 record_all ();
117- do_record = false ;
118118 }
119119 else if (!this ->var_dt )
120120 {
You can’t perform that action at this time.
0 commit comments