From a94aa783a3c802732c88974a6b2372c53dd247af Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 20 Aug 2024 06:20:49 +1000 Subject: [PATCH 1/3] drop allowscalar --- src/grid_extensions.jl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/grid_extensions.jl b/src/grid_extensions.jl index da164de..e8cdd92 100644 --- a/src/grid_extensions.jl +++ b/src/grid_extensions.jl @@ -16,13 +16,9 @@ import Oceananigans.Grids: x_domain, y_domain import Oceananigans.Fields: Field import Oceananigans.Fields: tupled_fill_halo_regions! -# Horrible, just for this allowscalar! -# we should remove this dependency -using CUDA: @allowscalar - # A tripolar grid is always between 0 and 360 in longitude! x_domain(grid::TRG) = 0, 360 -y_domain(grid::TRG) = @allowscalar minimum(grid.φᶠᶠᵃ), 90 +y_domain(grid::TRG) = minimum(parent(grid.φᶠᶠᵃ)), 90 # a `TripolarGrid` needs a `ZipperBoundaryCondition` for the north boundary # The `sign` 1 for regular tracers and -1 for velocities and signed vectors From c9e5892936c41c4002e1e2d72c3c02f7b81dd2b9 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 20 Aug 2024 06:21:03 +1000 Subject: [PATCH 2/3] drop CUDA + bump patch --- Project.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 6f30e2c..6f9c21e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,11 +1,10 @@ name = "OrthogonalSphericalShellGrids" uuid = "c2be9673-fb75-4747-82dc-aa2bb9f4aed0" authors = ["Climate Modeling Alliance and contributors"] -version = "0.1.2" +version = "0.1.3" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" @@ -14,7 +13,6 @@ OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" [compat] Adapt = "4" -CUDA = "5" JLD2 = "0.4" KernelAbstractions = "0.9" MPI = "0.20" From 83a9fd502a800905650939335f3f39fb73eeae97 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 20 Aug 2024 06:48:14 +1000 Subject: [PATCH 3/3] import CPU, GPU types --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index ef3cf77..3a8c9b0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,6 @@ using OrthogonalSphericalShellGrids using OrthogonalSphericalShellGrids.Oceananigans +using Oceananigans: GPU, CPU using Oceananigans.CUDA using Test