Skip to content

Commit c9c8fff

Browse files
committed
test_io_shared: Test again
1 parent 5deeb00 commit c9c8fff

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

test/test_io_shared.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,23 @@ rank = MPI.Comm_rank(comm)
77
sz = MPI.Comm_size(comm)
88
filename = MPI.bcast(tempname(), 0, comm)
99

10-
#TODO MPI.Barrier(comm)
11-
1210
# Collective write
1311
fh = MPI.File.open(comm, filename, read=true, write=true, create=true)
1412
@test MPI.File.get_position_shared(fh) == 0
1513

16-
if !MPI.File.get_atomicity(fh)
17-
MPI.File.set_atomicity(fh, true)
18-
end
19-
@test MPI.File.get_atomicity(fh)
20-
2114
function sync()
2215
# First ensure that all local changes are flushed ...
2316
MPI.File.sync(fh)
2417
# ... then wait for all other process to finish doing that ...
2518
MPI.Barrier(comm)
26-
# ... then make sure we see all change that the other processes made.
19+
# ... then make sure we see all changes that the other processes made.
2720
MPI.File.sync(fh)
2821
end
2922

23+
if !MPI.File.get_atomicity(fh)
24+
MPI.File.set_atomicity(fh, true)
25+
end
26+
@test MPI.File.get_atomicity(fh)
3027
sync()
3128

3229
header = "my header"
@@ -51,6 +48,7 @@ sync()
5148
#TODO # https://github.com/JuliaParallel/MPI.jl/issues/555,
5249
#TODO # https://github.com/JuliaParallel/MPI.jl/issues/579
5350
#TODO @test MPI.File.get_position_shared(fh) == sum(1:sz) skip = Sys.isapple() || Sys.iswindows()
51+
# TODO: still broken on Apple
5452
@test MPI.File.get_position_shared(fh) == sum(1:sz)
5553

5654
MPI.File.seek_shared(fh, 0)

0 commit comments

Comments
 (0)