Skip to content

Commit 7fcee0b

Browse files
samo-linsimonbyrne
authored andcommitted
Add Cart_coords function to comply with ! suffix convention (#273)
Also deprecate existing `Cart_coords!` methods
1 parent 174d67d commit 7fcee0b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/deprecated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const FINALIZE_ATEXIT = Ref(true)
99
@deprecate Info_get(info::Info,key::AbstractString) info[Symbol(key)] false
1010
@deprecate Info_delete(info::Info,key::AbstractString) delete!(info, Symbol(key)) false
1111
@deprecate Info_free(info::Info) free(info) false
12-
12+
@deprecate Cart_coords!(comm::Comm, maxdims::Integer) Cart_coords(comm, maxdims) false
1313

1414
# window functions
1515
@deprecate(Win_create(base::Array{T}, info::Info, comm::Comm, win::Win) where {T},

src/mpi-base.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ function Cart_coords!(comm::Comm, rank::Integer, maxdims::Integer, coords::MPIBu
376376
comm.val, rank, maxdims, coords, 0)
377377
end
378378

379-
function Cart_coords!(comm::Comm, maxdims::Integer)
379+
function Cart_coords(comm::Comm, maxdims::Integer)
380380
ccoords = Vector{Cint}(undef, maxdims)
381381
rank = Comm_rank(comm)
382382
Cart_coords!(comm, rank, maxdims, ccoords)

test/test_cart_coords.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ MPI.Cart_coords!(comm_cart, rank, ndims, ccoords)
1717
@test all(ccoords .>= 0)
1818
@test all(ccoords .< dims)
1919

20-
coords = MPI.Cart_coords!(comm_cart, ndims)
20+
coords = MPI.Cart_coords(comm_cart, ndims)
2121
@test all(coords .>= 0)
2222
@test all(coords .< dims)
2323

test/test_cart_shift.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ periods = [0,1,0]
1010
dims = [0,0,0]
1111
MPI.Dims_create!(nnodes, dims)
1212
comm_cart = MPI.Cart_create(comm, dims, periods, reorder)
13-
coords = MPI.Cart_coords!(comm_cart, ndims)
13+
coords = MPI.Cart_coords(comm_cart, ndims)
1414
disp = 1
1515

1616
for i in 0:2

0 commit comments

Comments
 (0)