Skip to content

Commit

Permalink
Increase minimum supported Julia version to v1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
sloede committed Dec 19, 2024
1 parent bde0afc commit dd119ac
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 85 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
# - '~1.9.0-0' # including development versions
- '1.10'
# - '~1.10.0-0' # including development versions
# - 'nightly'
os:
- ubuntu-latest
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@ jobs:
- mpi
- threaded
include:
- version: '1.8'
os: ubuntu-latest
arch: x64
trixi_test: threaded_legacy
- version: '1.9'
- version: '1.11'
os: ubuntu-latest
arch: x64
trixi_test: threaded_legacy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
os:
- ubuntu-latest
arch:
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ for human readability.
- `LobattoLegendreBasis` and related datastructures made fully floating-type general,
enabling calculations with higher than double (`Float64`) precision ([#2128])

#### Changed

- The required Julia version is updated to v1.10.

## Changes when updating to v0.9 from v0.8.x

#### Added
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TriplotBase = "0.1"
TriplotRecipes = "0.1"
TrixiBase = "0.1.3"
UUIDs = "1.6"
julia = "1.8"
julia = "1.10"

[extras]
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ installation and postprocessing procedures. Its features include:
## Installation
If you have not yet installed Julia, please [follow the instructions for your
operating system](https://julialang.org/downloads/platform/). Trixi.jl works
with Julia v1.8 and newer. We recommend using the latest stable release of Julia.
with Julia v1.10 and newer. We recommend using the latest stable release of Julia.

### For users
Trixi.jl and its related tools are registered Julia packages. Hence, you
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ installation and postprocessing procedures. Its features include:
## Installation
If you have not yet installed Julia, please [follow the instructions for your
operating system](https://julialang.org/downloads/platform/). Trixi.jl works
with Julia v1.8 and newer. We recommend using the latest stable release of Julia.
with Julia v1.10 and newer. We recommend using the latest stable release of Julia.

### For users
Trixi.jl and its related tools are registered Julia packages. Hence, you
Expand Down
3 changes: 1 addition & 2 deletions docs/src/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ Julia compiles code to get good (C/Fortran-like) performance. At the same time,
Julia provides a dynamic environment and usually compiles code just before using
it. Over time, Julia has improved its caching infrastructure, allowing to store
and reuse more results from (pre-)compilation. This often results in an
increased time to install/update packages, in particular when updating
to Julia v1.8 or v1.9 from older versions.
increased time to install/update packages.

Some packages used together with [Trixi.jl](https://github.com/trixi-framework/Trixi.jl)
provide options to configure the amount of precompilation. For example,
Expand Down
10 changes: 2 additions & 8 deletions ext/TrixiConvexECOSExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
module TrixiConvexECOSExt

# Required for coefficient optimization in PERK scheme integrators
if isdefined(Base, :get_extension)
using Convex: MOI, solve!, Variable, minimize, evaluate
using ECOS: Optimizer
else
# Until Julia v1.9 is the minimum required version for Trixi.jl, we still support Requires.jl
using ..Convex: MOI, solve!, Variable, minimize, evaluate
using ..ECOS: Optimizer
end
using Convex: MOI, solve!, Variable, minimize, evaluate
using ECOS: Optimizer

# Use other necessary libraries
using LinearAlgebra: eigvals
Expand Down
7 changes: 1 addition & 6 deletions ext/TrixiMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
module TrixiMakieExt

# Required for visualization code
if isdefined(Base, :get_extension)
using Makie: Makie, GeometryBasics
else
# Until Julia v1.9 is the minimum required version for Trixi.jl, we still support Requires.jl
using ..Makie: Makie, GeometryBasics
end
using Makie: Makie, GeometryBasics

# Use all exported symbols to avoid having to rewrite `recipes_makie.jl`
using Trixi
Expand Down
7 changes: 1 addition & 6 deletions ext/TrixiNLsolveExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ module TrixiNLsolveExt

# Required for finding coefficients in Butcher tableau in the third order of
# PERK scheme integrators
if isdefined(Base, :get_extension)
using NLsolve: nlsolve
else
# Until Julia v1.9 is the minimum required version for Trixi.jl, we still support Requires.jl
using ..NLsolve: nlsolve
end
using NLsolve: nlsolve

# We use a random initialization of the nonlinear solver.
# To make the tests reproducible, we need to seed the RNG
Expand Down
43 changes: 0 additions & 43 deletions src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -311,49 +311,6 @@ function __init__()
@require Plots="91a5bcdd-55d7-5caf-9e0b-520d859cae80" begin
using .Plots: Plots
end

# Until Julia v1.9 is the minimum required version for Trixi.jl, we still support Requires.jl
@static if !isdefined(Base, :get_extension)
@require Makie="ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a" begin
include("../ext/TrixiMakieExt.jl")
end
end

@static if !isdefined(Base, :get_extension)
@require Convex="f65535da-76fb-5f13-bab9-19810c17039a" begin
@require ECOS="e2685f51-7e38-5353-a97d-a921fd2c8199" begin
include("../ext/TrixiConvexECOSExt.jl")
end
end
end

@static if !isdefined(Base, :get_extension)
@require NLsolve="2774e3e8-f4cf-5e23-947b-6d7e65073b56" begin
include("../ext/TrixiNLsolveExt.jl")
end
end

# FIXME upstream. This is a hacky workaround for
# https://github.com/trixi-framework/Trixi.jl/issues/628
# https://github.com/trixi-framework/Trixi.jl/issues/1185
# The related upstream issues appear to be
# https://github.com/JuliaLang/julia/issues/35800
# https://github.com/JuliaLang/julia/issues/32552
# https://github.com/JuliaLang/julia/issues/41740
# See also https://discourse.julialang.org/t/performance-depends-dramatically-on-compilation-order/58425
if VERSION < v"1.9.0"
let
for T in (Float32, Float64)
u_mortars_2d = zeros(T, 2, 2, 2, 2, 2)
u_view_2d = view(u_mortars_2d, 1, :, 1, :, 1)
LoopVectorization.axes(u_view_2d)

u_mortars_3d = zeros(T, 2, 2, 2, 2, 2, 2)
u_view_3d = view(u_mortars_3d, 1, :, 1, :, :, 1)
LoopVectorization.axes(u_view_3d)
end
end
end
end

include("auxiliary/precompile.jl")
Expand Down
16 changes: 7 additions & 9 deletions src/auxiliary/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -600,17 +600,15 @@ function _precompile_manual_()
return nothing
end

# Explicit precompilation running code only on Julia v1.9 and newer
# Explicit precompilation including running code
using PrecompileTools: @setup_workload, @compile_workload

@static if VERSION >= v"1.9.0-beta4"
@setup_workload begin
# Setup code can go here
@setup_workload begin
# Setup code can go here

@compile_workload begin
# Everything inside this block will run at precompile time, saving the
# binary code to a cache in newer versions of Julia.
DGSEM(3)
end
@compile_workload begin
# Everything inside this block will run at precompile time, saving the
# binary code to a cache in newer versions of Julia.
DGSEM(3)
end
end
1 change: 1 addition & 0 deletions src/equations/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ end

@inline Base.ndims(::AbstractEquations{NDIMS}) where {NDIMS} = NDIMS

# TODO: @ranocha may this be removed?
# Equations act like scalars in broadcasting.
# Using `Ref(equations)` would be more convenient in some circumstances.
# However, this does not work with Julia v1.9.3 correctly due to a (performance)
Expand Down

0 comments on commit dd119ac

Please sign in to comment.