From 51620e09385c0adb28f086fa1494d6116507c588 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Wed, 27 Mar 2024 18:55:43 +0200 Subject: [PATCH] `arch_array` -> `on_architecture` (#70) * arch_array -> on_architecture * up Oceananigans * Update pipeline.yml --- .buildkite/pipeline.yml | 2 +- Manifest.toml | 8 ++++---- Project.toml | 2 +- sandbox/one_degree_75S_75N.jl | 14 +++++++------- src/NearGlobalSimulations/NearGlobalSimulations.jl | 2 +- .../one_degree_global_simulation.jl | 12 ++++++------ .../quarter_degree_global_simulation.jl | 12 ++++++------ 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index a14c4402..db4b9ecb 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -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" diff --git a/Manifest.toml b/Manifest.toml index 896a74be..a824d739 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -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"] @@ -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" diff --git a/Project.toml b/Project.toml index 2184bcb4..73d28d2f 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/sandbox/one_degree_75S_75N.jl b/sandbox/one_degree_75S_75N.jl index 8703b6a4..9d811165 100755 --- a/sandbox/one_degree_75S_75N.jl +++ b/sandbox/one_degree_75S_75N.jl @@ -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 @@ -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 diff --git a/src/NearGlobalSimulations/NearGlobalSimulations.jl b/src/NearGlobalSimulations/NearGlobalSimulations.jl index 3b929ec1..6c1fb4e0 100644 --- a/src/NearGlobalSimulations/NearGlobalSimulations.jl +++ b/src/NearGlobalSimulations/NearGlobalSimulations.jl @@ -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 diff --git a/src/NearGlobalSimulations/one_degree_global_simulation.jl b/src/NearGlobalSimulations/one_degree_global_simulation.jl index c6579675..785cc498 100644 --- a/src/NearGlobalSimulations/one_degree_global_simulation.jl +++ b/src/NearGlobalSimulations/one_degree_global_simulation.jl @@ -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 diff --git a/src/NearGlobalSimulations/quarter_degree_global_simulation.jl b/src/NearGlobalSimulations/quarter_degree_global_simulation.jl index 4ad78c04..176e65ed 100644 --- a/src/NearGlobalSimulations/quarter_degree_global_simulation.jl +++ b/src/NearGlobalSimulations/quarter_degree_global_simulation.jl @@ -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