Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of method redefinition warnings during precompile stage #538

Merged
merged 4 commits into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 24 additions & 34 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "0.8.10"

[[BinaryProvider]]
deps = ["Libdl", "Logging", "SHA"]
git-tree-sha1 = "c7361ce8a2129f20b0e05a89f7070820cfed6648"
deps = ["Libdl", "SHA"]
git-tree-sha1 = "5b08ed6036d9d3f0ee6369410b830f8873d4024c"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.6"
version = "0.5.8"

[[CEnum]]
git-tree-sha1 = "62847acab40e6855a9b5905ccb99c2b5cf6b3ebb"
Expand All @@ -38,12 +38,6 @@ git-tree-sha1 = "90eddf050a4d4b35520f87b9ba82302643706a1e"
uuid = "179af706-886a-5703-950a-314cd64e0468"
version = "0.0.3"

[[CSTParser]]
deps = ["Tokenize"]
git-tree-sha1 = "c69698c3d4a7255bc1b4bc2afc09f59db910243b"
uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f"
version = "0.6.2"

[[CUDAapi]]
deps = ["Libdl", "Logging"]
git-tree-sha1 = "9b2b4b71d6b7f946c9689bb4dea03ff92e3c7091"
Expand All @@ -65,7 +59,9 @@ uuid = "be33ccc6-a3ff-5ff2-a52e-74243cff1e17"
version = "2.3.1"

[[Cassette]]
git-tree-sha1 = "da85d135b6048d3e78603e277cf9a4609f7e0673"
git-tree-sha1 = "ad9d2ab6452a15840483741ebf10ffae4688cf28"
repo-rev = "master"
repo-url = "https://github.com/jrevels/Cassette.jl.git"
uuid = "7057c7e9-c182-5462-911a-8362d720325c"
version = "0.2.6"

Expand Down Expand Up @@ -94,10 +90,9 @@ uuid = "a9693cdc-2bc8-5703-a9cd-1da358117377"
version = "0.1.0"

[[Crayons]]
deps = ["Test"]
git-tree-sha1 = "f621b8ef51fd2004c7cf157ea47f027fdeac5523"
git-tree-sha1 = "cb7a62895da739fe5bb43f1a26d4292baf4b3dc0"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.0.0"
version = "4.0.1"

[[CuArrays]]
deps = ["AbstractFFTs", "Adapt", "CUDAapi", "CUDAdrv", "CUDAnative", "GPUArrays", "LinearAlgebra", "MacroTools", "NNlib", "Printf", "Random", "Requires", "SparseArrays", "TimerOutputs"]
Expand All @@ -112,9 +107,9 @@ version = "1.1.0"

[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "2103e504f427e54ffa19af9ada225733a21f951f"
git-tree-sha1 = "a1b652fb77ae8ca7ea328fa7ba5aa151036e5c10"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.17.3"
version = "0.17.6"

[[Dates]]
deps = ["Printf"]
Expand All @@ -136,21 +131,21 @@ version = "1.0.0"

[[FileIO]]
deps = ["Pkg"]
git-tree-sha1 = "351f001a78aa1b7ad2696e386e110b5abd071c71"
git-tree-sha1 = "6c976460b85527d22d979682222d36767d95e27f"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.0.7"
version = "1.1.0"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "8fba6ddaf66b45dec830233cea0aae43eb1261ad"
git-tree-sha1 = "de38b0253ade98340fabaf220f368f6144541938"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.6.4"
version = "0.7.4"

[[GPUArrays]]
deps = ["Adapt", "FFTW", "FillArrays", "LinearAlgebra", "Printf", "Random", "Serialization", "StaticArrays", "Test"]
git-tree-sha1 = "77e27264276fe97a7e7fb928bf8999a145abc018"
deps = ["Adapt", "FFTW", "FillArrays", "LinearAlgebra", "Printf", "Random", "Serialization", "Test"]
git-tree-sha1 = "8d74ced24448c52b539a23d107bd2424ee139c0f"
uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
version = "1.0.3"
version = "1.0.4"

[[GPUifyLoops]]
deps = ["Cassette", "Requires", "StaticArrays"]
Expand All @@ -176,9 +171,9 @@ version = "0.21.0"

[[LLVM]]
deps = ["CEnum", "Libdl", "Printf", "Unicode"]
git-tree-sha1 = "3680605a77f20bec59eea00389eb7aafe973abbb"
git-tree-sha1 = "74fe444b8b6d1ac01d639b2f9eaf395bcc2e24fc"
uuid = "929cbde3-209d-540e-8aea-75f648917ca0"
version = "1.3.1"
version = "1.3.2"

[[LibGit2]]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
Expand All @@ -194,10 +189,10 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[MacroTools]]
deps = ["CSTParser", "Compat", "DataStructures", "Test", "Tokenize"]
git-tree-sha1 = "d6e9dedb8c92c3465575442da456aec15a89ff76"
deps = ["Compat", "DataStructures", "Test"]
git-tree-sha1 = "82921f0e3bde6aebb8e524efc20f4042373c0c06"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.1"
version = "0.5.2"

