Skip to content

Commit

Permalink
Merge pull request #206 from mabarnes/restart-interpolation-test-time…
Browse files Browse the repository at this point in the history
…stepping-options-fix

Handle updated timestepping options in restart_interpolation_tests.jl
  • Loading branch information
johnomotani authored Apr 26, 2024
2 parents 56af1ec + ead1319 commit 1800f80
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/debug_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: mpi4py/setup-mpi@v1
with:
mpi: 'openmpi'
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- name: Test examples
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/longtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/parallel_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: mpi4py/setup-mpi@v1
with:
mpi: 'openmpi'
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
Expand Down Expand Up @@ -49,14 +49,14 @@ jobs:
- uses: mpi4py/setup-mpi@v1
with:
mpi: 'openmpi'
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- run: |
MPILIBPATH=$(find /opt/homebrew/Cellar/open-mpi/ -name libmpi.dylib)
touch Project.toml
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_system_binary()'
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_system_binary(library_names="/opt/homebrew/Cellar/open-mpi/5.0.3/lib/libmpi.dylib")'
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["NCDatasets", "Random", "SpecialFunctions", "Test"]); Pkg.develop(path="moment_kinetics/")'
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.precompile()'
# Need to use openmpi so that the following arguments work:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
with:
version: '1.10'
arch: x64
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
with:
Expand Down
9 changes: 7 additions & 2 deletions moment_kinetics/test/restart_interpolation_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,15 @@ function run_test(test_input, base, message, rtol, atol; tol_3V, kwargs...)
println(" - testing ", message)

# Convert from Tuple of Pairs with symbol keys to Dict with String keys
modified_inputs = Dict(String(k) => v for (k, v) in kwargs)
modified_inputs = Dict(String(k) => v for (k, v) in kwargs
if String(k) keys(test_input["timestepping"]))
modified_timestepping_inputs = Dict(String(k) => v for (k, v) in kwargs
if String(k) keys(test_input["timestepping"]))

# Update default inputs with values to be changed
input = merge(test_input, modified_inputs)
input["timestepping"] = merge(test_input["timestepping"],
modified_timestepping_inputs)

input["run_name"] = name

Expand Down Expand Up @@ -299,7 +304,7 @@ function runtests()
Dict("evolve_moments_parallel_pressure" => true,
"vpa_L" => 1.5*vpa_L, "vz_L" => 1.5*vpa_L))

for (base, base_label) ((base_input, "full-f"),
for (base, base_label) ((base_input_full_f, "full-f"),
(base_input_evolve_density, "split 1"),
(base_input_evolve_upar, "split 2"),
(base_input_evolve_ppar, "split 3"))
Expand Down

0 comments on commit 1800f80

Please sign in to comment.