Skip to content

Commit

Permalink
arch_array -> on_architecture (#70)
Browse files Browse the repository at this point in the history
* arch_array -> on_architecture

* up Oceananigans

* Update pipeline.yml
  • Loading branch information
navidcy authored Mar 27, 2024
1 parent 7afcd80 commit 51620e0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
agents:
queue: new-central
slurm_mem: 8G
modules: climacommon/2024_02_27
modules: climacommon/2024_03_18

env:
JULIA_LOAD_PATH: "${JULIA_LOAD_PATH}:${BUILDKITE_BUILD_CHECKOUT_PATH}/.buildkite"
Expand Down
8 changes: 4 additions & 4 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.10.1"
julia_version = "1.10.2"
manifest_format = "2.0"
project_hash = "be26e3b3cc0e1adafed5689990fb4477fcf7580d"
project_hash = "8b7f9f42e5e87056d8c4e8c3f7c0d180e1eaa34b"

[[deps.AbstractFFTs]]
deps = ["LinearAlgebra"]
Expand Down Expand Up @@ -691,9 +691,9 @@ version = "1.2.0"

[[deps.Oceananigans]]
deps = ["Adapt", "CUDA", "Crayons", "CubedSphere", "Dates", "Distances", "DocStringExtensions", "FFTW", "Glob", "IncompleteLU", "InteractiveUtils", "IterativeSolvers", "JLD2", "KernelAbstractions", "LinearAlgebra", "Logging", "MPI", "NCDatasets", "OffsetArrays", "OrderedCollections", "PencilArrays", "PencilFFTs", "Pkg", "Printf", "Random", "Rotations", "SeawaterPolynomials", "SparseArrays", "Statistics", "StructArrays"]
git-tree-sha1 = "1910b8553f78cdd9a8496f51ea693b3adbd6b984"
git-tree-sha1 = "4672af7242405313743af45168bfce3d87b84b2c"
uuid = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
version = "0.90.9"
version = "0.90.11"

[deps.Oceananigans.extensions]
OceananigansEnzymeExt = "Enzyme"
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Downloads = "1.6"
JLD2 = "0.4"
KernelAbstractions = "0.9"
NCDatasets = "0.12, 0.13, 0.14"
Oceananigans = "0.90"
Oceananigans = "0.90.10"
SeawaterPolynomials = "0.3"
Statistics = "1.9"
julia = "1.9"
Expand Down
14 changes: 7 additions & 7 deletions sandbox/one_degree_75S_75N.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Oceananigans
using Oceananigans.Units

using Oceananigans.Operators: Δzᵃᵃᶜ
using Oceananigans.Architectures: arch_array
using Oceananigans.Architectures: on_architecture
using Oceananigans.Coriolis: HydrostaticSphericalCoriolis
using Oceananigans.Coriolis: WetCellEnstrophyConservingScheme
using Oceananigans.TurbulenceClosures: RiBasedVerticalDiffusivity, FluxTapering
Expand Down Expand Up @@ -65,12 +65,12 @@ close(boundary_conditions_file)
@info "... read boundary conditions (" * prettytime(1e-9 * (time_ns() - start)) * ")"

# Convert boundary conditions arrays to GPU
τˣ = arch_array(arch, τˣ)
τʸ = arch_array(arch, τʸ)
target_sea_surface_temperature = T★ = arch_array(arch, T★)
target_sea_surface_salinity = S★ = arch_array(arch, S★)
surface_temperature_flux = Q★ = arch_array(arch, Q★)
surface_salt_flux = F★ = arch_array(arch, F★)
τˣ = on_architecture(arch, τˣ)
τʸ = on_architecture(arch, τʸ)
target_sea_surface_temperature = T★ = on_architecture(arch, T★)
target_sea_surface_salinity = S★ = on_architecture(arch, S★)
surface_temperature_flux = Q★ = on_architecture(arch, Q★)
surface_salt_flux = F★ = on_architecture(arch, F★)

# Stretched faces from ECCO Version 4 (49 levels in the vertical)
z_faces = ClimaOcean.VerticalGrids.z_49_levels_10_to_400_meter_spacing
Expand Down
2 changes: 1 addition & 1 deletion src/NearGlobalSimulations/NearGlobalSimulations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using Oceananigans
using Oceananigans.Units

using Oceananigans.Operators: Δzᵃᵃᶜ, ℑxyᶠᶜᵃ, ℑxyᶜᶠᵃ
using Oceananigans.Architectures: arch_array
using Oceananigans.Architectures: on_architecture
using Oceananigans.Coriolis: HydrostaticSphericalCoriolis
# using Oceananigans.Coriolis: ActiveCellEnstrophyConservingScheme
using Oceananigans.TurbulenceClosures: RiBasedVerticalDiffusivity, FluxTapering
Expand Down
12 changes: 6 additions & 6 deletions src/NearGlobalSimulations/one_degree_global_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ function one_degree_near_global_simulation(architecture = GPU();
@info "... read boundary conditions (" * prettytime(1e-9 * (time_ns() - start)) * ")"

# Convert boundary conditions arrays to GPU
τˣ = arch_array(architecture, τˣ)
τʸ = arch_array(architecture, τʸ)
target_sea_surface_temperature = T★ = arch_array(architecture, T★)
target_sea_surface_salinity = S★ = arch_array(architecture, S★)
surface_temperature_flux = Q★ = arch_array(architecture, Q★)
surface_salt_flux = F★ = arch_array(architecture, F★)
τˣ = on_architecture(architecture, τˣ)
τʸ = on_architecture(architecture, τʸ)
target_sea_surface_temperature = T★ = on_architecture(architecture, T★)
target_sea_surface_salinity = S★ = on_architecture(architecture, S★)
surface_temperature_flux = Q★ = on_architecture(architecture, Q★)
surface_salt_flux = F★ = on_architecture(architecture, F★)

# Stretched faces from ECCO Version 4 (49 levels in the vertical)
z_faces = VerticalGrids.z_49_levels_10_to_400_meter_spacing
Expand Down
12 changes: 6 additions & 6 deletions src/NearGlobalSimulations/quarter_degree_global_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ function quarter_degree_near_global_simulation(architecture = GPU();
@info "... read boundary conditions (" * prettytime(1e-9 * (time_ns() - start)) * ")"

# Convert boundary conditions arrays to GPU
τˣ = arch_array(architecture, τˣ)
τʸ = arch_array(architecture, τʸ)
target_sea_surface_temperature = T★ = arch_array(architecture, T★)
target_sea_surface_salinity = S★ = arch_array(architecture, S★)
surface_temperature_flux = Q★ = arch_array(architecture, Q★)
surface_salt_flux = F★ = arch_array(architecture, F★)
τˣ = on_architecture(architecture, τˣ)
τʸ = on_architecture(architecture, τʸ)
target_sea_surface_temperature = T★ = on_architecture(architecture, T★)
target_sea_surface_salinity = S★ = on_architecture(architecture, S★)
surface_temperature_flux = Q★ = on_architecture(architecture, Q★)
surface_salt_flux = F★ = on_architecture(architecture, F★)

# Stretched faces from ECCO Version 4 (49 levels in the vertical)
z_faces = VerticalGrids.z_49_levels_10_to_400_meter_spacing
Expand Down

0 comments on commit 51620e0

Please sign in to comment.