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

Attempt to fix intermittent CI failures #271

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/workflows/longtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ jobs:
# https://github.com/julia-actions/julia-runtest/blob/master/action.yml
# in order to pass customised arguments to `Pkg.test()`
- run: |
julia --check-bounds=yes --color=yes --depwarn=yes --project=moment_kinetics/ -e 'import Pkg; Pkg.test(; test_args=["--long", "--force-optional-dependencies"])'
julia --check-bounds=yes --color=yes --depwarn=yes --project=moment_kinetics/ -e 'import Pkg; Pkg.test(; test_args=["--ci", "--long", "--force-optional-dependencies"])'
shell: bash
8 changes: 4 additions & 4 deletions .github/workflows/parallel_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["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 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 --debug 1
./mpiexecjl -np 4 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --debug 1
./mpiexecjl -np 2 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --debug 1 --long
./mpiexecjl -np 3 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --ci --debug 1
./mpiexecjl -np 4 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --ci --debug 1
./mpiexecjl -np 2 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --ci --debug 1 --long
# Note: MPI.jl's default implementation is mpich, which has a similar option
# `--with-device=ch3:sock`, but that needs to be set when compiling mpich.
shell: bash
Expand All @@ -51,7 +51,7 @@ jobs:
julia --project -O3 --check-bounds=no -e 'import Pkg; Pkg.add(["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 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 --debug 1
./mpiexecjl -np 4 --oversubscribe julia --project -O3 --check-bounds=no moment_kinetics/test/runtests.jl --ci --debug 1
# Note: MPI.jl's default implementation is mpich, which has a similar option
# `--with-device=ch3:sock`, but that needs to be set when compiling mpich.
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ jobs:
# https://github.com/julia-actions/julia-runtest/blob/master/action.yml
# in order to pass customised arguments to `Pkg.test()`
- run: |
julia --check-bounds=yes --color=yes --depwarn=yes --project=moment_kinetics/ -e 'import Pkg; Pkg.test(; test_args=["--force-optional-dependencies"])'
julia --check-bounds=yes --color=yes --depwarn=yes --project=moment_kinetics/ -e 'import Pkg; Pkg.test(; test_args=["--ci", "--force-optional-dependencies"])'
shell: bash
3 changes: 3 additions & 0 deletions moment_kinetics/src/command_line_options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const s = ArgParseSettings()
"--verbose", "-v"
help = "Print verbose output from tests."
action = :store_true
"--ci"
help = "Indicates that tests are running on the CI server."
action = :store_true
# Options for performance tests and plotting
"--machine-name"
help = "Which machine to plot for when using plot_performance.jl?"
Expand Down
8 changes: 7 additions & 1 deletion moment_kinetics/test/setup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ Get a single temporary directory that is the same on all MPI ranks
"""
function get_MPI_tempdir()
if global_rank[] == 0
test_output_directory = tempname()
if get_options()["ci"]
runs_dir = abspath("runs/")
mkpath(runs_dir)
test_output_directory = tempname(runs_dir)
else
test_output_directory = tempname()
end
mkpath(test_output_directory)
else
test_output_directory = ""
Expand Down