Skip to content

Commit

Permalink
Compat with ParallelStencil 0.11 (#97)
Browse files Browse the repository at this point in the history
* compat with ParallelStencil 0.11

* fix CI

* update miniapps

* fix tests

* deprecate tests

* fixes BC test
  • Loading branch information
albert-de-montserrat authored Jan 30, 2024
1 parent e86437f commit 35c4008
Show file tree
Hide file tree
Showing 37 changed files with 440 additions and 27 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CellArrays = "d35fcfd7-7af4-4c67-b1aa-d78070614af4"
GeoParams = "e018b62d-d9de-4a26-8697-af89c310ae38"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
ImplicitGlobalGrid = "4d7a3746-15be-11ea-1130-334b0c4f5fa0"
JustPIC = "10dc771f-8528-4cd9-9d3b-b21b2e693339"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
Expand All @@ -26,12 +27,12 @@ AMDGPU = "0.6, 0.7, 0.8"
Adapt = "3.7.2"
CUDA = "4.4.1, 5"
CellArrays = "0.1 "
HDF5 = "0.17.1"
GeoParams = "0.5.5"
HDF5 = "0.17.1"
ImplicitGlobalGrid = "0.14.0, 0.15.0"
MPI = "0.20"
MuladdMacro = "0.2"
ParallelStencil = "0.9, 0.10"
ParallelStencil = "0.9, 0.10, 0.11"
Reexport = "1.2.2"
StaticArrays = "1"
Statistics = "1"
Expand Down
3 changes: 3 additions & 0 deletions miniapps/benchmarks/stokes2D/RunStokesBench2D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ using JustRelax, Printf, LinearAlgebra
using MPI: MPI
using GLMakie

using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

# setup ParallelStencil.jl environment
model = PS_Setup(:cpu, Float64, 2) # :cpu | :CUDA | :AMDGPU
environment!(model)
Expand Down
6 changes: 3 additions & 3 deletions miniapps/benchmarks/stokes2D/VanKeken.jl/VanKeken.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using CUDA
CUDA.allowscalar(false)
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

using Printf, LinearAlgebra, GeoParams, GLMakie, SpecialFunctions, CellArrays
using JustRelax, JustRelax.DataIO, JustPIC, CSV, DataFrames
backend = "CUDA_Float64_2D" # options: "CUDA_Float64_2D" "Threads_Float64_2D"
backend = "Threads_Float64_2D" # options: "CUDA_Float64_2D" "Threads_Float64_2D"
# set_backend(backend) # run this on the REPL to switch backend

# setup ParallelStencil.jl environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using CUDA
CUDA.allowscalar(false)
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

using GeoParams, GLMakie, CellArrays
using JustRelax, JustRelax.DataIO
Expand Down
2 changes: 2 additions & 0 deletions miniapps/benchmarks/stokes2D/shear_band/ShearBand2D.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using GeoParams, GLMakie, CellArrays
using JustRelax, JustRelax.DataIO
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

# setup ParallelStencil.jl environment
model = PS_Setup(:Threads, Float64, 2)
Expand Down
2 changes: 2 additions & 0 deletions miniapps/benchmarks/stokes2D/shear_band/ShearBand2D_MPI.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using CUDA
using GeoParams, GLMakie, CellArrays
using JustRelax, JustRelax.DataIO
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

# setup ParallelStencil.jl environment
dimension = 2 # 2 | 3
Expand Down
2 changes: 2 additions & 0 deletions miniapps/benchmarks/stokes2D/shear_heating/Shearheating2D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import JustRelax.@cell
## NOTE: need to run one of the lines below if one wishes to switch from one backend to another
# set_backend("Threads_Float64_2D")
# set_backend("CUDA_Float64_2D")
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

# setup ParallelStencil.jl environment
model = PS_Setup(:cpu, Float64, 2)
Expand Down
2 changes: 2 additions & 0 deletions miniapps/benchmarks/stokes2D/sinking_block/SinkingBlock2D.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using JustRelax
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

# setup ParallelStencil.jl environment
model = PS_Setup(:threads, Float64, 2)
Expand Down
2 changes: 2 additions & 0 deletions miniapps/benchmarks/stokes3D/RunStokesBench3D.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using LinearAlgebra, CairoMakie
using JustRelax
using MPI: MPI
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)

# setup ParallelStencil.jl environment
model = PS_Setup(:cpu, Float64, 3)
Expand Down
4 changes: 2 additions & 2 deletions miniapps/benchmarks/stokes3D/shear_band/ShearBand3D.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
JustRelax.CUDA.allowscalar(false)

using Printf, GeoParams, GLMakie, CellArrays, CSV, DataFrames
using JustRelax, JustRelax.DataIO
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)

# setup ParallelStencil.jl environment
model = PS_Setup(:Threads, Float64, 3)
Expand Down
2 changes: 2 additions & 0 deletions miniapps/benchmarks/stokes3D/shear_band/ShearBand3D_MPI.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Printf, GeoParams, GLMakie, CellArrays
using JustRelax, JustRelax.DataIO
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)

# setup ParallelStencil.jl environment
dimension = 3 # 2 | 3
Expand Down
3 changes: 2 additions & 1 deletion miniapps/benchmarks/stokes3D/shear_heating/Shearheating3D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# http://dx.doi.org/10.1002/2014GL060438
using JustRelax, JustRelax.DataIO, JustPIC
import JustRelax.@cell
using CUDA
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)

## NOTE: need to run one of the lines below if one wishes to switch from one backend to another
# set_backend("Threads_Float64_3D")
Expand Down
2 changes: 2 additions & 0 deletions miniapps/benchmarks/thermal_diffusion/RunThermalDiffusion.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# using CairoMakie
using JustRelax, GeoParams
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)

# setup ParallelStencil.jl environment
dimension = 3 # 2 | 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# using CairoMakie
using JustRelax, GeoParams
using GLMakie
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)

# setup ParallelStencil.jl environment
dimension = 2 # 2 | 3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using CUDA
CUDA.allowscalar(false)

using Printf, LinearAlgebra, GeoParams, SpecialFunctions, CellArrays, StaticArrays, JustPIC
using JustRelax
backend = "CUDA_Float64_2D" # options: "CUDA_Float64_2D" "Threads_Float64_2D"
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)
backend = "Threads_Float64_2D" # options: "CUDA_Float64_2D" "Threads_Float64_2D"
# set_backend(backend) # run this on the REPL to switch backend

# setup ParallelStencil.jl environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using JustRelax, GeoParams
using GLMakie
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 3)

# setup ParallelStencil.jl environment
dimension = 3 # 2 | 3
Expand Down
2 changes: 2 additions & 0 deletions miniapps/convection/GlobalConvection2D_Upwind.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using JustRelax
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

# setup ParallelStencil.jl environment
model = PS_Setup(:threads, Float64, 2)
Expand Down
2 changes: 2 additions & 0 deletions miniapps/convection/GlobalConvection2D_WENO5.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using JustRelax
using ParallelStencil
@init_parallel_stencil(Threads, Float64, 2)

# setup ParallelStencil.jl environment
model = PS_Setup(:threads, Float64, 2)
Expand Down
Loading

0 comments on commit 35c4008

Please sign in to comment.