diff --git a/docs/src/parallelization.md b/docs/src/parallelization.md index dc5e2400dde..54b8b07b68d 100644 --- a/docs/src/parallelization.md +++ b/docs/src/parallelization.md @@ -25,7 +25,7 @@ the same time, the latter takes precedence. If you use time integration methods from [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) and want to use multiple threads therein, you need to set the keyword argument -`thread = Trixi.True()` (or `thread = OrdinaryDiffEq.True()`) +`thread = Trixi.Threaded()` of the algorithms, as described in the [section on time integration methods](@ref time-integration). @@ -127,11 +127,11 @@ julia> HDF5.API.set_libraries!("/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5.s ``` After the preferences are set, restart the Julia REPL again. -!!! note - If multiple MPI installations are present on a system (as is typically the case on a cluster), calling - `MPIPreferences.use_system_binary()` may lead to an undesired selection of the MPI implementation - - make sure to check the `LocalPreferences.toml` in any case. - You can also check at runtime of your Julia session the MPI configuration with +!!! note + If multiple MPI installations are present on a system (as is typically the case on a cluster), calling + `MPIPreferences.use_system_binary()` may lead to an undesired selection of the MPI implementation - + make sure to check the `LocalPreferences.toml` in any case. + You can also check at runtime of your Julia session the MPI configuration with `using MPI; MPI.versioninfo()`. ### [Usage](@id parallel_usage) @@ -251,14 +251,14 @@ julia> using HDF5 julia> HDF5.API.set_libraries!("/path/to/your/libhdf5.so", "/path/to/your/libhdf5_hl.so") ``` For more information see also the -[documentation of HDF5.jl](https://juliaio.github.io/HDF5.jl/stable/mpi/). +[documentation of HDF5.jl](https://juliaio.github.io/HDF5.jl/stable/mpi/). -To install the MPI-enabled `HDF5` library, i.e., the `libhdf5.so` and `libhdf5_hl.so` files, +To install the MPI-enabled `HDF5` library, i.e., the `libhdf5.so` and `libhdf5_hl.so` files, there are two options. -First, there might be a package available from the package manager, e.g., `libhdf5-openmpi-dev` for -`OpenMPI` or `libhdf5-mpich-dev` for `MPICH`. +First, there might be a package available from the package manager, e.g., `libhdf5-openmpi-dev` for +`OpenMPI` or `libhdf5-mpich-dev` for `MPICH`. On `Ubuntu`, you find a list of available `libhdf5-` packages [here](https://packages.ubuntu.com/search?keywords=libhdf5-&searchon=names&suite=all§ion=all). -For other Linux distributions you can consult the package manager of your distribution or the third-party webpage https://pkgs.org/. +For other Linux distributions you can consult the package manager of your distribution or the third-party webpage https://pkgs.org/. The second option is to manually build the library on your system. To do so, download the latest release from the [HDF5 download page](https://www.hdfgroup.org/download-hdf5/source-code/). diff --git a/docs/src/time_integration.md b/docs/src/time_integration.md index 9ab753de205..bce37778e71 100644 --- a/docs/src/time_integration.md +++ b/docs/src/time_integration.md @@ -30,9 +30,9 @@ are the following. Further documentation can be found in the from Trixi.jl. - If you start Julia with multiple threads and want to use them also in the time integration method from OrdinaryDiffEq.jl, you need to pass the keyword argument - `thread = Trixi.True()` (or `thread = OrdinaryDiffEq.True()`) to the algorithm, e.g., - `RDPK3SpFSAL49(thread = Trixi.True())` or - `CarpenterKennedy2N54(thread = Trixi.True(), williamson_condition = false)`. + `thread = Trixi.Threaded()` to the algorithm, e.g., + `RDPK3SpFSAL49(thread = Trixi.Threaded())` or + `CarpenterKennedy2N54(thread = Trixi.Threaded(), williamson_condition = false)`. For more information on using thread-based parallelism in Trixi.jl, please refer to [Shared-memory parallelization with threads](@ref). - If you use error-based step size control (see also the section on diff --git a/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl b/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl index 94db4ecda09..067490f5da9 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_NACA0012airfoil_mach085.jl @@ -140,6 +140,6 @@ callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, ############################################################################### # run the simulation -sol = solve(ode, SSPRK54(thread = Trixi.True()); +sol = solve(ode, SSPRK54(thread = Trixi.Threaded()); dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_euler_NACA6412airfoil_mach2.jl b/examples/p4est_2d_dgsem/elixir_euler_NACA6412airfoil_mach2.jl index 8f9a43ca795..2754d8ec364 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_NACA6412airfoil_mach2.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_NACA6412airfoil_mach2.jl @@ -103,7 +103,7 @@ callbacks = CallbackSet(summary_callback, # Run the simulation ############################################################################### -sol = solve(ode, SSPRK104(; thread = Trixi.True()); +sol = solve(ode, SSPRK104(; thread = Trixi.Threaded()); dt = 1.0, # overwritten by the `stepsize_callback` ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_euler_cylinder_bowshock_mach3.jl b/examples/p4est_2d_dgsem/elixir_euler_cylinder_bowshock_mach3.jl index 4673700114c..025b06a3c45 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_cylinder_bowshock_mach3.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_cylinder_bowshock_mach3.jl @@ -181,6 +181,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e- ############################################################################### # Run the simulation -sol = solve(ode, SSPRK33(; stage_limiter! = stage_limiter!, thread = Trixi.True()); +sol = solve(ode, SSPRK33(; stage_limiter! = stage_limiter!, thread = Trixi.Threaded()); dt = 1.6e-5, # Fixed timestep works decent here ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_euler_double_mach_amr_adaptive_vol_int.jl b/examples/p4est_2d_dgsem/elixir_euler_double_mach_amr_adaptive_vol_int.jl index 324a0630b21..0862769e8c3 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_double_mach_amr_adaptive_vol_int.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_double_mach_amr_adaptive_vol_int.jl @@ -167,6 +167,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e- ############################################################################### # run the simulation -sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.True()); +sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.Threaded()); dt = 5e-7, # Reducing initial timestep allows AMR interval of 2 instead of 1 adaptive = true, ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_euler_rayleigh_taylor_instability.jl b/examples/p4est_2d_dgsem/elixir_euler_rayleigh_taylor_instability.jl index 8a5f04c414a..fc21482f1b2 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_rayleigh_taylor_instability.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_rayleigh_taylor_instability.jl @@ -159,7 +159,7 @@ callbacks = CallbackSet(summary_callback, # run the simulation time_int_tol = 1e-6 -sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.True()); +sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.Threaded()); abstol = time_int_tol, reltol = time_int_tol, adaptive = true, dt = 1e-3, # needed only for tests/CI ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl b/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl index 331404eb21b..c9ec66b047a 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_subsonic_cylinder.jl @@ -126,6 +126,6 @@ callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, sav # run the simulation sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false; - thread = Trixi.True()); + thread = Trixi.Threaded()); dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_scO2.jl b/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_scO2.jl index 867c2868209..ae6b2918810 100644 --- a/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_scO2.jl +++ b/examples/p4est_2d_dgsem/elixir_euler_supersonic_cylinder_scO2.jl @@ -133,6 +133,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-7, 1.0e- # We supply a small initial timestep to be able to use a larger AMR interval (3 instead of 1) throughout the simulation. # This pays off almost immediately as only the first couple timesteps use this timestep before it is ramped up. dt0 = 1e-8 -sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.True()); +sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.Threaded()); adaptive = true, dt = dt0, ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_mhd_rotor_cfl_ramp.jl b/examples/p4est_2d_dgsem/elixir_mhd_rotor_cfl_ramp.jl index f7673eabf03..8c0482d61a7 100644 --- a/examples/p4est_2d_dgsem/elixir_mhd_rotor_cfl_ramp.jl +++ b/examples/p4est_2d_dgsem/elixir_mhd_rotor_cfl_ramp.jl @@ -141,7 +141,7 @@ callbacks = CallbackSet(summary_callback, # run the simulation sol = solve(ode, - CarpenterKennedy2N54(thread = Trixi.True(), + CarpenterKennedy2N54(thread = Trixi.Threaded(), williamson_condition = false); dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl index a86d8f2958c..05f547a7056 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach08.jl @@ -173,6 +173,6 @@ callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, sav ############################################################################### # run the simulation -sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.True()); +sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.Threaded()); abstol = 1e-8, reltol = 1e-8, ode_default_options()..., callback = callbacks) diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach085_restart.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach085_restart.jl index d1dca6b2993..4c9f579e2b5 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach085_restart.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_NACA0012airfoil_mach085_restart.jl @@ -83,6 +83,6 @@ callbacks = CallbackSet(summary_callback, analysis_callback, alive_callback, ############################################################################### -sol = solve(ode, SSPRK54(thread = Trixi.True()); +sol = solve(ode, SSPRK54(thread = Trixi.Threaded()); dt = dt_restart, ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_RAE2822airfoil_separation.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_RAE2822airfoil_separation.jl index 5a0f14e543d..394e7e529c0 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_RAE2822airfoil_separation.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_RAE2822airfoil_separation.jl @@ -128,7 +128,7 @@ callbacks = CallbackSet(summary_callback, ############################################################################### # run the simulation -ode_algorithm = SSPRK43(thread = Trixi.True()) +ode_algorithm = SSPRK43(thread = Trixi.Threaded()) time_int_tol = 1e-4 sol = solve(ode, ode_algorithm; diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_SD7003airfoil.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_SD7003airfoil.jl index 66f94fa1944..cdc54cf4877 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_SD7003airfoil.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_SD7003airfoil.jl @@ -146,5 +146,5 @@ callbacks = CallbackSet(summary_callback, sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false, - thread = Trixi.True()); + thread = Trixi.Threaded()); dt = 1.0, ode_default_options()..., callback = callbacks) diff --git a/examples/p4est_2d_dgsem/elixir_navierstokes_vortex_street.jl b/examples/p4est_2d_dgsem/elixir_navierstokes_vortex_street.jl index 932926770e9..51605d37e5e 100644 --- a/examples/p4est_2d_dgsem/elixir_navierstokes_vortex_street.jl +++ b/examples/p4est_2d_dgsem/elixir_navierstokes_vortex_street.jl @@ -158,7 +158,7 @@ callbacks = CallbackSet(summary_callback, # run the simulation # Moderate number of threads (e.g. 4) advisable to speed things up -ode_alg = RDPK3SpFSAL49(thread = Trixi.True()) +ode_alg = RDPK3SpFSAL49(thread = Trixi.Threaded()) time_int_tol = 1e-7 sol = solve(ode, ode_alg; # not necessary, added for overwriting in tests diff --git a/examples/p4est_3d_dgsem/elixir_euler_baroclinic_instability.jl b/examples/p4est_3d_dgsem/elixir_euler_baroclinic_instability.jl index daa758d1f9b..f92119a2adb 100644 --- a/examples/p4est_3d_dgsem/elixir_euler_baroclinic_instability.jl +++ b/examples/p4est_3d_dgsem/elixir_euler_baroclinic_instability.jl @@ -294,6 +294,6 @@ callbacks = CallbackSet(summary_callback, # Use a Runge-Kutta method with automatic (error based) time step size control # Enable threading of the RK method for better performance on multiple threads -sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.True()); +sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.Threaded()); abstol = 1.0e-6, reltol = 1.0e-6, ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_3d_dgsem/elixir_euler_circular_wind_nonconforming.jl b/examples/p4est_3d_dgsem/elixir_euler_circular_wind_nonconforming.jl index ed93bae6e8c..ccb43801045 100644 --- a/examples/p4est_3d_dgsem/elixir_euler_circular_wind_nonconforming.jl +++ b/examples/p4est_3d_dgsem/elixir_euler_circular_wind_nonconforming.jl @@ -157,6 +157,6 @@ callbacks = CallbackSet(summary_callback, # Use a Runge-Kutta method with automatic (error based) time step size control # Enable threading of the RK method for better performance on multiple threads -sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.True()); +sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.Threaded()); abstol = 1.0e-6, reltol = 1.0e-6, ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_3d_dgsem/elixir_euler_tandem_spheres.jl b/examples/p4est_3d_dgsem/elixir_euler_tandem_spheres.jl index 60f800e7f62..781e3f39068 100644 --- a/examples/p4est_3d_dgsem/elixir_euler_tandem_spheres.jl +++ b/examples/p4est_3d_dgsem/elixir_euler_tandem_spheres.jl @@ -101,6 +101,6 @@ callbacks = CallbackSet(summary_callback, ############################################################################### tols = 1e-5 -sol = solve(ode, RDPK3SpFSAL35(thread = Trixi.True()); +sol = solve(ode, RDPK3SpFSAL35(thread = Trixi.Threaded()); abstol = tols, reltol = tols, ode_default_options()..., callback = callbacks); diff --git a/examples/p4est_3d_dgsem/elixir_navierstokes_blast_wave_amr.jl b/examples/p4est_3d_dgsem/elixir_navierstokes_blast_wave_amr.jl index 2c3b563df00..76a0fa8c470 100644 --- a/examples/p4est_3d_dgsem/elixir_navierstokes_blast_wave_amr.jl +++ b/examples/p4est_3d_dgsem/elixir_navierstokes_blast_wave_amr.jl @@ -109,6 +109,6 @@ callbacks = CallbackSet(summary_callback, # run the simulation time_int_tol = 1e-8 -sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.True()); +sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.Threaded()); abstol = time_int_tol, reltol = time_int_tol, ode_default_options()..., callback = callbacks) diff --git a/examples/t8code_3d_dgsem/elixir_euler_baroclinic_instability.jl b/examples/t8code_3d_dgsem/elixir_euler_baroclinic_instability.jl index 1e2cc40f092..46120c58a4d 100644 --- a/examples/t8code_3d_dgsem/elixir_euler_baroclinic_instability.jl +++ b/examples/t8code_3d_dgsem/elixir_euler_baroclinic_instability.jl @@ -294,6 +294,6 @@ callbacks = CallbackSet(summary_callback, # Use a Runge-Kutta method with automatic (error based) time step size control # Enable threading of the RK method for better performance on multiple threads -sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.True()); +sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.Threaded()); abstol = 1.0e-6, reltol = 1.0e-6, ode_default_options()..., callback = callbacks); diff --git a/examples/tree_1d_dgsem/elixir_euler_density_wave_adaptive_vol_int.jl b/examples/tree_1d_dgsem/elixir_euler_density_wave_adaptive_vol_int.jl index 309a36b0577..9f201eddd2d 100644 --- a/examples/tree_1d_dgsem/elixir_euler_density_wave_adaptive_vol_int.jl +++ b/examples/tree_1d_dgsem/elixir_euler_density_wave_adaptive_vol_int.jl @@ -26,7 +26,7 @@ volume_integral_fluxdiff = VolumeIntegralFluxDifferencing(volume_flux) # `volume_integral_stabilized` is used instead of the `volume_integral_default`. indicator = IndicatorEntropyChange(maximum_entropy_increase = 0.0) -# Adaptive volume integral using the entropy production comparison indicator to perform the +# Adaptive volume integral using the entropy production comparison indicator to perform the # stabilized/EC volume integral when needed and keeping the weak form if it is more diffusive. volume_integral = VolumeIntegralAdaptive(volume_integral_default = volume_integral_weakform, volume_integral_stabilized = volume_integral_fluxdiff, @@ -67,6 +67,7 @@ callbacks = CallbackSet(summary_callback, ############################################################################### # run the simulation -sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false, thread = Trixi.True()); +sol = solve(ode, + CarpenterKennedy2N54(williamson_condition = false, thread = Trixi.Threaded()); dt = stepsize_callback(ode), ode_default_options()..., callback = callbacks); diff --git a/examples/tree_2d_dgsem/elixir_euler_astro_jet_amr_scO2.jl b/examples/tree_2d_dgsem/elixir_euler_astro_jet_amr_scO2.jl index a9f0c2d0e28..829d8541ef9 100644 --- a/examples/tree_2d_dgsem/elixir_euler_astro_jet_amr_scO2.jl +++ b/examples/tree_2d_dgsem/elixir_euler_astro_jet_amr_scO2.jl @@ -106,6 +106,6 @@ stage_limiter! = PositivityPreservingLimiterZhangShu(thresholds = (5.0e-6, 5.0e- # run the simulation # use adaptive time stepping based on error estimates -sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.True()); +sol = solve(ode, SSPRK43(; stage_limiter! = stage_limiter!, thread = Trixi.Threaded()); controller = PIDController(0.55, -0.27, 0.05), ode_default_options()..., callback = callbacks); diff --git a/examples/tree_3d_dgsem/elixir_euler_sedov_blast_weak_form_sc.jl b/examples/tree_3d_dgsem/elixir_euler_sedov_blast_weak_form_sc.jl index d8d5367160b..d45e0bf64c1 100644 --- a/examples/tree_3d_dgsem/elixir_euler_sedov_blast_weak_form_sc.jl +++ b/examples/tree_3d_dgsem/elixir_euler_sedov_blast_weak_form_sc.jl @@ -117,6 +117,6 @@ callbacks = CallbackSet(summary_callback, ############################################################################### # run the simulation -sol = solve(ode, SSPRK54(thread = Trixi.True()); +sol = solve(ode, SSPRK54(thread = Trixi.Threaded()); dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback ode_default_options()..., callback = callbacks); diff --git a/examples/tree_3d_dgsem/elixir_euler_sedov_scO2.jl b/examples/tree_3d_dgsem/elixir_euler_sedov_scO2.jl index bb515a5c175..8946e6f61eb 100644 --- a/examples/tree_3d_dgsem/elixir_euler_sedov_scO2.jl +++ b/examples/tree_3d_dgsem/elixir_euler_sedov_scO2.jl @@ -100,5 +100,5 @@ callbacks = CallbackSet(summary_callback, ############################################################################### # run the simulation -sol = solve(ode, SSPRK54(thread = Trixi.True()); dt = 1.0, +sol = solve(ode, SSPRK54(thread = Trixi.Threaded()); dt = 1.0, ode_default_options()..., callback = callbacks); diff --git a/examples/tree_3d_dgsem/elixir_navierstokes_taylor_green_vortex_adaptive_vol_int.jl b/examples/tree_3d_dgsem/elixir_navierstokes_taylor_green_vortex_adaptive_vol_int.jl index 79c0ca15b73..08692a20a43 100644 --- a/examples/tree_3d_dgsem/elixir_navierstokes_taylor_green_vortex_adaptive_vol_int.jl +++ b/examples/tree_3d_dgsem/elixir_navierstokes_taylor_green_vortex_adaptive_vol_int.jl @@ -99,5 +99,5 @@ callbacks = CallbackSet(summary_callback, ############################################################################### # run the simulation -sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.True()); adaptive = true, +sol = solve(ode, RDPK3SpFSAL49(thread = Trixi.Threaded()); adaptive = true, ode_default_options()..., callback = callbacks) diff --git a/src/Trixi.jl b/src/Trixi.jl index ac57e30845c..a35879d0a1c 100644 --- a/src/Trixi.jl +++ b/src/Trixi.jl @@ -87,6 +87,8 @@ using T8code using RecipesBase: RecipesBase using RecursiveArrayTools: VectorOfArray using Static: Static, One, True, False +# OrdinaryDiffEq v7+ uses FastBroadcast.Threaded() for the thread argument; older versions use Static.True() +const Threaded = isdefined(DiffEqBase, :Threaded) ? DiffEqBase.Threaded : True @reexport using StaticArrays: SVector using StaticArrays: StaticArrays, MVector, MArray, SMatrix, @SMatrix using StrideArrays: PtrArray, StrideArray, StaticInt diff --git a/test/test_threaded.jl b/test/test_threaded.jl index d32d3a41196..2b95a25ca79 100644 --- a/test/test_threaded.jl +++ b/test/test_threaded.jl @@ -44,7 +44,7 @@ Trixi.MPI.Barrier(Trixi.mpi_comm()) @test_trixi_include(joinpath(EXAMPLES_DIR, "tree_2d_dgsem", "elixir_advection_restart.jl"), alg=CarpenterKennedy2N54(williamson_condition = false, - thread = Trixi.True()), + thread = Trixi.Threaded()), # Expected errors are exactly the same as in the serial test! l2=[8.005068880114254e-6], linf=[6.39093577996519e-5]) @@ -148,7 +148,7 @@ Trixi.MPI.Barrier(Trixi.mpi_comm()) @test_trixi_include(joinpath(EXAMPLES_DIR, "tree_2d_dgsem", "elixir_advection_diffusion.jl"), initial_refinement_level=2, tspan=(0.0, 0.4), polydeg=5, - alg=RDPK3SpFSAL49(thread = Trixi.True()), + alg=RDPK3SpFSAL49(thread = Trixi.Threaded()), l2=[4.0915532997994255e-6], linf=[2.3040850347877395e-5]) @@ -363,7 +363,7 @@ end @trixi_testset "elixir_euler_curved.jl with threaded time integration" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "dgmulti_2d", "elixir_euler_curved.jl"), - alg=RDPK3SpFSAL49(thread = Trixi.True()), + alg=RDPK3SpFSAL49(thread = Trixi.Threaded()), l2=[ 1.720916434676505e-5, 1.5928649356300228e-5,