Skip to content

Commit

Permalink
(0.86.0) Removes all support for <1.9 Julia versions (#3190)
Browse files Browse the repository at this point in the history
* Update Julia version

* Specify minimum Julia version requirement

* Update minimum Julia version requirement

* Remove Julia version warning

* Remove problem of incompatibility between 1.7 and 1.8

* Update field.jl

* Update field.jl

* Apply suggestions from code review

* Update README.md

Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>

* Bumping up a minor release

---------

Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
  • Loading branch information
iuryt and navidcy authored Jul 18, 2023
1 parent 826bae6 commit 216d57a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Oceananigans"
uuid = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
authors = ["Climate Modeling Alliance and contributors"]
version = "0.85.0"
version = "0.86.0"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down Expand Up @@ -55,7 +55,7 @@ PencilFFTs = "0.13.5, 0.14, 0.15"
Rotations = "1.0"
SeawaterPolynomials = "0.3.2"
StructArrays = "0.4, 0.5, 0.6"
julia = "1.6"
julia = "1.9"

[extras]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Oceananigans.jl is developed by the [Climate Modeling Alliance](https://clima.ca

Oceananigans is a [registered Julia package](https://julialang.org/packages/). So to install it,

1. [Download Julia](https://julialang.org/downloads/).
1. [Download Julia](https://julialang.org/downloads/) (version 1.9 or later).

2. Launch Julia and type

Expand Down
5 changes: 2 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ julia> using Pkg
julia> Pkg.add("Oceananigans")
```

!!! compat "Julia 1.6 is required; Julia 1.9 or newer is suggested"
The latest version of Oceananigans strongly suggests _at least_ Julia 1.9 or later to run.
While most scripts will run on Julia 1.6, 1.7, or 1.8, Oceananigans is continuously tested _only_ on Julia 1.9.
!!! compat "Julia 1.9 is required"
Oceananigans requires Julia 1.9 or later.

If you're [new to Julia](https://docs.julialang.org/en/v1/manual/getting-started/) and its [wonderful `Pkg` manager](https://docs.julialang.org/en/v1/stdlib/Pkg/), the [Oceananigans wiki](https://github.com/CliMA/Oceananigans.jl/wiki) provides [more detailed installation instructions](https://github.com/CliMA/Oceananigans.jl/wiki/Installation-and-getting-started-with-Oceananigans).

Expand Down
11 changes: 4 additions & 7 deletions src/Fields/field.jl
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,10 @@ const MinimumReduction = typeof(Base.minimum!)
const AllReduction = typeof(Base.all!)
const AnyReduction = typeof(Base.any!)

check_version_larger_than_7() = VERSION.minor > 7

initialize_reduced_field!(::SumReduction, f, r::ReducedField, c) = check_version_larger_than_7() ? Base.initarray!(interior(r), f, Base.add_sum, true, interior(c)) : Base.initarray!(interior(r), Base.add_sum, true, interior(c))
initialize_reduced_field!(::ProdReduction, f, r::ReducedField, c) = check_version_larger_than_7() ? Base.initarray!(interior(r), f, Base.mul_prod, true, interior(c)) : Base.initarray!(interior(r), Base.mul_prod, true, interior(c))
initialize_reduced_field!(::AllReduction, f, r::ReducedField, c) = check_version_larger_than_7() ? Base.initarray!(interior(r), f, &, true, interior(c)) : Base.initarray!(interior(r), &, true, interior(c))
initialize_reduced_field!(::AnyReduction, f, r::ReducedField, c) = check_version_larger_than_7() ? Base.initarray!(interior(r), f, |, true, interior(c)) : Base.initarray!(interior(r), |, true, interior(c))

initialize_reduced_field!(::SumReduction, f, r::ReducedField, c) = Base.initarray!(interior(r), f, Base.add_sum, true, interior(c))
initialize_reduced_field!(::ProdReduction, f, r::ReducedField, c) = Base.initarray!(interior(r), f, Base.mul_prod, true, interior(c))
initialize_reduced_field!(::AllReduction, f, r::ReducedField, c) = Base.initarray!(interior(r), f, &, true, interior(c))
initialize_reduced_field!(::AnyReduction, f, r::ReducedField, c) = Base.initarray!(interior(r), f, |, true, interior(c))
initialize_reduced_field!(::MaximumReduction, f, r::ReducedField, c) = Base.mapfirst!(f, interior(r), interior(c))
initialize_reduced_field!(::MinimumReduction, f, r::ReducedField, c) = Base.mapfirst!(f, interior(r), interior(c))

Expand Down
4 changes: 0 additions & 4 deletions src/Oceananigans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ data-driven, ocean-flavored fluid dynamics on CPUs and GPUs.
"""
module Oceananigans

if VERSION < v"1.8"
@warn "Oceananigans is tested on Julia v1.8 and therefore it is strongly recommended you run Oceananigans on Julia v1.8 or newer."
end

export
# Architectures
CPU, GPU,
Expand Down

2 comments on commit 216d57a

@navidcy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/87707

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.86.0 -m "<description of version>" 216d57aabbb5b0df233e392a0c0748d42fb961a3
git push origin v0.86.0

Please sign in to comment.