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

Keeping number of workers to default for all tests #46

Merged
merged 26 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
1965da3
Integration tests for PDE solved added
JordiBolibar Jul 10, 2023
78a3ef1
Merge conflict fixed
JordiBolibar Jul 10, 2023
215baf4
Merge fixed
JordiBolibar Jul 28, 2023
23f6255
Merge branch 'main' of https://github.com/JordiBolibar/Huginn.jl
JordiBolibar Jul 28, 2023
efbb2b6
Fix merge conflicts
JordiBolibar Sep 6, 2023
0875c6a
Fix merge conflicts
JordiBolibar Sep 6, 2023
7ecf100
Muninn added as dependency
JordiBolibar Sep 15, 2023
8fc23b5
MB mask fixed + multiprocessing working
JordiBolibar Oct 23, 2023
355e65c
Merge branch 'main' of https://github.com/JordiBolibar/Huginn.jl
JordiBolibar Nov 28, 2023
b79e5c9
Changes for compatibility with ODINN.jl
JordiBolibar Dec 11, 2023
c109027
Sleipnir and Munnin versions updated
JordiBolibar Dec 11, 2023
bc34f51
Merge branch 'main' of https://github.com/JordiBolibar/Huginn.jl
JordiBolibar Dec 11, 2023
4eab427
Clean-up and test reference files changes
JordiBolibar Dec 11, 2023
c55c5c3
Bump version
JordiBolibar Dec 12, 2023
d45dfa8
Multiprocessing fixed
JordiBolibar Dec 14, 2023
8ec9c21
Merge branch 'main' of https://github.com/JordiBolibar/Huginn.jl
JordiBolibar Dec 14, 2023
cb058bb
Merge branch 'main' of https://github.com/JordiBolibar/Huginn.jl
JordiBolibar Dec 14, 2023
8e1fdce
Multiprocessing fixed for OGGM
JordiBolibar Dec 15, 2023
bbe8d2c
Merge conflicts solved
JordiBolibar Dec 15, 2023
45254c5
Tolerance fixed for tests
JordiBolibar Dec 15, 2023
0fae034
Merge conflict fixed
JordiBolibar Dec 15, 2023
87c1afa
Default # of workers set for all tests
JordiBolibar Dec 18, 2023
0e07713
Merge branch 'main' into main
JordiBolibar Dec 18, 2023
a11f507
Test mode added for tests
JordiBolibar Dec 18, 2023
4e83faa
Merge branch 'main' of https://github.com/JordiBolibar/Huginn.jl
JordiBolibar Dec 18, 2023
712fb6a
Changing test running order
JordiBolibar Dec 18, 2023
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
2 changes: 1 addition & 1 deletion src/setup/config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function clean()
@everywhere using Reexport
@everywhere @reexport using Huginn
end # @eval
elseif nprocs() != procs && procs == 1
elseif nprocs() != procs && procs == 1 && !params.simulation_test_mode
@eval begin
rmprocs(workers(), waitfor=0)
println("Number of cores: ", nprocs())
Expand Down
6 changes: 3 additions & 3 deletions test/PDE_UDE_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ function pde_solve_test(; rtol::F, atol::F, save_refs::Bool=false, MB::Bool=fals
velocities=false,
tspan=(2010.0, 2015.0),
working_dir = Huginn.root_dir,
workers=4,
multiprocessing=true),
test_mode = true),
solver = SolverParameters(reltol=1e-12)
)

Expand Down Expand Up @@ -103,7 +102,8 @@ function TI_run_test!(save_refs::Bool = false; rtol::F, atol::F) where {F <: Abs
simulation = SimulationParameters(use_MB=true,
velocities=false,
tspan=(2010.0, 2015.0),
working_dir = Huginn.root_dir),
working_dir = Huginn.root_dir,
test_mode = true),
solver = SolverParameters(reltol=1e-8)
)
model = Model(iceflow = SIA2Dmodel(params), mass_balance = TImodel1(params))
Expand Down
2 changes: 0 additions & 2 deletions test/halfar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ function unit_halfar_test(; A, n, t₀, t₁, Δx, Δy, nx, ny, h₀, r₀, rtol
parameters = Parameters(simulation=SimulationParameters(tspan=(t₀, t₁),
use_MB=false,
use_iceflow=true,
multiprocessing=true,
workers=1,
working_dir=Huginn.root_dir),
physical=PhysicalParameters(),
solver=SolverParameters(reltol=1e-12))
Expand Down
4 changes: 1 addition & 3 deletions test/mass_conservation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ function unit_mass_test(; H₀, B, A, n, t_sim, Δx, Δy, rtol=0.02, save_plot=f
# Get parameters for a simulation
parameters = Parameters(simulation=SimulationParameters(tspan=(0.0, t_sim),
use_MB=false,
use_iceflow=true,
multiprocessing=true,
workers=1),
use_iceflow=true),
physical=PhysicalParameters(),
solver=SolverParameters(reltol=1e-12))

Expand Down
3 changes: 1 addition & 2 deletions test/plotting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ function plot_analysis_flow_parameters_test()
use_iceflow= true,
tspan=(2000.0, 2015.0),
working_dir = working_dir,
multiprocessing=true,
workers=2),
test_mode = true),
solver = SolverParameters(reltol=1e-8)
)

Expand Down
12 changes: 6 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ include("plotting.jl")
# Activate to avoid GKS backend Plot issues in the JupyterHub
ENV["GKSwstype"]="nul"

@testset "PDE solving integration tests w/o MB" pde_solve_test(; rtol=0.01, atol=0.01, save_refs=false, MB=false, fast=true)

@testset "PDE solving integration tests w/ MB" pde_solve_test(; rtol=0.01, atol=0.01, save_refs=false, MB=true, fast=true)

@testset "Run TI models in place" TI_run_test!(false; rtol=1e-5, atol=1e-5)

@testset "Solver parameters construction with specified variables" params_constructor_specified()

@testset "Solver parameters construction with default variables" params_constructor_default()
Expand All @@ -28,12 +34,6 @@ ENV["GKSwstype"]="nul"

@testset "Halfar Solution (out-of-place)" halfar_test(; rtol=0.02, atol=1.0, inplace=false)

@testset "PDE solving integration tests w/o MB" pde_solve_test(; rtol=0.01, atol=0.01, save_refs=false, MB=false, fast=true)

@testset "PDE solving integration tests w/ MB" pde_solve_test(; rtol=0.01, atol=0.01, save_refs=false, MB=true, fast=true)

@testset "Run TI models in place" TI_run_test!(false; rtol=1e-5, atol=1e-5)

@testset "Conservation of Mass - Flat Bed" unit_mass_flatbed_test(; rtol=1.0e-7)

@testset "Glacier Plotting" plot_analysis_flow_parameters_test()
Loading