Skip to content

Commit

Permalink
Remove TimerOutput objects from tests
Browse files Browse the repository at this point in the history
The TimerOutput objects are not actually used, they are leftovers which
were required at one point to call run_moment_kinetics().
  • Loading branch information
johnomotani committed Nov 16, 2023
1 parent a9d135a commit d2e8491
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 21 deletions.
6 changes: 1 addition & 5 deletions test/harrisonthompson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include("setup.jl")

using Base.Filesystem: tempname
using SpecialFunctions: dawson
using TimerOutputs

using moment_kinetics.load_data: open_readonly_output_file
using moment_kinetics.load_data: load_fields_data, load_time_data
Expand Down Expand Up @@ -152,9 +151,6 @@ test_input_chebyshev_split3 = merge(test_input_chebyshev_split2,
Dict("run_name" => "chebyshev_pseudospectral_split3",
"evolve_moments_parallel_pressure" => true))

# Not actually used in the tests, but needed for first argument of run_moment_kinetics
to = TimerOutput()

"""
Run a test for a single set of parameters
"""
Expand Down Expand Up @@ -190,7 +186,7 @@ function run_test(test_input, analytic_rtol, analytic_atol, expected_phi,
z = nothing
quietoutput() do
# run simulation
run_moment_kinetics(to, input)
run_moment_kinetics(input)
end

if global_rank[] == 0
Expand Down
6 changes: 1 addition & 5 deletions test/nonlinear_sound_wave_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module NonlinearSoundWaveTests
include("setup.jl")

using Base.Filesystem: tempname
using TimerOutputs

using moment_kinetics.coordinates: define_coordinate
using moment_kinetics.input_structs: grid_input, advection_input
Expand All @@ -23,9 +22,6 @@ test_output_directory = get_MPI_tempdir()

include("nonlinear_sound_wave_inputs_and_expected_data.jl")

# Not actually used in the tests, but needed for first argument of run_moment_kinetics
to = TimerOutput()

"""
Run a sound-wave test for a single set of parameters
"""
Expand Down Expand Up @@ -61,7 +57,7 @@ function run_test(test_input, rtol, atol, upar_rtol=nothing; args...)
# Suppress console output while running
quietoutput() do
# run simulation
run_moment_kinetics(to, input)
run_moment_kinetics(input)
end

phi = nothing
Expand Down
1 change: 0 additions & 1 deletion test/recycling_fraction_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ include("setup.jl")

using Base.Filesystem: tempname
using MPI
using TimerOutputs

using moment_kinetics.coordinates: define_coordinate
using moment_kinetics.input_structs: grid_input, advection_input
Expand Down
6 changes: 1 addition & 5 deletions test/sound_wave_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module SoundWaveTests
include("setup.jl")

using Base.Filesystem: tempname
using TimerOutputs
#using Plots: plot, plot!, gui

using moment_kinetics.array_allocation: allocate_float
Expand Down Expand Up @@ -128,9 +127,6 @@ test_input_chebyshev_split_3_moments =
"evolve_moments_parallel_pressure" => true))


# Not actually used in the tests, but needed for first argument of run_moment_kinetics
to = TimerOutput()

"""
Run a sound-wave test for a single set of parameters
"""
Expand Down Expand Up @@ -165,7 +161,7 @@ function run_test(test_input, analytic_frequency, analytic_growth_rate,
phi = undef
quietoutput() do
# run simulation
run_moment_kinetics(to, input)
run_moment_kinetics(input)
end

if global_rank[] == 0
Expand Down
6 changes: 1 addition & 5 deletions test/wall_bc_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ include("setup.jl")

using Base.Filesystem: tempname
using MPI
using TimerOutputs

using moment_kinetics.coordinates: define_coordinate
using moment_kinetics.input_structs: grid_input, advection_input
Expand Down Expand Up @@ -139,9 +138,6 @@ cross_compare_phi = [-1.1689445031600723, -0.7419935821024918, -0.70289464898427
-0.6917192346866861, -0.7028946489842764, -0.7419935821024903,
-1.1689445031600707]

# Not actually used in the tests, but needed for first argument of run_moment_kinetics
to = TimerOutput()

"""
Run a test for a single set of parameters
"""
Expand Down Expand Up @@ -174,7 +170,7 @@ function run_test(test_input, expected_phi, tolerance; args...)
phi = undef
quietoutput() do
# run simulation
run_moment_kinetics(to, input)
run_moment_kinetics(input)
end

if global_rank[] == 0
Expand Down

0 comments on commit d2e8491

Please sign in to comment.