-
-
Notifications
You must be signed in to change notification settings - Fork 123
Add missing get/set MPI.File info functions #421
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ libjuliampi.dylib | |
*.cov | ||
*.mem | ||
Manifest.toml | ||
.vscode |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,3 +45,39 @@ data = zeros(Int64, 1) | |
MPI.File.read_at_all!(fh, rank*2, data) | ||
@test data == [rank == 0 ? -1 : rank+1] | ||
close(fh) | ||
|
||
MPI.Barrier(comm) | ||
|
||
# File Info hints | ||
fh = MPI.File.open(comm, filename, read=true) | ||
fh_info = MPI.File.get_info(fh) | ||
|
||
# File Info hints are implementation specific | ||
# so test MPICH dervived implementations | ||
if MPI.MPI_LIBRARY in (MPI.MPICH, MPI.MicrosoftMPI, MPI.IntelMPI, MPI.MVAPICH, MPI.CrayMPICH) | ||
|
||
# MPICH sets some default MPI-IO hints | ||
@test length(keys(fh_info)) > 0 | ||
|
||
# Test that default info hints on mpi-io implementation are present | ||
# cb_buffer_size is one of the reserved MPI 3.1 keywords | ||
@test parse(Int, fh_info[:cb_buffer_size]) > 0 | ||
|
||
# Test that we can attach custom info to an existing FileHandle | ||
MPI.File.set_info!(fh, MPI.Info(:cb_buffer_size=>33554432)) | ||
fh_info = MPI.File.get_info(fh) | ||
@test parse(Int, fh_info[:cb_buffer_size]) == 33554432 | ||
|
||
elseif MPI.MPI_LIBRARY == MPI.OpenMPI | ||
|
||
# OpenMPI does not set any MPI-IO hints by default | ||
@test length(keys(fh_info)) == 0 | ||
|
||
# Test that default info hints on mpi-io implementation are present | ||
@test parse(Int, fh_info[:coll_write_bufsize]) > 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is causing the error: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think i need to play around with OpenMPI's MPI IO implementation some more to understand what the defaults are across different versions. The CI build also doesn't seem to preserve valid file hints. |
||
|
||
# Test that we can attach custom info to an existing FileHandle | ||
MPI.File.set_info!(fh, MPI.Info(:coll_write_bufsize=>33554432)) | ||
fh_info = MPI.File.get_info(fh) | ||
@test parse(Int, fh_info[:coll_write_bufsize]) == 33554432 | ||
end |
Uh oh!
There was an error while loading. Please reload this page.