- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 123
Add tests to MPIPreferences starting with GTL parsing #796
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
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" No newline at end of 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.
| @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 No newline at end of 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.
| end | |
| end | |
| @test success(r) | ||
| test_existing_prefs("cpu") | ||
| r = run(cmd("test_gtl_preload.jl"; a="cpu")) | ||
| @test success(r) No newline at end of 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.
| @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_FILEto a file containing the simulatedcc --cray-print-opts=alloutput.a.
JULIA_MPI_CC_OPTS_FILEsimulates the presence of GTL and checks the generatedLocalPreferences.tomlb.
JULIA_MPI_CC_OPTS_FILEsimulates the absence of GTL and checks the generatedLocalPreferences.tomlc. test
using MPIwith a proviedLocalPreferences.tomlfrom Perlmutter aftermodule load gpud. test
using MPIwith a proviedLocalPreferences.tomlfrom Perlmutter aftermodule load cpuYou don't need a Perlmutter to run these -- this just tests the settings parsing.