From f5897b954683f04adafed4265bc9136b7fcb51ba Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Mon, 29 Apr 2024 12:33:10 -0700 Subject: [PATCH] Use ClimaComms.@time instead of @time For GPU compatibility --- experiments/standalone/Bucket/global_bucket_function.jl | 2 +- experiments/standalone/Bucket/global_bucket_staticmap.jl | 2 +- experiments/standalone/Bucket/global_bucket_temporalmap.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/experiments/standalone/Bucket/global_bucket_function.jl b/experiments/standalone/Bucket/global_bucket_function.jl index a06bc5107a..73e687fdd7 100644 --- a/experiments/standalone/Bucket/global_bucket_function.jl +++ b/experiments/standalone/Bucket/global_bucket_function.jl @@ -161,7 +161,7 @@ updatefunc = ClimaLand.make_update_drivers(bucket_atmos, bucket_rad) driver_cb = ClimaLand.DriverUpdateCallback(updateat, updatefunc) cb = SciMLBase.CallbackSet(driver_cb, saving_cb) -ClimaComms.@time sol = +ClimaComms.@time ClimaComms.device() sol = SciMLBase.solve(prob, ode_algo; dt = Δt, saveat = saveat, callback = cb); # Interpolate to grid diff --git a/experiments/standalone/Bucket/global_bucket_staticmap.jl b/experiments/standalone/Bucket/global_bucket_staticmap.jl index db563dab87..6fa53c3e38 100644 --- a/experiments/standalone/Bucket/global_bucket_staticmap.jl +++ b/experiments/standalone/Bucket/global_bucket_staticmap.jl @@ -176,7 +176,7 @@ updatefunc = ClimaLand.make_update_drivers(bucket_atmos, bucket_rad) driver_cb = ClimaLand.DriverUpdateCallback(updateat, updatefunc) cb = SciMLBase.CallbackSet(driver_cb, saving_cb) -@time sol = +ClimaComms.@time ClimaComms.device() sol = SciMLBase.solve(prob, ode_algo; dt = Δt, saveat = saveat, callback = cb); # Interpolate to grid diff --git a/experiments/standalone/Bucket/global_bucket_temporalmap.jl b/experiments/standalone/Bucket/global_bucket_temporalmap.jl index bb57ea885d..40ba67e060 100644 --- a/experiments/standalone/Bucket/global_bucket_temporalmap.jl +++ b/experiments/standalone/Bucket/global_bucket_temporalmap.jl @@ -194,7 +194,7 @@ prob, cb, saveat, saved_values = setup_prob(t0, tf, Δt); timestepper = CTS.RK4() ode_algo = CTS.ExplicitAlgorithm(timestepper) -@time sol = +ClimaComms.@time ClimaComms.device() sol = SciMLBase.solve(prob, ode_algo; dt = Δt, saveat = saveat, callback = cb) if PROFILING # Now that we compiled, solve again but collect profiling information