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

[WIP] Increase minimum supported Julia version to v1.10 #2214

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 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
6 changes: 3 additions & 3 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 Expand Up @@ -72,7 +72,7 @@ jobs:
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: LinearAlgebra,Printf,SparseArrays,UUIDs,DiffEqBase,DelimitedFiles
skip: LinearAlgebra,Printf,SparseArrays,UUIDs,DiffEqBase,DelimitedFiles,Test,Downloads,Random
projects: ., test
- uses: julia-actions/julia-buildpkg@v1
env:
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
Comment on lines +84 to 87
Copy link
Member

Choose a reason for hiding this comment

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

Why did you decide to use 1.11 for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Since otherwise threaded_legacy remains unused. I thought this would be an initial and small step towards testing at least some parts on v1.11. But I can also just remove it, I have no strong opinion here either way

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
Copy link
Member

Choose a reason for hiding this comment

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

We should remove the dependency on Requires.jl - I cannot comment on the line here

Copy link
Member Author

Choose a reason for hiding this comment

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

This is only possible once we move Plots.jl into an extension. I'd rather do this in a separate PR, since I do not have the resources to do this at the moment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Tracked in #2216

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?
sloede marked this conversation as resolved.
Show resolved Hide resolved
# 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
Loading