Add tests to MPIPreferences starting with GTL parsing#796
Open
Add tests to MPIPreferences starting with GTL parsing#796
Conversation
Member
Author
|
After popular demand in #785 |
Member
Author
vchuravy
reviewed
Nov 5, 2023
Member
vchuravy
left a comment
There was a problem hiding this comment.
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) |
Member
There was a problem hiding this comment.
Suggested change
| if ! isempty(opts_file) | |
| if !isempty(opts_file) |
giordano
reviewed
Nov 9, 2023
| @@ -0,0 +1,3 @@ | |||
| using Test, MPI | |||
|
|
|||
| @test MPI.libmpi == "libmpi_gnu_91.so" No newline at end of file | |||
Member
There was a problem hiding this comment.
Suggested change
| @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 |
| @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 |
Member
There was a problem hiding this comment.
Suggested change
| @test success(r) | |
| @test success(r) | |
Comment on lines
+31
to
+32
| if isfile(local_pref_1) rm(local_pref_1) end | ||
| if isfile(local_pref_2) rm(local_pref_2) end |
Member
There was a problem hiding this comment.
Suggested change
| 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.