Skip to content

Commit 0bd88d9

Browse files
committed
Explicitly gather as Array for bcast in visu
1 parent 7a78c2a commit 0bd88d9

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

scripts/stokes_3D/Stokes3D_ve_multixpu.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ end
264264
if (me==0) @printf("Total iters = %d (%d steps), time = %1.3e sec (@ T_eff = %1.2f GB/s) \n", ittot, nt, wtime, round(T_eff, sigdigits=2)) end
265265
# Visualisation
266266
if do_viz || do_save_viz
267-
Pt_inn .= inn(Pt); gather!(Pt_inn, Pt_v)
268-
Vz_inn .= av_zi(Vz); gather!(Vz_inn, Vz_v)
269-
Rz_inn .= av_za(Rz); gather!(Rz_inn, Rz_v)
270-
Mus_inn.= inn(Mus); gather!(Mus_inn, Mus_v)
271-
τxz_inn.= av_xza(τxz); gather!(τxz_inn, τxz_v)
267+
Pt_inn .= Array(inn(Pt)); gather!(Pt_inn, Pt_v)
268+
Vz_inn .= Array(av_zi(Vz)); gather!(Vz_inn, Vz_v)
269+
Rz_inn .= Array(av_za(Rz)); gather!(Rz_inn, Rz_v)
270+
Mus_inn.= Array(inn(Mus)); gather!(Mus_inn, Mus_v)
271+
τxz_inn.= Array(av_xza(τxz)); gather!(τxz_inn, τxz_v)
272272
if me==0 && do_viz
273273
p1 = heatmap(Xi_g, Zi_g, Pt_v[:,y_sl,:]', aspect_ratio=1, xlims=(Xi_g[1],Xi_g[end]), zlims=(Zi_g[1],Zi_g[end]), c=:viridis, title="Pressure")
274274
p2 = heatmap(Xi_g, Zi_g, Vz_v[:,y_sl,:]', aspect_ratio=1, xlims=(Xi_g[1],Xi_g[end]), zlims=(Zi_g[1],Zi_g[end]), c=:viridis, title="Vz")

scripts/stokes_3D/Stokes3D_ve_multixpu_perf.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ end
264264
if (me==0) @printf("Total iters = %d (%d steps), time = %1.3e sec (@ T_eff = %1.2f GB/s) \n", ittot, nt, wtime, round(T_eff, sigdigits=3)) end
265265
# Visualisation
266266
if do_viz || do_save_viz
267-
Pt_inn .= inn(Pt); gather!(Pt_inn, Pt_v)
268-
Vz_inn .= av_zi(Vz); gather!(Vz_inn, Vz_v)
269-
Rz_inn .= av_za(Rz); gather!(Rz_inn, Rz_v)
270-
Mus_inn.= inn(Mus); gather!(Mus_inn, Mus_v)
271-
τxz_inn.= av_xza(τxz); gather!(τxz_inn, τxz_v)
267+
Pt_inn .= Array(inn(Pt)); gather!(Pt_inn, Pt_v)
268+
Vz_inn .= Array(av_zi(Vz)); gather!(Vz_inn, Vz_v)
269+
Rz_inn .= Array(av_za(Rz)); gather!(Rz_inn, Rz_v)
270+
Mus_inn.= Array(inn(Mus)); gather!(Mus_inn, Mus_v)
271+
τxz_inn.= Array(av_xza(τxz)); gather!(τxz_inn, τxz_v)
272272
if me==0 && do_viz
273273
p1 = heatmap(Xi_g, Zi_g, Pt_v[:,y_sl,:]', aspect_ratio=1, xlims=(Xi_g[1],Xi_g[end]), zlims=(Zi_g[1],Zi_g[end]), c=:viridis, title="Pressure")
274274
p2 = heatmap(Xi_g, Zi_g, Vz_v[:,y_sl,:]', aspect_ratio=1, xlims=(Xi_g[1],Xi_g[end]), zlims=(Zi_g[1],Zi_g[end]), c=:viridis, title="Vz")

scripts/stokes_3D/previous_damp/Stokes3D0_multixpu.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ end
225225
if (me==0) @printf("Total steps = %d, err = %1.3e, time = %1.3e sec (@ T_eff = %1.2f GB/s) \n", iter, err, wtime, round(T_eff, sigdigits=2)) end
226226
# Visualisation
227227
if do_viz
228-
Pt_inn .= inn(Pt); gather!(Pt_inn, Pt_v)
229-
Vz_inn .= av_zi(Vz); gather!(Vz_inn, Vz_v)
230-
Rz_inn .= av_za(Rz); gather!(Rz_inn, Rz_v)
228+
Pt_inn .= Array(inn(Pt)); gather!(Pt_inn, Pt_v)
229+
Vz_inn .= Array(av_zi(Vz)); gather!(Vz_inn, Vz_v)
230+
Rz_inn .= Array(av_za(Rz)); gather!(Rz_inn, Rz_v)
231231
if (me==0)
232232
p1 = heatmap(Xi_g, Zi_g, Pt_v[:,y_sl,:]', aspect_ratio=1, xlims=(Xi_g[1],Xi_g[end]), zlims=(Zi_g[1],Zi_g[end]), c=:viridis, title="Pressure")
233233
p2 = heatmap(Xi_g, Zi_g, Vz_v[:,y_sl,:]', aspect_ratio=1, xlims=(Xi_g[1],Xi_g[end]), zlims=(Zi_g[1],Zi_g[end]), c=:viridis, title="Vz")

0 commit comments

Comments
 (0)