diff --git a/.github/workflows/debug_checks.yml b/.github/workflows/debug_checks.yml index 451c08502..087407d9b 100644 --- a/.github/workflows/debug_checks.yml +++ b/.github/workflows/debug_checks.yml @@ -28,8 +28,10 @@ jobs: sed -i -e "s/_debug_level = get_options.*/_debug_level = 2/" moment_kinetics/src/debugging.jl touch Project.toml + # Not sure why installing "NCDatasets" fails at the moment (8/10/2024), but precompilation hangs for this job if it is included, so skip for now. + #julia --project -O3 --check-bounds=yes -e 'using Pkg; Pkg.add(["MPI", "MPIPreferences", "NCDatasets", "PackageCompiler", "Symbolics"]); using MPIPreferences; MPIPreferences.use_jll_binary("OpenMPI_jll")' julia --project -O3 --check-bounds=yes -e 'using Pkg; Pkg.add(["MPI", "MPIPreferences", "PackageCompiler", "Symbolics"]); using MPIPreferences; MPIPreferences.use_jll_binary("OpenMPI_jll")' - julia --project -O3 --check-bounds=no -e 'using MPI; MPI.install_mpiexecjl(; destdir=".")' + julia --project -O3 --check-bounds=yes -e 'using MPI; MPI.install_mpiexecjl(; destdir=".")' julia --project -O3 --check-bounds=yes -e 'using Pkg; Pkg.develop(path="moment_kinetics/"); Pkg.precompile()' julia --project -O3 --check-bounds=yes precompile-with-check-bounds.jl --debug 2 diff --git a/.github/workflows/parallel_test.yml b/.github/workflows/parallel_test.yml index b3eed45e6..5441dcc82 100644 --- a/.github/workflows/parallel_test.yml +++ b/.github/workflows/parallel_test.yml @@ -23,7 +23,7 @@ jobs: touch Project.toml julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_jll_binary("OpenMPI_jll")' julia --project -O3 --check-bounds=no -e 'using MPI; MPI.install_mpiexecjl(; destdir=".")' - julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["Random", "SpecialFunctions", "StatsBase", "Test"]); Pkg.develop(path="moment_kinetics/")' + julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["NCDatasets", "Random", "SpecialFunctions", "StatsBase", "Test"]); Pkg.develop(path="moment_kinetics/")' julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.precompile()' # Need to use openmpi so that we can use `--oversubscribe` to allow using more MPI ranks than physical cores ./mpiexecjl -np 3 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --ci --debug 1 @@ -48,7 +48,7 @@ jobs: touch Project.toml julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["MPI", "MPIPreferences"]); using MPIPreferences; MPIPreferences.use_jll_binary("OpenMPI_jll")' julia --project -O3 --check-bounds=no -e 'using MPI; MPI.install_mpiexecjl(; destdir=".")' - julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["Random", "SpecialFunctions", "StatsBase", "Test"]); Pkg.develop(path="moment_kinetics/")' + julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["NCDatasets", "Random", "SpecialFunctions", "StatsBase", "Test"]); Pkg.develop(path="moment_kinetics/")' julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.precompile()' # Need to use openmpi so that we can use `--oversubscribe` to allow using more MPI ranks than physical cores ./mpiexecjl -np 4 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --ci --debug 1 diff --git a/moment_kinetics/Project.toml b/moment_kinetics/Project.toml index fc61043c9..be7d4b7a4 100644 --- a/moment_kinetics/Project.toml +++ b/moment_kinetics/Project.toml @@ -11,7 +11,6 @@ FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" FastGaussQuadrature = "442a2c76-b920-505d-bb47-c5924d526838" Glob = "c27321d9-0574-5035-807b-f59d2c89b15c" HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -HDF5_jll = "0234f1f7-429e-5d53-9886-15a909be8d59" Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" LegendrePolynomials = "3db4a2ba-fc88-11e8-3e01-49c72059a882" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" @@ -50,7 +49,6 @@ file_io_netcdf = "NCDatasets" manufactured_solns_ext = ["Symbolics", "IfElse"] [compat] -HDF5_jll = "<1.14, >=1.15" julia = "1.9.0" [extras] diff --git a/moment_kinetics/debug_test/sound_wave_inputs.jl b/moment_kinetics/debug_test/sound_wave_inputs.jl index 9f91fa239..3fc865445 100644 --- a/moment_kinetics/debug_test/sound_wave_inputs.jl +++ b/moment_kinetics/debug_test/sound_wave_inputs.jl @@ -1,6 +1,8 @@ test_type = "sound_wave" using moment_kinetics.type_definitions: OptionsDict using moment_kinetics.utils: recursive_merge +using moment_kinetics.file_io: io_has_implementation +using moment_kinetics.input_structs: netcdf # default inputs for tests test_input_finite_difference_1D1V = OptionsDict("output" => OptionsDict("run_name" => "finite_difference_1D1V", @@ -210,7 +212,8 @@ recursive_merge(test_input_finite_difference_1D1V, test_input_chebyshev_1D1V_split_1_moment = recursive_merge(test_input_chebyshev_1D1V, - OptionsDict("output" => OptionsDict("run_name" => "chebyshev_pseudospectral_1D1V_split_1_moment"), + OptionsDict("output" => OptionsDict("run_name" => "chebyshev_pseudospectral_1D1V_split_1_moment", + "parallel_io" => false), "evolve_moments" => OptionsDict("density" => true))) test_input_chebyshev_1D1V_split_2_moments = @@ -223,9 +226,13 @@ recursive_merge(test_input_chebyshev_1D1V_split_2_moments, OptionsDict("output" => OptionsDict("run_name" => "chebyshev_pseudospectral_1D1V_split_3_moments"), "evolve_moments" => OptionsDict("parallel_pressure" => true))) +# Use "netcdf" for a few tests to test the NetCDF I/O if it is available. +const binary_format = io_has_implementation(netcdf) ? "netcdf" : "hdf5" + test_input_chebyshev_cx0_1D1V = recursive_merge(test_input_chebyshev_1D1V, - OptionsDict("output" => OptionsDict("run_name" => "chebyshev_pseudospectral_cx0_1D1V"), + OptionsDict("output" => OptionsDict("run_name" => "chebyshev_pseudospectral_cx0_1D1V", + "binary_format" => binary_format), "reactions" => OptionsDict("charge_exchange_frequency" => 0.0))) test_input_chebyshev_cx0_1D1V_split_1_moment = diff --git a/moment_kinetics/test/harrisonthompson.jl b/moment_kinetics/test/harrisonthompson.jl index 990db4c9d..d0ec7f31b 100644 --- a/moment_kinetics/test/harrisonthompson.jl +++ b/moment_kinetics/test/harrisonthompson.jl @@ -83,7 +83,8 @@ test_input_finite_difference = Dict("composition" => OptionsDict("n_ion_species" "upar_phase" => 0.0, "temperature_amplitude" => 0.0, "temperature_phase" => 0.0), - "output" => OptionsDict("run_name" => "finite_difference"), + "output" => OptionsDict("run_name" => "finite_difference", + "parallel_io" => false), "evolve_moments" => OptionsDict("density" => false, "parallel_flow" => false, "parallel_pressure" => false,