[[Markdown]]
deps = ["Base64"]
Expand Down Expand Up @@ -237,9 +232,9 @@ version = "1.1.0"

[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "ef0af6c8601db18c282d092ccbd2f01f3f0cd70b"
git-tree-sha1 = "0139ba59ce9bc680e2925aec5b7db79065d60556"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.7"
version = "0.3.10"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
Expand Down Expand Up @@ -306,11 +301,6 @@ git-tree-sha1 = "b80671c06f8f8bae08c55d67b5ce292c5ae2660c"
uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f"
version = "0.5.0"

[[Tokenize]]
git-tree-sha1 = "dfcdbbfb2d0370716c815cbd6f8a364efb6f42cf"
uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624"
version = "0.5.6"

[[TranscodingStreams]]
deps = ["Random", "Test"]
git-tree-sha1 = "7c53c35547de1c5b9d46a4797cf6d8253807108c"
Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
CUDAapi = "3895d2a7-ec45-59b8-82bb-cfc6a382f9b3"
CUDAdrv = "c5f51814-7f29-56b8-a69c-e4d8f6be1fde"
CUDAnative = "be33ccc6-a3ff-5ff2-a52e-74243cff1e17"
Cassette = "7057c7e9-c182-5462-911a-8362d720325c"
CuArrays = "3a865a2d-5b23-5a0f-bc46-62713ec82fae"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
Expand Down
5 changes: 0 additions & 5 deletions src/TurbulenceClosures/closure_tuples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,3 @@ function calculate_diffusivities!(Ks, arch, grid, closures::Tuple, args...)
end
return nothing
end

TurbulentDiffusivities(arch::AbstractArchitecture, grid::AbstractGrid, tracers, closures::Tuple) =
Tuple(TurbulentDiffusivities(arch, grid, tracers, closure) for closure in closures)

with_tracers(tracers, closures::Tuple) = Tuple(with_tracers(tracers, closure) for closure in closures)
12 changes: 6 additions & 6 deletions src/coriolis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If `f` is not specified, it is calculated from `rotation_rate` and
Also called `FPlane`, after the "f-plane" approximation for the local effect of
Earth's rotation in a planar coordinate system tangent to the Earth's surface.
"""
function FPlane(FT=Float64; f=nothing, rotation_rate=nothing, latitude=nothing)
function FPlane(FT::DataType=Float64; f=nothing, rotation_rate=nothing, latitude=nothing)

if f == nothing && rotation_rate != nothing && latitude != nothing
return FPlane{FT}(2rotation_rate*sind(latitude))
Expand Down Expand Up @@ -66,24 +66,24 @@ struct BetaPlane{T} <: AbstractRotation
end

"""
BetaPlane([T=Float64;] f₀=nothing, β=nothing,
BetaPlane([T=Float64;] f₀=nothing, β=nothing,
rotation_rate=nothing, latitude=nothing, radius=nothing)

A parameter object for meridionally increasing Coriolis parameter (`f = f₀ + βy`).

The user may specify both `f₀` and `β`, or the three parameters
`rotation_rate`, `latitude`, and `radius` that specify the rotation rate and radius
`rotation_rate`, `latitude`, and `radius` that specify the rotation rate and radius
of a planet, and the central latitude at which the `β`-plane approximation is to be made.
"""
function BetaPlane(T=Float64; f₀=nothing, β=nothing,
function BetaPlane(T=Float64; f₀=nothing, β=nothing,
rotation_rate=nothing, latitude=nothing, radius=nothing)

f_and_β = f₀ != nothing && β != nothing
planet_parameters = rotation_rate != nothing && latitude != nothing && radius != nothing

(f_and_β && all(Tuple(p === nothing for p in (rotation_rate, latitude, radius)))) ||
(f_and_β && all(Tuple(p === nothing for p in (rotation_rate, latitude, radius)))) ||
(planet_parameters && all(Tuple(p === nothing for p in (f₀, β)))) ||
throw(ArgumentError("Either both keywords f₀ and β must be specified,
throw(ArgumentError("Either both keywords f₀ and β must be specified,
*or* all of rotation_rate, latitude, and radius."))

if planet_parameters
Expand Down