diff --git a/Project.toml b/Project.toml index 90fde602ae0..5716e98bc7f 100644 --- a/Project.toml +++ b/Project.toml @@ -30,6 +30,7 @@ SimpleUnPack = "ce78b400-467f-4804-87d8-8f486da07d0a" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StartUpDG = "472ebc20-7c99-4d4b-9470-8fde4e9faa0f" Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +StaticArrayInterface = "0d7ed370-da01-4f52-bd93-41d350b8b718" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StrideArrays = "d1fa6d79-ef01-42a6-86c9-f7c551f8593b" StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" @@ -63,6 +64,7 @@ Setfield = "0.8, 1" SimpleUnPack = "1.1" StartUpDG = "0.16" Static = "0.3, 0.4, 0.5, 0.6, 0.7, 0.8" +StaticArrayInterface = "1.4" StaticArrays = "1" StrideArrays = "0.1.18" StructArrays = "0.6" diff --git a/README.md b/README.md index eaef594580e..8ac2917c8ce 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ installation and postprocessing procedures. Its features include: * Kinetic energy-preserving and entropy-stable methods based on flux differencing * Entropy-stable shock capturing * Positivity-preserving limiting - * Finite difference summation by parts (SBP) methods + * [Finite difference summation by parts (SBP) methods](https://github.com/ranocha/SummationByPartsOperators.jl) * Compatible with the [SciML ecosystem for ordinary differential equations](https://diffeq.sciml.ai/latest/) * [Explicit low-storage Runge-Kutta time integration](https://diffeq.sciml.ai/latest/solvers/ode_solve/#Low-Storage-Methods) * [Strong stability preserving methods](https://diffeq.sciml.ai/latest/solvers/ode_solve/#Explicit-Strong-Stability-Preserving-Runge-Kutta-Methods-for-Hyperbolic-PDEs-(Conservation-Laws)) diff --git a/docs/src/index.md b/docs/src/index.md index f4caa3cf4c0..2f2d710b51a 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -29,7 +29,7 @@ installation and postprocessing procedures. Its features include: * Kinetic energy-preserving and entropy-stable methods based on flux differencing * Entropy-stable shock capturing * Positivity-preserving limiting - * Finite difference summation by parts (SBP) methods + * [Finite difference summation by parts (SBP) methods](https://github.com/ranocha/SummationByPartsOperators.jl) * Compatible with the [SciML ecosystem for ordinary differential equations](https://diffeq.sciml.ai/latest/) * [Explicit low-storage Runge-Kutta time integration](https://diffeq.sciml.ai/latest/solvers/ode_solve/#Low-Storage-Methods) * [Strong stability preserving methods](https://diffeq.sciml.ai/latest/solvers/ode_solve/#Explicit-Strong-Stability-Preserving-Runge-Kutta-Methods-for-Hyperbolic-PDEs-(Conservation-Laws)) diff --git a/docs/src/troubleshooting.md b/docs/src/troubleshooting.md index fe6ca8b312f..efe86f10b05 100644 --- a/docs/src/troubleshooting.md +++ b/docs/src/troubleshooting.md @@ -6,7 +6,7 @@ Julia packages via the package manager, e.g., by running ```julia julia> import Pkg; Pkg.update() ``` -If you do not use the latest stable release of Julia from the +If you do not use the latest stable release of Julia from the [official website](https://julialang.org/downloads/#current_stable_release), consider updating your Julia installation. @@ -148,3 +148,43 @@ are kept on the same MPI rank to be able to coarsen them easily. This might caus distribution of cells on different ranks. For 2D meshes, this also means that *initially* each rank will at least own 4 cells, and for 3D meshes, *initially* each rank will at least own 8 cells. See [issue #1329](https://github.com/trixi-framework/Trixi.jl/issues/1329). + + + +## Installing and updating everything takes a lot of time + +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. + +Some packages used together with [Trixi.jl](https://github.com/trixi-framework/Trixi.jl) +provide options to configure the amount of precompilation. For example, +[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) precompiles +many ODE solvers for a good runtime experience of average users. Currently, +[Trixi.jl](https://github.com/trixi-framework/Trixi.jl) does not use all of +the available solvers. Thus, you can save some time at every update by setting +their [precompilation options](https://docs.sciml.ai/DiffEqDocs/stable/features/low_dep/). + +At the time of writing, this could look as follows. First, you need to activate +the environment where you have installed +[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl). Then, you need +to execute the following Julia code. + +```julia +using Preferences, UUIDs +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileNonStiff" => true) +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileStiff" => false) +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileAutoSwitch" => false) +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileLowStorage" => true) +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileDefaultSpecialize" => true) +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileAutoSpecialize" => false) +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileFunctionWrapperSpecialize" => false) +set_preferences!(UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PrecompileNoSpecialize" => false) +``` + +This disables precompilation of all implicit methods. This should usually not affect +the runtime latency with [Trixi.jl](https://github.com/trixi-framework/Trixi.jl) +since most setups use explicit time integration methods. diff --git a/src/Trixi.jl b/src/Trixi.jl index 8fc0a3842c4..19cde8dfc25 100644 --- a/src/Trixi.jl +++ b/src/Trixi.jl @@ -41,7 +41,7 @@ using HDF5: h5open, attributes using IfElse: ifelse using LinearMaps: LinearMap using LoopVectorization: LoopVectorization, @turbo, indices -using LoopVectorization.ArrayInterface: static_length +using StaticArrayInterface: static_length # used by LoopVectorization using MPI: MPI using MuladdMacro: @muladd using Octavian: Octavian, matmul! @@ -133,7 +133,7 @@ export AcousticPerturbationEquations2D, LinearScalarAdvectionEquation1D, LinearScalarAdvectionEquation2D, LinearScalarAdvectionEquation3D, InviscidBurgersEquation1D, LatticeBoltzmannEquations2D, LatticeBoltzmannEquations3D, - ShallowWaterEquations1D, ShallowWaterEquations2D, + ShallowWaterEquations1D, ShallowWaterEquations2D, ShallowWaterTwoLayerEquations1D, ShallowWaterTwoLayerEquations2D, LinearizedEulerEquations2D