Skip to content

Commit

Permalink
Merge pull request #6 from PTsolvers/lr/revision
Browse files Browse the repository at this point in the history
GMD 2021-411 revision
  • Loading branch information
luraess authored May 16, 2022
2 parents 5e62ccb + e56d95f commit 1028793
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PseudoTransientDiffusion"
uuid = "b5b0327e-567e-4ee6-9713-fc28d852c7ee"
authors = ["Ludovic Raess <[email protected]>, Ivan Utkin and contributors"]
version = "0.1.0"
version = "1.0.0"

[deps]
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@

Parallel (multi-) XPU iterative 1D, 2D and 3D diffusion solvers (resolving linear, step-function and nonlinear diffusion coefficient). This software is part of the [**PTsolvers project**](https://ptsolvers.github.io/).

The aim of this project is to provide iterative solvers **assessing the scalability, performance, and robustness of the accelerated pseudo-transient method** with application to diffusion processes. The solution strategy characterises as semi-iterative, implementing the second-order convergence acceleration as introduced by, e.g., \[[Frankel, 1950](https://doi.org/10.2307/2002770)\].
The aim of this project is to provide iterative solvers **assessing the scalability, performance, and robustness of the accelerated pseudo-transient method** with application to diffusion processes. The solution strategy characterises as semi-iterative, implementing the second-order convergence acceleration as introduced by, e.g., [Frankel (1950)](https://doi.org/10.2307/2002770).

This repository, together with [**PseudoTransientStokes.jl**](https://github.com/PTsolvers/PseudoTransientStokes.jl/), relates to the original research article draft submitted to the _**Journal XXX**_:
This repository, together with [**PseudoTransientStokes.jl**](https://github.com/PTsolvers/PseudoTransientStokes.jl/), relates to the original research article draft submitted to the _**Geoscientific Model Development**_ journal:
```tex
@article{raess2022,
title = {{ }},
journal = {Journal XXX}
@Article{raess2022,
AUTHOR = {R\"ass, L. and Utkin, I. and Duretz, T. and Omlin, S. and Podladchikov, Y. Y.},
TITLE = {Assessing the robustness and scalability of the accelerated pseudo-transient method towards exascale computing},
JOURNAL = {Geoscientific Model Development Discussions},
VOLUME = {2022},
YEAR = {2022},
PAGES = {1--46},
URL = {https://gmd.copernicus.org/preprints/gmd-2021-411/},
DOI = {10.5194/gmd-2021-411}
}
```

Expand Down
3 changes: 1 addition & 2 deletions scripts/diff_3D/diff_3D_lin_multixpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ end
nout = 10 # tol check
CFL = 1/sqrt(3) # CFL number
me, dims = init_global_grid(nx, ny, nz) # MPI initialisation
@static if USE_GPU select_device() end # select one GPU per MPI local rank (if >1 GPU per node)
b_width = (8, 4, 4) # boundary width for comm/comp overlap
# Derived numerics
dx, dy, dz = lx/nx_g(), ly/ny_g(), lz/nz_g() # cell sizes
Expand Down Expand Up @@ -109,7 +108,7 @@ end
if (me==0) @printf("Total time = %1.2f, time steps = %d, nx = %d, iterations tot = %d \n", round(ttot, sigdigits=2), it, nx_g(), ittot) end
# Visualise
if do_viz || do_save_viz
H_inn .= inn(H); gather!(H_inn, H_v)
H_inn .= Array(inn(H)); gather!(H_inn, H_v)
if me==0 && do_viz
heatmap(Xi_g, Yi_g, H_v[:,:,z_sl]', dpi=150, aspect_ratio=1, framestyle=:box, xlims=(Xi_g[1],Xi_g[end]), ylims=(Yi_g[1],Yi_g[end]), xlabel="lx", ylabel="ly", c=:viridis, clims=(0,1), title="linear diffusion (nt=$it, iters=$ittot)")
savefig("../../figures/diff_3D_lin_$(nx_g()).png")
Expand Down
3 changes: 1 addition & 2 deletions scripts/diff_3D/diff_3D_linstep_multixpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ end
nout = 10 # tol check
CFL = 1/sqrt(3) # CFL number
me, dims = init_global_grid(nx, ny, nz) # MPI initialisation
@static if USE_GPU select_device() end # select one GPU per MPI local rank (if >1 GPU per node)
b_width = (8, 4, 4) # boundary width for comm/comp overlap
# Derived numerics
dx, dy, dz = lx/nx_g(), ly/ny_g(), lz/nz_g() # cell sizes
Expand Down Expand Up @@ -141,7 +140,7 @@ end
if (me==0) @printf("Total time = %1.2f, time steps = %d, nx = %d, iterations tot = %d \n", round(ttot, sigdigits=2), it, nx_g(), ittot) end
# Visualise
if do_viz || do_save_viz
H_inn .= inn(H); gather!(H_inn, H_v)
H_inn .= Array(inn(H)); gather!(H_inn, H_v)
if me==0 && do_viz
heatmap(Xi_g, Yi_g, H_v[:,:,z_sl]', dpi=150, aspect_ratio=1, framestyle=:box, xlims=(Xi_g[1],Xi_g[end]), ylims=(Yi_g[1],Yi_g[end]), xlabel="lx", ylabel="ly", c=:viridis, clims=(0,1), title="linear step diffusion (nt=$it, iters=$ittot)")
savefig("../../figures/diff_3D_linstep_$(nx_g()).png")
Expand Down
3 changes: 1 addition & 2 deletions scripts/diff_3D/diff_3D_nonlin_multixpu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ end
CFL = 1 / sqrt(3) # CFL number
Resc = 1 / 1.2 # iteration parameter scaling
me, dims = init_global_grid(nx, ny, nz) # MPI initialisation
@static if USE_GPU select_device() end # select one GPU per MPI local rank (if >1 GPU per node)
b_width = (8, 4, 4) # boundary width for comm/comp overlap
# Derived numerics
dx, dy, dz = lx/nx_g(), ly/ny_g(), lz/nz_g() # cell sizes
Expand Down Expand Up @@ -121,7 +120,7 @@ end
if (me==0) @printf("Total time = %1.2f, time steps = %d, nx = %d, iterations tot = %d \n", round(ttot, sigdigits=2), it, nx_g(), ittot) end
# Visualise
if do_viz || do_save_viz
H_inn .= inn(H); gather!(H_inn, H_v)
H_inn .= Array(inn(H)); gather!(H_inn, H_v)
if me==0 && do_viz
heatmap(Xi_g, Yi_g, H_v[:,:,z_sl]', dpi=150, aspect_ratio=1, framestyle=:box, xlims=(Xi_g[1],Xi_g[end]), ylims=(Yi_g[1],Yi_g[end]), xlabel="lx", ylabel="ly", c=:viridis, clims=(0,1), title="nonlinear diffusion (nt=$it, iters=$ittot)")
savefig("../../figures/diff_3D_nonlin_$(nx_g()).png")
Expand Down
3 changes: 1 addition & 2 deletions scripts/diff_3D/diff_3D_nonlin_multixpu_perf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ end
CFL = 1 / sqrt(3) # CFL number
Resc = 1 / 1.2 # iteration parameter scaling
me, dims, nprocs = init_global_grid(nx, ny, nz) # MPI initialisation
@static if USE_GPU select_device() end # select one GPU per MPI local rank (if >1 GPU per node)
b_width = (16, 4, 4) # boundary width for comm/comp overlap
# Derived numerics
dx, dy, dz = lx/nx_g(), ly/ny_g(), lz/nz_g() # cell sizes
Expand Down Expand Up @@ -139,7 +138,7 @@ end
if (me==0) @printf("Total time = %1.2f, time steps = %d, nx = %d, iterations tot = %d \n", round(ttot, sigdigits=2), it, nx_g(), ittot) end
# Visualise
if do_viz || do_save_viz
H_inn .= inn(H); gather!(H_inn, H_v)
H_inn .= Array(inn(H)); gather!(H_inn, H_v)
if me==0 && do_viz
heatmap(Xi_g, Yi_g, H_v[:,:,z_sl]', dpi=150, aspect_ratio=1, framestyle=:box, xlims=(Xi_g[1],Xi_g[end]), ylims=(Yi_g[1],Yi_g[end]), xlabel="lx", ylabel="ly", c=:viridis, clims=(0,1), title="nonlinear diffusion (nt=$it, iters=$ittot)")
savefig("../../figures/diff_3D_nonlin_multixpu_perf_$(nx_g()).png")
Expand Down

0 comments on commit 1028793

Please sign in to comment.