From db92f6ef4163d97740ce76f81fba9e8fc5f3530a Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Fri, 28 Jun 2024 09:10:24 -0700 Subject: [PATCH] Add support for ClimaComms < 0.6 in tests --- examples/bickleyjet/bickleyjet_cg_invariant_hypervisc.jl | 2 +- examples/column/advect.jl | 2 +- examples/column/advect_diffusion.jl | 2 +- examples/column/bb_fct_advection.jl | 2 +- examples/column/ekman.jl | 2 +- examples/column/fct_advection.jl | 2 +- examples/column/heat.jl | 2 +- examples/column/hydrostatic.jl | 2 +- examples/column/hydrostatic_discrete.jl | 2 +- examples/column/hydrostatic_ekman.jl | 2 +- examples/column/step.jl | 2 +- examples/column/wave.jl | 2 +- examples/column/zalesak_fct_advection.jl | 2 +- examples/hybrid/box/bubble_3d_invariant_rhoe.jl | 2 +- examples/hybrid/box/bubble_3d_invariant_rhotheta.jl | 2 +- examples/hybrid/box/bubble_3d_rhotheta.jl | 2 +- examples/hybrid/box/limiters_advection.jl | 2 +- examples/hybrid/driver.jl | 2 +- examples/hybrid/hybrid3dcs_dss.jl | 2 +- examples/hybrid/plane/bubble_2d_invariant_rhoe.jl | 2 +- examples/hybrid/plane/density_current_2d_flux_form.jl | 2 +- examples/hybrid/plane/density_current_2dinvariant_rhoe.jl | 2 +- examples/hybrid/plane/inertial_gravity_wave.jl | 2 +- examples/hybrid/plane/isothermal_channel.jl | 2 +- examples/hybrid/plane/topo_agnesi_nh.jl | 2 +- examples/hybrid/plane/topo_schar_nh.jl | 2 +- examples/hybrid/sphere/baroclinic_wave_utilities.jl | 2 +- examples/hybrid/sphere/deformation_flow.jl | 2 +- examples/hybrid/sphere/hadley_circulation.jl | 2 +- examples/hybrid/sphere/nonhydrostatic_gravity_wave.jl | 2 +- examples/sphere/shallow_water.jl | 2 +- lib/ClimaCoreTempestRemap/test/netcdf.jl | 2 +- test/DataLayouts/cuda.jl | 2 +- test/DataLayouts/opt_similar.jl | 2 +- test/DataLayouts/unit_copyto.jl | 2 +- test/DataLayouts/unit_fill.jl | 2 +- test/DataLayouts/unit_mapreduce.jl | 2 +- test/DataLayouts/unit_ndims.jl | 2 +- test/Fields/convergence_field_integrals.jl | 2 +- test/Fields/reduction_cuda.jl | 2 +- test/Fields/reduction_cuda_distributed.jl | 2 +- test/Fields/unit_field.jl | 2 +- test/Fields/utils_field_multi_broadcast_fusion.jl | 2 +- test/InputOutput/hybrid3dcubedsphere.jl | 2 +- test/InputOutput/spectralelement2d.jl | 2 +- test/Limiters/distributed/dlimiter.jl | 2 +- test/Limiters/limiter.jl | 2 +- test/MatrixFields/field2arrays.jl | 2 +- test/MatrixFields/gpu_compat_bidiag_matrix_row.jl | 2 +- test/MatrixFields/matrix_multiplication_recursion.jl | 2 +- test/Operators/finitedifference/benchmark_examples.jl | 2 +- test/Operators/finitedifference/benchmark_stencils_utils.jl | 2 +- .../finitedifference/convergence_advection_diffusion1d.jl | 2 +- test/Operators/finitedifference/convergence_column.jl | 2 +- test/Operators/finitedifference/linsolve.jl | 2 +- test/Operators/finitedifference/opt.jl | 2 +- test/Operators/finitedifference/opt_examples.jl | 2 +- test/Operators/finitedifference/unit_column.jl | 2 +- test/Operators/finitedifference/wfact.jl | 2 +- test/Operators/hybrid/extruded_3dbox_cuda.jl | 2 +- test/Operators/hybrid/extruded_sphere_cuda.jl | 2 +- test/Operators/hybrid/utils_2d.jl | 2 +- test/Operators/hybrid/utils_3d.jl | 2 +- test/Operators/hybrid/utils_cuda.jl | 2 +- test/Operators/integrals.jl | 2 +- test/Operators/spectralelement/benchmark_utils.jl | 2 +- test/Operators/spectralelement/rectilinear.jl | 2 +- test/Operators/spectralelement/rectilinear_cuda.jl | 2 +- test/Operators/spectralelement/sphere_geometry_distributed.jl | 2 +- test/Operators/unit_thomas_algorithm.jl | 2 +- test/Remapping/distributed_remapping.jl | 2 +- test/Spaces/ddss1.jl | 2 +- test/Spaces/ddss1_cs.jl | 2 +- test/Spaces/distributed/ddss_setup.jl | 2 +- test/Spaces/distributed/gather4.jl | 2 +- test/Spaces/distributed_cuda/ddss2.jl | 2 +- test/Spaces/distributed_cuda/ddss3.jl | 2 +- test/Spaces/distributed_cuda/ddss4.jl | 2 +- test/Spaces/distributed_cuda/ddss_ne32_cs.jl | 2 +- test/Spaces/distributed_cuda/space_construction.jl | 2 +- test/Spaces/extruded_cuda.jl | 2 +- test/Spaces/opt_spaces.jl | 2 +- test/Spaces/point_cuda.jl | 2 +- test/Spaces/unit_spaces.jl | 2 +- test/Topologies/dtopo4.jl | 2 +- test/deprecations.jl | 2 +- test/runtests.jl | 2 +- 87 files changed, 87 insertions(+), 87 deletions(-) diff --git a/examples/bickleyjet/bickleyjet_cg_invariant_hypervisc.jl b/examples/bickleyjet/bickleyjet_cg_invariant_hypervisc.jl index 6585c237b0..ca1d4a9265 100644 --- a/examples/bickleyjet/bickleyjet_cg_invariant_hypervisc.jl +++ b/examples/bickleyjet/bickleyjet_cg_invariant_hypervisc.jl @@ -14,7 +14,7 @@ import ClimaCore: using OrdinaryDiffEq: ODEProblem, solve, SSPRK33 using Logging -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends const context = ClimaComms.context() usempi = context isa ClimaComms.MPICommsContext if usempi diff --git a/examples/column/advect.jl b/examples/column/advect.jl index 7853ab976d..c6da27ab6b 100644 --- a/examples/column/advect.jl +++ b/examples/column/advect.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Fields, Domains, diff --git a/examples/column/advect_diffusion.jl b/examples/column/advect_diffusion.jl index 5bee5e4467..fa5fe1e201 100644 --- a/examples/column/advect_diffusion.jl +++ b/examples/column/advect_diffusion.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Fields, Domains, diff --git a/examples/column/bb_fct_advection.jl b/examples/column/bb_fct_advection.jl index 8c049679f6..e096f5b1ad 100644 --- a/examples/column/bb_fct_advection.jl +++ b/examples/column/bb_fct_advection.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Test using LinearAlgebra using OrdinaryDiffEq: ODEProblem, solve diff --git a/examples/column/ekman.jl b/examples/column/ekman.jl index 37860cd63d..6cc2fe175e 100644 --- a/examples/column/ekman.jl +++ b/examples/column/ekman.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using LinearAlgebra import ClimaCore: Fields, diff --git a/examples/column/fct_advection.jl b/examples/column/fct_advection.jl index 6134ce4d41..f3b94ef25d 100644 --- a/examples/column/fct_advection.jl +++ b/examples/column/fct_advection.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Test using LinearAlgebra using OrdinaryDiffEq: ODEProblem, solve, SSPRK33 diff --git a/examples/column/heat.jl b/examples/column/heat.jl index cabe614ac2..41b7e1a930 100644 --- a/examples/column/heat.jl +++ b/examples/column/heat.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Fields, Domains, diff --git a/examples/column/hydrostatic.jl b/examples/column/hydrostatic.jl index c2dd942b2e..5ccea59d13 100644 --- a/examples/column/hydrostatic.jl +++ b/examples/column/hydrostatic.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Fields, Domains, diff --git a/examples/column/hydrostatic_discrete.jl b/examples/column/hydrostatic_discrete.jl index f543ae6d46..48e31d0192 100644 --- a/examples/column/hydrostatic_discrete.jl +++ b/examples/column/hydrostatic_discrete.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Fields, Domains, diff --git a/examples/column/hydrostatic_ekman.jl b/examples/column/hydrostatic_ekman.jl index 483f037dd8..cdf15d6ff2 100644 --- a/examples/column/hydrostatic_ekman.jl +++ b/examples/column/hydrostatic_ekman.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using LinearAlgebra import ClimaCore: diff --git a/examples/column/step.jl b/examples/column/step.jl index 70755a3eaa..e3cb353ea8 100644 --- a/examples/column/step.jl +++ b/examples/column/step.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using LinearAlgebra import ClimaCore: Fields, diff --git a/examples/column/wave.jl b/examples/column/wave.jl index 9573e1dba1..18ef9e6f15 100644 --- a/examples/column/wave.jl +++ b/examples/column/wave.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore.Geometry, LinearAlgebra import ClimaCore: Fields, diff --git a/examples/column/zalesak_fct_advection.jl b/examples/column/zalesak_fct_advection.jl index 9dc13a86a7..7a6cf2df06 100644 --- a/examples/column/zalesak_fct_advection.jl +++ b/examples/column/zalesak_fct_advection.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Test using LinearAlgebra using OrdinaryDiffEq: ODEProblem, solve diff --git a/examples/hybrid/box/bubble_3d_invariant_rhoe.jl b/examples/hybrid/box/bubble_3d_invariant_rhoe.jl index a6bbca5b87..d4dca5ed03 100644 --- a/examples/hybrid/box/bubble_3d_invariant_rhoe.jl +++ b/examples/hybrid/box/bubble_3d_invariant_rhoe.jl @@ -11,7 +11,7 @@ using Test using Adapt using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends FloatType = eval(Meta.parse(get(ARGS, 1, "Float64"))) using StaticArrays, IntervalSets, LinearAlgebra, OrdinaryDiffEq using DocStringExtensions diff --git a/examples/hybrid/box/bubble_3d_invariant_rhotheta.jl b/examples/hybrid/box/bubble_3d_invariant_rhotheta.jl index 1712ee8d77..8fc98376cb 100644 --- a/examples/hybrid/box/bubble_3d_invariant_rhotheta.jl +++ b/examples/hybrid/box/bubble_3d_invariant_rhotheta.jl @@ -3,7 +3,7 @@ using ClimaComms using LinearAlgebra import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/examples/hybrid/box/bubble_3d_rhotheta.jl b/examples/hybrid/box/bubble_3d_rhotheta.jl index ab32a7df03..1a96c7a28f 100644 --- a/examples/hybrid/box/bubble_3d_rhotheta.jl +++ b/examples/hybrid/box/bubble_3d_rhotheta.jl @@ -3,7 +3,7 @@ using ClimaComms using LinearAlgebra, StaticArrays import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/examples/hybrid/box/limiters_advection.jl b/examples/hybrid/box/limiters_advection.jl index 95698bb5e7..d25662b73d 100644 --- a/examples/hybrid/box/limiters_advection.jl +++ b/examples/hybrid/box/limiters_advection.jl @@ -6,7 +6,7 @@ ARGS = ["cosine_bells"]; using Revise; include(joinpath("examples", "hybrid", "box", "limiters_advection.jl")) =# using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using LinearAlgebra using SciMLBase diff --git a/examples/hybrid/driver.jl b/examples/hybrid/driver.jl index 8c60b127bf..5a5249b6a2 100644 --- a/examples/hybrid/driver.jl +++ b/examples/hybrid/driver.jl @@ -26,7 +26,7 @@ postprocessing(sol, output_dir) = nothing import ClimaTimeSteppers as CTS using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import SciMLBase const comms_ctx = ClimaComms.context() is_distributed = comms_ctx isa ClimaComms.MPICommsContext diff --git a/examples/hybrid/hybrid3dcs_dss.jl b/examples/hybrid/hybrid3dcs_dss.jl index 6272d64038..33bf71a7aa 100644 --- a/examples/hybrid/hybrid3dcs_dss.jl +++ b/examples/hybrid/hybrid3dcs_dss.jl @@ -6,7 +6,7 @@ using JLD2 include("../nvtx.jl") import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Domains, diff --git a/examples/hybrid/plane/bubble_2d_invariant_rhoe.jl b/examples/hybrid/plane/bubble_2d_invariant_rhoe.jl index 1842e4fe31..382ffd34dd 100644 --- a/examples/hybrid/plane/bubble_2d_invariant_rhoe.jl +++ b/examples/hybrid/plane/bubble_2d_invariant_rhoe.jl @@ -4,7 +4,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/examples/hybrid/plane/density_current_2d_flux_form.jl b/examples/hybrid/plane/density_current_2d_flux_form.jl index fed1d3257b..59ba18487b 100644 --- a/examples/hybrid/plane/density_current_2d_flux_form.jl +++ b/examples/hybrid/plane/density_current_2d_flux_form.jl @@ -2,7 +2,7 @@ using Test using LinearAlgebra, StaticArrays import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/examples/hybrid/plane/density_current_2dinvariant_rhoe.jl b/examples/hybrid/plane/density_current_2dinvariant_rhoe.jl index 83b36c4066..fab3096bfa 100644 --- a/examples/hybrid/plane/density_current_2dinvariant_rhoe.jl +++ b/examples/hybrid/plane/density_current_2dinvariant_rhoe.jl @@ -4,7 +4,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/examples/hybrid/plane/inertial_gravity_wave.jl b/examples/hybrid/plane/inertial_gravity_wave.jl index 79f6f9a31b..3525f9e346 100644 --- a/examples/hybrid/plane/inertial_gravity_wave.jl +++ b/examples/hybrid/plane/inertial_gravity_wave.jl @@ -7,7 +7,7 @@ using Printf using ProgressLogging using ClimaCorePlots, Plots import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends # Reference paper: https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.2105 diff --git a/examples/hybrid/plane/isothermal_channel.jl b/examples/hybrid/plane/isothermal_channel.jl index 65b1f99230..5ebbbc08f6 100644 --- a/examples/hybrid/plane/isothermal_channel.jl +++ b/examples/hybrid/plane/isothermal_channel.jl @@ -2,7 +2,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/examples/hybrid/plane/topo_agnesi_nh.jl b/examples/hybrid/plane/topo_agnesi_nh.jl index 2480bb320f..a966d32b96 100644 --- a/examples/hybrid/plane/topo_agnesi_nh.jl +++ b/examples/hybrid/plane/topo_agnesi_nh.jl @@ -2,7 +2,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, slab, diff --git a/examples/hybrid/plane/topo_schar_nh.jl b/examples/hybrid/plane/topo_schar_nh.jl index 9a5e905dec..596def56ba 100644 --- a/examples/hybrid/plane/topo_schar_nh.jl +++ b/examples/hybrid/plane/topo_schar_nh.jl @@ -2,7 +2,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/examples/hybrid/sphere/baroclinic_wave_utilities.jl b/examples/hybrid/sphere/baroclinic_wave_utilities.jl index 2464b2707e..2ee045c102 100644 --- a/examples/hybrid/sphere/baroclinic_wave_utilities.jl +++ b/examples/hybrid/sphere/baroclinic_wave_utilities.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends # Constants required by "staggered_nonhydrostatic_model.jl" # const FT = ? # specified in each test file diff --git a/examples/hybrid/sphere/deformation_flow.jl b/examples/hybrid/sphere/deformation_flow.jl index 5e2999758d..91738f008c 100644 --- a/examples/hybrid/sphere/deformation_flow.jl +++ b/examples/hybrid/sphere/deformation_flow.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using OrdinaryDiffEq using Test using Statistics: mean diff --git a/examples/hybrid/sphere/hadley_circulation.jl b/examples/hybrid/sphere/hadley_circulation.jl index b489a182b2..cb29615af5 100644 --- a/examples/hybrid/sphere/hadley_circulation.jl +++ b/examples/hybrid/sphere/hadley_circulation.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Test using LinearAlgebra diff --git a/examples/hybrid/sphere/nonhydrostatic_gravity_wave.jl b/examples/hybrid/sphere/nonhydrostatic_gravity_wave.jl index ba618afdf7..dd1910f95d 100644 --- a/examples/hybrid/sphere/nonhydrostatic_gravity_wave.jl +++ b/examples/hybrid/sphere/nonhydrostatic_gravity_wave.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Test using LinearAlgebra diff --git a/examples/sphere/shallow_water.jl b/examples/sphere/shallow_water.jl index 8b3b3cb4d9..c47246ba84 100644 --- a/examples/sphere/shallow_water.jl +++ b/examples/sphere/shallow_water.jl @@ -1,5 +1,5 @@ using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using LinearAlgebra using Colors using DocStringExtensions diff --git a/lib/ClimaCoreTempestRemap/test/netcdf.jl b/lib/ClimaCoreTempestRemap/test/netcdf.jl index 4f63575c0c..c2f77890c2 100644 --- a/lib/ClimaCoreTempestRemap/test/netcdf.jl +++ b/lib/ClimaCoreTempestRemap/test/netcdf.jl @@ -1,6 +1,6 @@ import ClimaCore using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using ClimaCore: Geometry, Meshes, diff --git a/test/DataLayouts/cuda.jl b/test/DataLayouts/cuda.jl index 8aa2996920..c872d9139a 100644 --- a/test/DataLayouts/cuda.jl +++ b/test/DataLayouts/cuda.jl @@ -5,7 +5,7 @@ using Revise; include(joinpath("test", "DataLayouts", "cuda.jl")) using Test using ClimaComms using CUDA -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using ClimaCore.DataLayouts function knl_copy!(dst, src) diff --git a/test/DataLayouts/opt_similar.jl b/test/DataLayouts/opt_similar.jl index f69383a34c..2ef6ed3496 100644 --- a/test/DataLayouts/opt_similar.jl +++ b/test/DataLayouts/opt_similar.jl @@ -8,7 +8,7 @@ using ClimaCore.DataLayouts using ClimaCore: DataLayouts, Geometry import ClimaComms using StaticArrays: SMatrix -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using JET function test_similar!(data) diff --git a/test/DataLayouts/unit_copyto.jl b/test/DataLayouts/unit_copyto.jl index 90a5c53d0b..252f28ba01 100644 --- a/test/DataLayouts/unit_copyto.jl +++ b/test/DataLayouts/unit_copyto.jl @@ -7,7 +7,7 @@ using ClimaCore.DataLayouts import ClimaCore.Geometry import ClimaComms using StaticArrays -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import Random Random.seed!(1234) diff --git a/test/DataLayouts/unit_fill.jl b/test/DataLayouts/unit_fill.jl index a25872e90f..ffa6781c6e 100644 --- a/test/DataLayouts/unit_fill.jl +++ b/test/DataLayouts/unit_fill.jl @@ -5,7 +5,7 @@ using Revise; include(joinpath("test", "DataLayouts", "unit_fill.jl")) using Test using ClimaCore.DataLayouts import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends function test_fill!(data, vals::Tuple{<:Any, <:Any}) fill!(data, vals) diff --git a/test/DataLayouts/unit_mapreduce.jl b/test/DataLayouts/unit_mapreduce.jl index 6b4512b23c..e018e7ee2a 100644 --- a/test/DataLayouts/unit_mapreduce.jl +++ b/test/DataLayouts/unit_mapreduce.jl @@ -7,7 +7,7 @@ using ClimaCore.DataLayouts using ClimaCore import ClimaComms import Random -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends device = ClimaComms.device() context = ClimaComms.context(device) diff --git a/test/DataLayouts/unit_ndims.jl b/test/DataLayouts/unit_ndims.jl index 3a774122f4..a8693a3618 100644 --- a/test/DataLayouts/unit_ndims.jl +++ b/test/DataLayouts/unit_ndims.jl @@ -5,7 +5,7 @@ using Revise; include(joinpath("test", "DataLayouts", "unit_ndims.jl")) using Test using ClimaCore.DataLayouts import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends @testset "Base.ndims" begin device = ClimaComms.device() diff --git a/test/Fields/convergence_field_integrals.jl b/test/Fields/convergence_field_integrals.jl index 4dcf0c1842..436a24aaea 100644 --- a/test/Fields/convergence_field_integrals.jl +++ b/test/Fields/convergence_field_integrals.jl @@ -7,7 +7,7 @@ using Test using JET using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using OrderedCollections using StaticArrays, IntervalSets import ClimaCore diff --git a/test/Fields/reduction_cuda.jl b/test/Fields/reduction_cuda.jl index 7e2f808ef9..aa278f3370 100644 --- a/test/Fields/reduction_cuda.jl +++ b/test/Fields/reduction_cuda.jl @@ -1,6 +1,6 @@ using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Statistics using LinearAlgebra diff --git a/test/Fields/reduction_cuda_distributed.jl b/test/Fields/reduction_cuda_distributed.jl index 091669ce3c..1d5b55dcf7 100644 --- a/test/Fields/reduction_cuda_distributed.jl +++ b/test/Fields/reduction_cuda_distributed.jl @@ -1,6 +1,6 @@ using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Statistics using LinearAlgebra using Logging diff --git a/test/Fields/unit_field.jl b/test/Fields/unit_field.jl index 6cf7a599c9..a4c5e20101 100644 --- a/test/Fields/unit_field.jl +++ b/test/Fields/unit_field.jl @@ -7,7 +7,7 @@ using Test using JET using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using OrderedCollections using StaticArrays, IntervalSets import ClimaCore diff --git a/test/Fields/utils_field_multi_broadcast_fusion.jl b/test/Fields/utils_field_multi_broadcast_fusion.jl index 58b55f99ae..4ea34802b1 100644 --- a/test/Fields/utils_field_multi_broadcast_fusion.jl +++ b/test/Fields/utils_field_multi_broadcast_fusion.jl @@ -9,7 +9,7 @@ using JET using BenchmarkTools using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using OrderedCollections using StaticArrays, IntervalSets import ClimaCore diff --git a/test/InputOutput/hybrid3dcubedsphere.jl b/test/InputOutput/hybrid3dcubedsphere.jl index 748870b699..aff4ecefa3 100644 --- a/test/InputOutput/hybrid3dcubedsphere.jl +++ b/test/InputOutput/hybrid3dcubedsphere.jl @@ -12,7 +12,7 @@ using ClimaCore: InputOutput using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends const comms_ctx = ClimaComms.context(ClimaComms.CPUSingleThreaded()) pid, nprocs = ClimaComms.init(comms_ctx) filename = ClimaComms.bcast(comms_ctx, tempname(pwd())) diff --git a/test/InputOutput/spectralelement2d.jl b/test/InputOutput/spectralelement2d.jl index 4dfb6048f8..b095ba5003 100644 --- a/test/InputOutput/spectralelement2d.jl +++ b/test/InputOutput/spectralelement2d.jl @@ -1,6 +1,6 @@ using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using LinearAlgebra import ClimaCore import ClimaCore: diff --git a/test/Limiters/distributed/dlimiter.jl b/test/Limiters/distributed/dlimiter.jl index 8eca406f45..79a26e1193 100644 --- a/test/Limiters/distributed/dlimiter.jl +++ b/test/Limiters/distributed/dlimiter.jl @@ -13,7 +13,7 @@ using ClimaCore: slab using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends const context = ClimaComms.MPICommsContext() ClimaComms.init(context) diff --git a/test/Limiters/limiter.jl b/test/Limiters/limiter.jl index 8b679420e2..34ae0605ef 100644 --- a/test/Limiters/limiter.jl +++ b/test/Limiters/limiter.jl @@ -3,7 +3,7 @@ julia --project=test using Revise; include(joinpath("test", "Limiters", "limiter.jl")) =# using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using ClimaCore: DataLayouts, Fields, diff --git a/test/MatrixFields/field2arrays.jl b/test/MatrixFields/field2arrays.jl index c12de65d12..71b6c3ad8a 100644 --- a/test/MatrixFields/field2arrays.jl +++ b/test/MatrixFields/field2arrays.jl @@ -3,7 +3,7 @@ using JET import ClimaCore: Geometry, Domains, Meshes, Spaces, Fields, MatrixFields import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends @testset "field2arrays Unit Tests" begin FT = Float64 diff --git a/test/MatrixFields/gpu_compat_bidiag_matrix_row.jl b/test/MatrixFields/gpu_compat_bidiag_matrix_row.jl index bbdfa5247a..9f42be30e1 100644 --- a/test/MatrixFields/gpu_compat_bidiag_matrix_row.jl +++ b/test/MatrixFields/gpu_compat_bidiag_matrix_row.jl @@ -3,7 +3,7 @@ using Revise; include(joinpath("test", "MatrixFields", "gpu_compat_bidiag_matrix =# import ClimaCore import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends if !(@isdefined(TU)) include( joinpath( diff --git a/test/MatrixFields/matrix_multiplication_recursion.jl b/test/MatrixFields/matrix_multiplication_recursion.jl index 2e504f33d0..945092470d 100644 --- a/test/MatrixFields/matrix_multiplication_recursion.jl +++ b/test/MatrixFields/matrix_multiplication_recursion.jl @@ -13,7 +13,7 @@ import .TestUtilities as TU import ClimaCore: Spaces, Geometry, Operators, Fields, MatrixFields import ClimaCore.MatrixFields: ⋅ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends # Set up operators const FT = Float64 diff --git a/test/Operators/finitedifference/benchmark_examples.jl b/test/Operators/finitedifference/benchmark_examples.jl index 5db78ade4b..74e393039f 100644 --- a/test/Operators/finitedifference/benchmark_examples.jl +++ b/test/Operators/finitedifference/benchmark_examples.jl @@ -4,7 +4,7 @@ using Revise; include(joinpath("test", "Operators", "finitedifference", "benchma =# import ClimaCore using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using BenchmarkTools @isdefined(TU) || include( joinpath(pkgdir(ClimaCore), "test", "TestUtilities", "TestUtilities.jl"), diff --git a/test/Operators/finitedifference/benchmark_stencils_utils.jl b/test/Operators/finitedifference/benchmark_stencils_utils.jl index ca20254dc3..de64f50038 100644 --- a/test/Operators/finitedifference/benchmark_stencils_utils.jl +++ b/test/Operators/finitedifference/benchmark_stencils_utils.jl @@ -1,7 +1,7 @@ #! format: off using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using StaticArrays, IntervalSets, LinearAlgebra import BenchmarkTools import StatsBase diff --git a/test/Operators/finitedifference/convergence_advection_diffusion1d.jl b/test/Operators/finitedifference/convergence_advection_diffusion1d.jl index f67b665bc3..ac1e06bb4a 100644 --- a/test/Operators/finitedifference/convergence_advection_diffusion1d.jl +++ b/test/Operators/finitedifference/convergence_advection_diffusion1d.jl @@ -1,5 +1,5 @@ import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Test using LinearAlgebra using OrdinaryDiffEq: ODEProblem, solve, SSPRK33, Tsit5 diff --git a/test/Operators/finitedifference/convergence_column.jl b/test/Operators/finitedifference/convergence_column.jl index 53ed67aee2..47fab1e4bc 100644 --- a/test/Operators/finitedifference/convergence_column.jl +++ b/test/Operators/finitedifference/convergence_column.jl @@ -2,7 +2,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: slab, Domains, Meshes, Topologies, Spaces, Fields, Operators import ClimaCore.Domains: Geometry diff --git a/test/Operators/finitedifference/linsolve.jl b/test/Operators/finitedifference/linsolve.jl index 2c3f692c09..1bf56c6712 100644 --- a/test/Operators/finitedifference/linsolve.jl +++ b/test/Operators/finitedifference/linsolve.jl @@ -4,7 +4,7 @@ using Revise; include(joinpath("test", "Operators", "finitedifference", "linsolv =# using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore using ClimaCore: diff --git a/test/Operators/finitedifference/opt.jl b/test/Operators/finitedifference/opt.jl index 33d2cc6f68..511ea89024 100644 --- a/test/Operators/finitedifference/opt.jl +++ b/test/Operators/finitedifference/opt.jl @@ -5,7 +5,7 @@ using IntervalSets import ClimaCore import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Domains, Meshes, Spaces, Fields, Operators import ClimaCore.Domains: Geometry diff --git a/test/Operators/finitedifference/opt_examples.jl b/test/Operators/finitedifference/opt_examples.jl index e2cac97405..ac67ceac49 100644 --- a/test/Operators/finitedifference/opt_examples.jl +++ b/test/Operators/finitedifference/opt_examples.jl @@ -1,6 +1,6 @@ import ClimaCore using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using BenchmarkTools @isdefined(TU) || include( joinpath(pkgdir(ClimaCore), "test", "TestUtilities", "TestUtilities.jl"), diff --git a/test/Operators/finitedifference/unit_column.jl b/test/Operators/finitedifference/unit_column.jl index bb4b13bf4f..04c91b83d1 100644 --- a/test/Operators/finitedifference/unit_column.jl +++ b/test/Operators/finitedifference/unit_column.jl @@ -2,7 +2,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: slab, Domains, Meshes, Topologies, Spaces, Fields, Operators import ClimaCore.Domains: Geometry diff --git a/test/Operators/finitedifference/wfact.jl b/test/Operators/finitedifference/wfact.jl index 7bc4ac29c4..0419812636 100644 --- a/test/Operators/finitedifference/wfact.jl +++ b/test/Operators/finitedifference/wfact.jl @@ -4,7 +4,7 @@ using Revise; include(joinpath("test", "Operators", "finitedifference", "wfact.j =# using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore using ClimaCore: diff --git a/test/Operators/hybrid/extruded_3dbox_cuda.jl b/test/Operators/hybrid/extruded_3dbox_cuda.jl index 7983f53962..3097a62916 100644 --- a/test/Operators/hybrid/extruded_3dbox_cuda.jl +++ b/test/Operators/hybrid/extruded_3dbox_cuda.jl @@ -4,7 +4,7 @@ using Revise; include(joinpath("test", "Spaces", "extruded_3dbox_cuda.jl")) =# using LinearAlgebra, IntervalSets using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using ClimaCore import ClimaCore: Domains, diff --git a/test/Operators/hybrid/extruded_sphere_cuda.jl b/test/Operators/hybrid/extruded_sphere_cuda.jl index 7dfa78d649..285b48e72e 100644 --- a/test/Operators/hybrid/extruded_sphere_cuda.jl +++ b/test/Operators/hybrid/extruded_sphere_cuda.jl @@ -4,7 +4,7 @@ using Revise; include(joinpath("test", "Spaces", "extruded_sphere_cuda.jl")) =# using LinearAlgebra, IntervalSets using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using ClimaCore import ClimaCore: Domains, diff --git a/test/Operators/hybrid/utils_2d.jl b/test/Operators/hybrid/utils_2d.jl index 8ff92e7cdc..7e1043618d 100644 --- a/test/Operators/hybrid/utils_2d.jl +++ b/test/Operators/hybrid/utils_2d.jl @@ -16,7 +16,7 @@ using Test using StaticArrays, IntervalSets, LinearAlgebra import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: ClimaCore, diff --git a/test/Operators/hybrid/utils_3d.jl b/test/Operators/hybrid/utils_3d.jl index 89693007e4..cb2fed6a84 100644 --- a/test/Operators/hybrid/utils_3d.jl +++ b/test/Operators/hybrid/utils_3d.jl @@ -1,6 +1,6 @@ using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using StaticArrays, IntervalSets, LinearAlgebra import ClimaCore: diff --git a/test/Operators/hybrid/utils_cuda.jl b/test/Operators/hybrid/utils_cuda.jl index 695cc29533..216c28d7c7 100644 --- a/test/Operators/hybrid/utils_cuda.jl +++ b/test/Operators/hybrid/utils_cuda.jl @@ -1,7 +1,7 @@ using Test using StaticArrays using ClimaComms, ClimaCore -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Geometry, Fields, diff --git a/test/Operators/integrals.jl b/test/Operators/integrals.jl index decc073622..1ab22316b3 100644 --- a/test/Operators/integrals.jl +++ b/test/Operators/integrals.jl @@ -2,7 +2,7 @@ using Test using JET import CUDA # explicitly required due to JET import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore import ClimaCore: Spaces, Fields, Operators import ClimaCore.RecursiveApply: rmax diff --git a/test/Operators/spectralelement/benchmark_utils.jl b/test/Operators/spectralelement/benchmark_utils.jl index 4415f42cfe..9654b39595 100644 --- a/test/Operators/spectralelement/benchmark_utils.jl +++ b/test/Operators/spectralelement/benchmark_utils.jl @@ -16,7 +16,7 @@ import ClimaCore.Quadratures as Quadratures import ClimaCore.Fields as Fields import ClimaCore as CC import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using CUDA using ArgParse diff --git a/test/Operators/spectralelement/rectilinear.jl b/test/Operators/spectralelement/rectilinear.jl index 2fcfdb97e0..5923ea04cc 100644 --- a/test/Operators/spectralelement/rectilinear.jl +++ b/test/Operators/spectralelement/rectilinear.jl @@ -1,7 +1,7 @@ using Test using StaticArrays using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore.DataLayouts: IJFH, VF import ClimaCore: Geometry, diff --git a/test/Operators/spectralelement/rectilinear_cuda.jl b/test/Operators/spectralelement/rectilinear_cuda.jl index 9ef4c71a7b..b37a65706e 100644 --- a/test/Operators/spectralelement/rectilinear_cuda.jl +++ b/test/Operators/spectralelement/rectilinear_cuda.jl @@ -1,7 +1,7 @@ using Test using StaticArrays using ClimaComms, ClimaCore -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Geometry, Fields, diff --git a/test/Operators/spectralelement/sphere_geometry_distributed.jl b/test/Operators/spectralelement/sphere_geometry_distributed.jl index 97fa9f85e5..ffca538535 100644 --- a/test/Operators/spectralelement/sphere_geometry_distributed.jl +++ b/test/Operators/spectralelement/sphere_geometry_distributed.jl @@ -14,7 +14,7 @@ using Test using StaticArrays, LinearAlgebra using Logging using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends function rotational_field(space, α0 = 45.0) coords = Fields.coordinate_field(space) diff --git a/test/Operators/unit_thomas_algorithm.jl b/test/Operators/unit_thomas_algorithm.jl index 3d081ae853..40f381f557 100644 --- a/test/Operators/unit_thomas_algorithm.jl +++ b/test/Operators/unit_thomas_algorithm.jl @@ -8,7 +8,7 @@ import LinearAlgebra: Tridiagonal, norm import ClimaCore import ClimaCore: Geometry, Spaces, Fields, Operators import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends include( joinpath(pkgdir(ClimaCore), "test", "TestUtilities", "TestUtilities.jl"), diff --git a/test/Remapping/distributed_remapping.jl b/test/Remapping/distributed_remapping.jl index 0748934dc4..0be326136a 100644 --- a/test/Remapping/distributed_remapping.jl +++ b/test/Remapping/distributed_remapping.jl @@ -14,7 +14,7 @@ import ClimaCore: Remapping, Hypsography using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends const context = ClimaComms.context() const pid, nprocs = ClimaComms.init(context) const device = ClimaComms.device() diff --git a/test/Spaces/ddss1.jl b/test/Spaces/ddss1.jl index 70baa79eb8..3f8b4bc345 100644 --- a/test/Spaces/ddss1.jl +++ b/test/Spaces/ddss1.jl @@ -17,7 +17,7 @@ import ClimaCore: DataLayouts using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends const device = ClimaComms.device() const context = ClimaComms.SingletonCommsContext(device) diff --git a/test/Spaces/ddss1_cs.jl b/test/Spaces/ddss1_cs.jl index 89462bdcf6..e043571c16 100644 --- a/test/Spaces/ddss1_cs.jl +++ b/test/Spaces/ddss1_cs.jl @@ -1,6 +1,6 @@ using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Domains, diff --git a/test/Spaces/distributed/ddss_setup.jl b/test/Spaces/distributed/ddss_setup.jl index cede7f3ad9..7b2660638e 100644 --- a/test/Spaces/distributed/ddss_setup.jl +++ b/test/Spaces/distributed/ddss_setup.jl @@ -12,7 +12,7 @@ import ClimaCore: Quadratures using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends const context = ClimaComms.MPICommsContext() const pid, nprocs = ClimaComms.init(context) diff --git a/test/Spaces/distributed/gather4.jl b/test/Spaces/distributed/gather4.jl index 8fae49b9e6..a556394cbb 100644 --- a/test/Spaces/distributed/gather4.jl +++ b/test/Spaces/distributed/gather4.jl @@ -15,7 +15,7 @@ import ClimaCore: using Logging using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends const comms_ctx = ClimaComms.MPICommsContext() const pid, nprocs = ClimaComms.init(comms_ctx) diff --git a/test/Spaces/distributed_cuda/ddss2.jl b/test/Spaces/distributed_cuda/ddss2.jl index d138034d57..499f86d95c 100644 --- a/test/Spaces/distributed_cuda/ddss2.jl +++ b/test/Spaces/distributed_cuda/ddss2.jl @@ -12,7 +12,7 @@ import ClimaCore: Quadratures using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends # initializing MPI const device = ClimaComms.device() diff --git a/test/Spaces/distributed_cuda/ddss3.jl b/test/Spaces/distributed_cuda/ddss3.jl index 2df6ef12a0..68fc3819a0 100644 --- a/test/Spaces/distributed_cuda/ddss3.jl +++ b/test/Spaces/distributed_cuda/ddss3.jl @@ -12,7 +12,7 @@ import ClimaCore: Quadratures using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends # initializing MPI const device = ClimaComms.device() diff --git a/test/Spaces/distributed_cuda/ddss4.jl b/test/Spaces/distributed_cuda/ddss4.jl index d129a6f263..3b9e36028e 100644 --- a/test/Spaces/distributed_cuda/ddss4.jl +++ b/test/Spaces/distributed_cuda/ddss4.jl @@ -12,7 +12,7 @@ import ClimaCore: Quadratures using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends # initializing MPI const device = ClimaComms.device() diff --git a/test/Spaces/distributed_cuda/ddss_ne32_cs.jl b/test/Spaces/distributed_cuda/ddss_ne32_cs.jl index 432e195255..d163d73996 100644 --- a/test/Spaces/distributed_cuda/ddss_ne32_cs.jl +++ b/test/Spaces/distributed_cuda/ddss_ne32_cs.jl @@ -1,6 +1,6 @@ using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Domains, Fields, diff --git a/test/Spaces/distributed_cuda/space_construction.jl b/test/Spaces/distributed_cuda/space_construction.jl index 5ec9849926..222eae6ddd 100644 --- a/test/Spaces/distributed_cuda/space_construction.jl +++ b/test/Spaces/distributed_cuda/space_construction.jl @@ -1,7 +1,7 @@ using Logging using Test using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: Domains, diff --git a/test/Spaces/extruded_cuda.jl b/test/Spaces/extruded_cuda.jl index ef1766a6f0..f57881898d 100644 --- a/test/Spaces/extruded_cuda.jl +++ b/test/Spaces/extruded_cuda.jl @@ -4,7 +4,7 @@ using Revise; include(joinpath("test", "Spaces", "extruded_cuda.jl")) =# using LinearAlgebra, IntervalSets using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using ClimaComms: SingletonCommsContext import ClimaCore diff --git a/test/Spaces/opt_spaces.jl b/test/Spaces/opt_spaces.jl index fe7739d728..f75148b73f 100644 --- a/test/Spaces/opt_spaces.jl +++ b/test/Spaces/opt_spaces.jl @@ -10,7 +10,7 @@ include( ) import .TestUtilities as TU import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using JET function test_n_failures(n_allowed, f::F, context) where {F} diff --git a/test/Spaces/point_cuda.jl b/test/Spaces/point_cuda.jl index f55d7b5276..ef8786c2ac 100644 --- a/test/Spaces/point_cuda.jl +++ b/test/Spaces/point_cuda.jl @@ -1,7 +1,7 @@ import ClimaCore import ClimaCore: Domains, Topologies, Meshes, Spaces, Geometry, column, Fields import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends using Test compare(cpu, gpu) = all(parent(cpu) .≈ Array(parent(gpu))) diff --git a/test/Spaces/unit_spaces.jl b/test/Spaces/unit_spaces.jl index dee58809ee..da335d3362 100644 --- a/test/Spaces/unit_spaces.jl +++ b/test/Spaces/unit_spaces.jl @@ -6,7 +6,7 @@ using Test using ClimaComms using StaticArrays, IntervalSets, LinearAlgebra using Adapt -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends import ClimaCore: slab, diff --git a/test/Topologies/dtopo4.jl b/test/Topologies/dtopo4.jl index 0bbc4afdca..a53545b0ef 100644 --- a/test/Topologies/dtopo4.jl +++ b/test/Topologies/dtopo4.jl @@ -6,7 +6,7 @@ import ClimaCore: Domains, Fields, Geometry, Meshes, Operators, Spaces, Topologies using ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends comms_ctx = ClimaComms.MPICommsContext() pid, nprocs = ClimaComms.init(comms_ctx) diff --git a/test/deprecations.jl b/test/deprecations.jl index b52ac9106f..4f0b7387b7 100644 --- a/test/deprecations.jl +++ b/test/deprecations.jl @@ -10,7 +10,7 @@ import ClimaCore.Spaces: FiniteDifferenceSpace import ClimaCore.Grids: FiniteDifferenceGrid import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends @testset "Deprecations" begin FT = Float64 diff --git a/test/runtests.jl b/test/runtests.jl index 60f41d4fe4..5a62330054 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -95,7 +95,7 @@ UnitTest("Fields - CUDA mapreduce" ,"Fields/reduction_cuda.jl";m err = validate_tests(unit_tests; test_path = @__DIR__) import ClimaComms -ClimaComms.@import_required_backends +@static pkgversion(ClimaComms) >= v"0.6" && ClimaComms.@import_required_backends filter!( test -> !(