Skip to content

Commit 4f33a8c

Browse files
committed
test_io_shared: Test again
1 parent 3dbc974 commit 4f33a8c

1 file changed

Lines changed: 18 additions & 11 deletions

File tree

test/test_io_shared.jl

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
include("common.jl")
22

3+
# Find MPI vendor
4+
library_version = MPI.Get_library_version()
5+
# Peel off MPItrampoline if present
6+
if startswith(library_version, "MPIwrapper ")
7+
library_version = join(split(library_version, "\n")[2:end], "\n")
8+
end
9+
if startswith(library_version, "MPICH ")
10+
vendor = :MPICH
11+
elseif startswith(library_version, "Open MPI ")
12+
vendor = :OpenMPI
13+
else
14+
vendor = nothing
15+
end
16+
317
MPI.Init()
418

519
comm = MPI.COMM_WORLD
@@ -44,12 +58,8 @@ sync()
4458

4559
MPI.File.write_ordered(fh, fill(Int64(rank), rank+1))
4660
sync()
47-
#TODO # TODO: this has to be fixed:
48-
#TODO # https://github.com/JuliaParallel/MPI.jl/issues/555,
49-
#TODO # https://github.com/JuliaParallel/MPI.jl/issues/579
50-
#TODO @test MPI.File.get_position_shared(fh) == sum(1:sz) skip = Sys.isapple() || Sys.iswindows()
51-
# TODO: still broken on Apple with MPICH
52-
@test MPI.File.get_position_shared(fh) == sum(1:sz)
61+
# https://github.com/JuliaParallel/MPI.jl/issues/879
62+
@test MPI.File.get_position_shared(fh) == sum(1:sz) skip = (vendor == :MPICH && Sys.isapple())
5363

5464
MPI.File.seek_shared(fh, 0)
5565
@test MPI.File.get_position_shared(fh) == 0
@@ -60,11 +70,8 @@ MPI.File.read_ordered!(fh, buf)
6070
@test buf == fill(Int64(rank), rank+1)
6171
sync()
6272

63-
#TODO # TODO: this has to be fixed:
64-
#TODO # https://github.com/JuliaParallel/MPI.jl/issues/555
65-
#TODO @test MPI.File.get_position_shared(fh) == sum(1:sz) skip = Sys.iswindows()
66-
# TODO: still broken on Windows with MPICH
67-
@test MPI.File.get_position_shared(fh) == sum(1:sz)
73+
# https://github.com/JuliaParallel/MPI.jl/issues/555
74+
@test MPI.File.get_position_shared(fh) == sum(1:sz) skip = Sys.iswindows()
6875

6976
MPI.File.set_view!(fh, 0, MPI.Datatype(UInt8), MPI.Datatype(UInt8))
7077
sync()

0 commit comments

Comments
 (0)