From 73bebb5f5e84c3f8d7a3042dc1289fddc395fc38 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 26 Apr 2024 11:38:29 +0100 Subject: [PATCH 1/4] Handle updated timestepping options in restart_interpolation_tests.jl --- moment_kinetics/test/restart_interpolation_tests.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/moment_kinetics/test/restart_interpolation_tests.jl b/moment_kinetics/test/restart_interpolation_tests.jl index b8c8899c3..7d7ceb14e 100644 --- a/moment_kinetics/test/restart_interpolation_tests.jl +++ b/moment_kinetics/test/restart_interpolation_tests.jl @@ -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 @@ -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")) From cd4d7cd3525da62bf7d90df6ecdd30599c0d589c Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 26 Apr 2024 12:20:48 +0100 Subject: [PATCH 2/4] Use default 'arch' for macos CI jobs macos jobs may not run on x86-64, so don't tell the setup-julia action to use 'x64' architecture explicitly. The default is to use the architecture of the runner executing the job. --- .github/workflows/examples.yml | 1 - .github/workflows/longtest.yml | 1 - .github/workflows/parallel_test.yml | 1 - .github/workflows/test.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index b563a2f0d..fde7927ad 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -17,7 +17,6 @@ jobs: - uses: julia-actions/setup-julia@v1 with: version: '1.10' - arch: x64 - uses: julia-actions/cache@v1 - name: Test examples run: | diff --git a/.github/workflows/longtest.yml b/.github/workflows/longtest.yml index 9acc1f36b..58307be84 100644 --- a/.github/workflows/longtest.yml +++ b/.github/workflows/longtest.yml @@ -22,7 +22,6 @@ jobs: - uses: julia-actions/setup-julia@v1 with: version: '1.10' - arch: x64 - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 with: diff --git a/.github/workflows/parallel_test.yml b/.github/workflows/parallel_test.yml index 30416a0f5..378e3869e 100644 --- a/.github/workflows/parallel_test.yml +++ b/.github/workflows/parallel_test.yml @@ -52,7 +52,6 @@ jobs: - uses: julia-actions/setup-julia@v1 with: version: '1.10' - arch: x64 - uses: julia-actions/cache@v1 - run: | touch Project.toml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ccaca9dc0..0ea52c2f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,6 @@ jobs: - uses: julia-actions/setup-julia@v1 with: version: '1.10' - arch: x64 - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@v1 with: From 356c0c0da5a4ed5a276aa1da31ba3e7c7704f42d Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 26 Apr 2024 12:24:08 +0100 Subject: [PATCH 3/4] Pass full path to libmpi.dylib explicitly for macos in parallel CI test Tries to find OpenMPI lib path for macos in a somewhat generic way. --- .github/workflows/parallel_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/parallel_test.yml b/.github/workflows/parallel_test.yml index 378e3869e..ca54b53bb 100644 --- a/.github/workflows/parallel_test.yml +++ b/.github/workflows/parallel_test.yml @@ -54,8 +54,9 @@ jobs: version: '1.10' - 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: From ead131955046ab62e69fbefaeb897b58bf97cde6 Mon Sep 17 00:00:00 2001 From: John Omotani Date: Fri, 26 Apr 2024 12:46:41 +0100 Subject: [PATCH 4/4] Update to latest version of setup-julia CI action everywhere --- .github/workflows/debug_checks.yml | 2 +- .github/workflows/examples.yml | 2 +- .github/workflows/longtest.yml | 2 +- .github/workflows/parallel_test.yml | 4 ++-- .github/workflows/test.yml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/debug_checks.yml b/.github/workflows/debug_checks.yml index a4da80bc5..468547737 100644 --- a/.github/workflows/debug_checks.yml +++ b/.github/workflows/debug_checks.yml @@ -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 diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index fde7927ad..405ffcb9e 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: '1.10' - uses: julia-actions/cache@v1 diff --git a/.github/workflows/longtest.yml b/.github/workflows/longtest.yml index 58307be84..80b9a9677 100644 --- a/.github/workflows/longtest.yml +++ b/.github/workflows/longtest.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: '1.10' - uses: julia-actions/cache@v1 diff --git a/.github/workflows/parallel_test.yml b/.github/workflows/parallel_test.yml index ca54b53bb..88fd99e63 100644 --- a/.github/workflows/parallel_test.yml +++ b/.github/workflows/parallel_test.yml @@ -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 @@ -49,7 +49,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' - uses: julia-actions/cache@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ea52c2f0..edb0bffa2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@latest with: version: '1.10' - uses: julia-actions/cache@v1