Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ RecursiveArrayTools = "4.3.0, 4"
Reexport = "1.2.2"
SafeTestsets = "0.1"
SciMLBase = "3.18.0, 3.1"
SciMLTesting = "1"
StableRNGs = "1"
StaticArrays = "1.9.18"
Statistics = "1"
Expand All @@ -74,10 +75,11 @@ OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
OrdinaryDiffEqFunctionMap = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SciMLTesting = "09d9d899-5365-40a9-917a-5f67fddea283"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["ADTypes", "Aqua", "ExplicitImports", "FastBroadcast", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqFunctionMap", "Pkg", "SafeTestsets", "StableRNGs", "Statistics", "StochasticDiffEq", "Test"]
test = ["ADTypes", "Aqua", "ExplicitImports", "FastBroadcast", "LinearAlgebra", "LinearSolve", "OrdinaryDiffEq", "OrdinaryDiffEqFunctionMap", "Pkg", "SafeTestsets", "SciMLTesting", "StableRNGs", "Statistics", "StochasticDiffEq", "Test"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
124 changes: 64 additions & 60 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,69 +1,73 @@
#! format: off
using JumpProcesses, SafeTestsets, Pkg

const GROUP = get(ENV, "GROUP", "All")
using SciMLTesting

function activate_gpu_env()
Pkg.activate("gpu")
Pkg.develop(PackageSpec(path = dirname(@__DIR__)))
Pkg.instantiate()
end

@time begin
if GROUP == "QA"
@time @safetestset "QA Tests" begin include("qa.jl") end
end

if GROUP == "All" || GROUP == "InterfaceI"
@time @safetestset "Constant Rate Tests" begin include("constant_rate.jl") end
@time @safetestset "Variable Rate Tests" begin include("variable_rate.jl") end
@time @safetestset "ExtendedJumpArray Tests" begin include("extended_jump_array.jl") end
@time @safetestset "FunctionWrapper Tests" begin include("functionwrappers.jl") end
@time @safetestset "Monte Carlo Tests" begin include("monte_carlo_test.jl") end
@time @safetestset "Split Coupled Tests" begin include("splitcoupled.jl") end
@time @safetestset "SSA Tests" begin include("ssa_tests.jl") end
@time @safetestset "Tau Leaping Tests" begin include("regular_jumps.jl") end
@time @safetestset "Simple SSA Callback Test" begin include("ssa_callback_test.jl") end
@time @safetestset "SIR Discrete Callback Test" begin include("sir_model.jl") end
@time @safetestset "Callback Merging Tests" begin include("callbacks.jl") end
@time @safetestset "Linear Reaction SSA Test" begin include("linearreaction_test.jl") end
@time @safetestset "Mass Action Jump Tests; Gene Expr Model" begin include("geneexpr_test.jl") end
@time @safetestset "Mass Action Jump Tests; Nonlinear Rx Model" begin include("bimolerx_test.jl") end
@time @safetestset "Mass Action Jump Tests; Special Cases" begin include("degenerate_rx_cases.jl") end
@time @safetestset "Mass Action Jump Tests; Floating Point Inputs" begin include("fp_unknowns.jl") end
@time @safetestset "scale_rates Field Tests" begin include("scale_rates_field_test.jl") end
@time @safetestset "Direct allocations test" begin include("allocations.jl") end
@time @safetestset "Bracketing Tests" begin include("bracketing.jl") end
@time @safetestset "Composition-Rejection Table Tests" begin include("table_test.jl") end
@time @safetestset "Extinction test" begin include("extinction_test.jl") end
end
if GROUP == "All" || GROUP == "InterfaceII"
@time @safetestset "Saveat Regression test" begin include("saveat_regression.jl") end
@time @safetestset "Save_positions test" begin include("save_positions.jl") end
@time @safetestset "Ensemble Uniqueness test" begin include("ensemble_uniqueness.jl") end
@time @safetestset "Thread Safety test" begin include("thread_safety.jl") end
@time @safetestset "Ensemble Problem Tests" begin include("ensemble_problems.jl") end
@time @safetestset "A + B <--> C" begin include("reversible_binding.jl") end
@time @safetestset "Remake tests" begin include("remake_test.jl") end
@time @safetestset "ExtendedJumpArray remake tests" begin include("extended_jump_array_remake.jl") end
@time @safetestset "Symbol based problem indexing" begin include("jprob_symbol_indexing.jl") end
@time @safetestset "Long time accuracy test" begin include("longtimes_test.jl") end
@time @safetestset "Hawkes process" begin include("hawkes_test.jl") end
@time @safetestset "Reaction rates" begin include("spatial/reaction_rates.jl") end
@time @safetestset "Hop rates" begin include("spatial/hop_rates.jl") end
@time @safetestset "Topology" begin include("spatial/topology.jl") end
@time @safetestset "Spatial bracketing Tests" begin include("spatial/bracketing.jl") end
@time @safetestset "Spatial A + B <--> C" begin include("spatial/ABC.jl") end
@time @safetestset "Spatially Varying Reaction Rates" begin include("spatial/spatial_majump.jl") end
@time @safetestset "Pure diffusion" begin include("spatial/diffusion.jl") end
end

if GROUP == "CUDA"
activate_gpu_env()
@time @safetestset "GPU Tau Leaping test" begin include("gpu/regular_jumps.jl") end
end

if GROUP == "Correctness"
activate_gpu_env()
end
end
run_tests(;
core = function ()
return nothing
end,
groups = Dict(
"InterfaceI" => function ()
@time @safetestset "Constant Rate Tests" begin include("InterfaceI/constant_rate.jl") end
@time @safetestset "Variable Rate Tests" begin include("InterfaceI/variable_rate.jl") end
@time @safetestset "ExtendedJumpArray Tests" begin include("InterfaceI/extended_jump_array.jl") end
@time @safetestset "FunctionWrapper Tests" begin include("InterfaceI/functionwrappers.jl") end
@time @safetestset "Monte Carlo Tests" begin include("InterfaceI/monte_carlo_test.jl") end
@time @safetestset "Split Coupled Tests" begin include("InterfaceI/splitcoupled.jl") end
@time @safetestset "SSA Tests" begin include("InterfaceI/ssa_tests.jl") end
@time @safetestset "Tau Leaping Tests" begin include("InterfaceI/regular_jumps.jl") end
@time @safetestset "Simple SSA Callback Test" begin include("InterfaceI/ssa_callback_test.jl") end
@time @safetestset "SIR Discrete Callback Test" begin include("InterfaceI/sir_model.jl") end
@time @safetestset "Callback Merging Tests" begin include("InterfaceI/callbacks.jl") end
@time @safetestset "Linear Reaction SSA Test" begin include("InterfaceI/linearreaction_test.jl") end
@time @safetestset "Mass Action Jump Tests; Gene Expr Model" begin include("InterfaceI/geneexpr_test.jl") end
@time @safetestset "Mass Action Jump Tests; Nonlinear Rx Model" begin include("InterfaceI/bimolerx_test.jl") end
@time @safetestset "Mass Action Jump Tests; Special Cases" begin include("InterfaceI/degenerate_rx_cases.jl") end
@time @safetestset "Mass Action Jump Tests; Floating Point Inputs" begin include("InterfaceI/fp_unknowns.jl") end
@time @safetestset "scale_rates Field Tests" begin include("InterfaceI/scale_rates_field_test.jl") end
@time @safetestset "Direct allocations test" begin include("InterfaceI/allocations.jl") end
@time @safetestset "Bracketing Tests" begin include("InterfaceI/bracketing.jl") end
@time @safetestset "Composition-Rejection Table Tests" begin include("InterfaceI/table_test.jl") end
@time @safetestset "Extinction test" begin include("InterfaceI/extinction_test.jl") end
return nothing
end,
"InterfaceII" => function ()
@time @safetestset "Saveat Regression test" begin include("InterfaceII/saveat_regression.jl") end
@time @safetestset "Save_positions test" begin include("InterfaceII/save_positions.jl") end
@time @safetestset "Ensemble Uniqueness test" begin include("InterfaceII/ensemble_uniqueness.jl") end
@time @safetestset "Thread Safety test" begin include("InterfaceII/thread_safety.jl") end
@time @safetestset "Ensemble Problem Tests" begin include("InterfaceII/ensemble_problems.jl") end
@time @safetestset "A + B <--> C" begin include("InterfaceII/reversible_binding.jl") end
@time @safetestset "Remake tests" begin include("InterfaceII/remake_test.jl") end
@time @safetestset "ExtendedJumpArray remake tests" begin include("InterfaceII/extended_jump_array_remake.jl") end
@time @safetestset "Symbol based problem indexing" begin include("InterfaceII/jprob_symbol_indexing.jl") end
@time @safetestset "Long time accuracy test" begin include("InterfaceII/longtimes_test.jl") end
@time @safetestset "Hawkes process" begin include("InterfaceII/hawkes_test.jl") end
@time @safetestset "Reaction rates" begin include("InterfaceII/reaction_rates.jl") end
@time @safetestset "Hop rates" begin include("InterfaceII/hop_rates.jl") end
@time @safetestset "Topology" begin include("InterfaceII/topology.jl") end
@time @safetestset "Spatial bracketing Tests" begin include("InterfaceII/bracketing.jl") end
@time @safetestset "Spatial A + B <--> C" begin include("InterfaceII/ABC.jl") end
@time @safetestset "Spatially Varying Reaction Rates" begin include("InterfaceII/spatial_majump.jl") end
@time @safetestset "Pure diffusion" begin include("InterfaceII/diffusion.jl") end
return nothing
end,
"CUDA" => function ()
activate_gpu_env()
@time @safetestset "GPU Tau Leaping test" begin include("gpu/regular_jumps.jl") end
return nothing
end,
"Correctness" => function ()
activate_gpu_env()
return nothing
end,
),
qa = joinpath(@__DIR__, "qa", "qa.jl"),
all = ["InterfaceI", "InterfaceII"],
)
File renamed without changes.
Loading