-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add tests to MPIPreferences starting with GTL parsing #796
base: master
Are you sure you want to change the base?
Conversation
After popular demand in #785 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you also need to hook it up in CI
cray_opts = readchomp(Cmd(["cc", "--cray-print-opts=all"])) | ||
opts_file = get(ENV, "JULIA_MPI_CC_OPTS_FILE", "") | ||
cray_opts = "" | ||
if ! isempty(opts_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ! isempty(opts_file) | |
if !isempty(opts_file) |
@@ -0,0 +1,3 @@ | |||
using Test, MPI | |||
|
|||
@test MPI.libmpi == "libmpi_gnu_91.so" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@test MPI.libmpi == "libmpi_gnu_91.so" | |
@test MPI.libmpi == "libmpi_gnu_91.so" | |
@test only(MPIPreferences.System.preloads) == "libmpi_gtl_cuda.so" | ||
elseif ARGS[1] == "cpu" | ||
@test isnothing(MPIPreferences.System.preloads) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end | |
end | |
@test success(r) | ||
test_existing_prefs("cpu") | ||
r = run(cmd("test_gtl_preload.jl"; a="cpu")) | ||
@test success(r) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@test success(r) | |
@test success(r) | |
if isfile(local_pref_1) rm(local_pref_1) end | ||
if isfile(local_pref_2) rm(local_pref_2) end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if isfile(local_pref_1) rm(local_pref_1) end | |
if isfile(local_pref_2) rm(local_pref_2) end | |
rm(local_pref_1; force=true) | |
rm(local_pref_2; force=true) |
These tests:
JULIA_MPI_CC_OPTS_FILE
to a file containing the simulatedcc --cray-print-opts=all
output.a.
JULIA_MPI_CC_OPTS_FILE
simulates the presence of GTL and checks the generatedLocalPreferences.toml
b.
JULIA_MPI_CC_OPTS_FILE
simulates the absence of GTL and checks the generatedLocalPreferences.toml
c. test
using MPI
with a proviedLocalPreferences.toml
from Perlmutter aftermodule load gpu
d. test
using MPI
with a proviedLocalPreferences.toml
from Perlmutter aftermodule load cpu
You don't need a Perlmutter to run these -- this just tests the settings parsing.