From 7cce191116946dfecf642ddcec006e9ec9794aaf Mon Sep 17 00:00:00 2001 From: Simon Byrne Date: Thu, 24 Aug 2023 11:06:37 -0700 Subject: [PATCH] remove nvtx macro --- src/ClimaAtmos.jl | 1 - .../implicit/implicit_tendency.jl | 4 ++-- src/prognostic_equations/remaining_tendency.jl | 14 +++++++------- src/utils/nvtx.jl | 17 ----------------- 4 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 src/utils/nvtx.jl diff --git a/src/ClimaAtmos.jl b/src/ClimaAtmos.jl index 58095ab0de..93cf6aad32 100644 --- a/src/ClimaAtmos.jl +++ b/src/ClimaAtmos.jl @@ -8,7 +8,6 @@ import .Parameters as CAP include(joinpath("utils", "abbreviations.jl")) include(joinpath("utils", "common_spaces.jl")) include(joinpath("solver", "types.jl")) -include(joinpath("utils", "nvtx.jl")) include(joinpath("solver", "cli_options.jl")) include(joinpath("utils", "utilities.jl")) include(joinpath("utils", "debug_utils.jl")) diff --git a/src/prognostic_equations/implicit/implicit_tendency.jl b/src/prognostic_equations/implicit/implicit_tendency.jl index 2c2bada74f..2d9ae45170 100644 --- a/src/prognostic_equations/implicit/implicit_tendency.jl +++ b/src/prognostic_equations/implicit/implicit_tendency.jl @@ -6,9 +6,9 @@ import ClimaCore: Fields, Geometry function implicit_tendency!(Yₜ, Y, p, t) fill_with_nans!(p) - @nvtx "implicit tendency" color = colorant"yellow" begin + NVTX.@range "implicit tendency" color = colorant"yellow" begin Yₜ .= zero(eltype(Yₜ)) - @nvtx "precomputed quantities" color = colorant"orange" begin + NVTX.@range "precomputed quantities" color = colorant"orange" begin set_precomputed_quantities!(Y, p, t) end Fields.bycolumn(axes(Y.c)) do colidx diff --git a/src/prognostic_equations/remaining_tendency.jl b/src/prognostic_equations/remaining_tendency.jl index 9a7bd5c492..a4bc049319 100644 --- a/src/prognostic_equations/remaining_tendency.jl +++ b/src/prognostic_equations/remaining_tendency.jl @@ -1,24 +1,24 @@ function remaining_tendency!(Yₜ, Y, p, t) fill_with_nans!(p) - @nvtx "remaining tendency" color = colorant"yellow" begin + NVTX.@range "remaining tendency" color = colorant"yellow" begin Yₜ .= zero(eltype(Yₜ)) - @nvtx "precomputed quantities" color = colorant"orange" begin + NVTX.@range "precomputed quantities" color = colorant"orange" begin set_precomputed_quantities!(Y, p, t) end - @nvtx "horizontal" color = colorant"orange" begin + NVTX.@range "horizontal" color = colorant"orange" begin horizontal_advection_tendency!(Yₜ, Y, p, t) - @nvtx "hyperdiffusion tendency" color = colorant"yellow" begin + NVTX.@range "hyperdiffusion tendency" color = colorant"yellow" begin hyperdiffusion_tendency!(Yₜ, Y, p, t) end end - @nvtx "vertical" color = colorant"orange" begin + NVTX.@range "vertical" color = colorant"orange" begin explicit_vertical_advection_tendency!(Yₜ, Y, p, t) end - @nvtx "additional_tendency!" color = colorant"orange" begin + NVTX.@range "additional_tendency!" color = colorant"orange" begin additional_tendency!(Yₜ, Y, p, t) end - @nvtx "dss_remaining_tendency" color = colorant"blue" begin + NVTX.@range "dss_remaining_tendency" color = colorant"blue" begin dss!(Yₜ, p, t) end end diff --git a/src/utils/nvtx.jl b/src/utils/nvtx.jl deleted file mode 100644 index f65f961bfe..0000000000 --- a/src/utils/nvtx.jl +++ /dev/null @@ -1,17 +0,0 @@ -import ClimaComms -import NVTX -using Colors - -# for compatibility until we move everything into src: -macro nvtx(message, args...) - expr = args[end] - args = args[1:(end - 1)] - quote - NVTX.@range( - $message, - domain = NVTX.Domain(ClimaAtmos), - $(args...), - $(esc(expr)) - ) - end -end