Skip to content

Commit 57ea189

Browse files
committed
rename get/set_errorhandler to errhandler
fixes #500
1 parent d2b4be9 commit 57ea189

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

docs/src/reference/advanced.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ MPI.infoval
3737
## Error handler objects
3838

3939
```@docs
40-
MPI.Errhandler
41-
MPI.get_errorhandler
42-
MPI.set_errorhandler!
40+
MPI.ErrorHandler
41+
MPI.get_errhandler
42+
MPI.set_errhandler!
4343
```
4444

4545
## Miscellaneous

src/deprecated.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,6 @@ import Base: @deprecate
235235
dims .= Dims_create(nnodes, dims), false)
236236
@deprecate(Cart_coords!(comm::Comm, rank::Integer, coords::MPIBuffertype{Cint}),
237237
coords .= Cart_coords(comm, rank), false)
238+
239+
@deprecate(get_errorhandler(obj), get_errhandler(obj), false)
240+
@deprecate(set_errorhandler!(obj, errhandler), set_errhandler!(obj, errhandler), false)

src/environment.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function Init(;threadlevel=:serialized, finalize_atexit=true, errors_return=true
110110

111111
run_init_hooks()
112112
if errors_return
113-
set_default_error_handler_return()
113+
set_default_errhandler_return()
114114
end
115115
_warn_if_wrong_mpi()
116116
end

src/errhandler.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
MPI.Errhandler
2+
MPI.ErrorHandler
33
44
An MPI error handler object. Currently only two are supported:
55
@@ -31,56 +31,56 @@ function free(errh::Errhandler)
3131
return nothing
3232
end
3333

34-
function set_default_error_handler_return()
35-
set_errorhandler!(COMM_SELF, ERRORS_RETURN)
36-
set_errorhandler!(COMM_WORLD, ERRORS_RETURN)
34+
function set_default_errhandler_return()
35+
set_errhandler!(COMM_SELF, ERRORS_RETURN)
36+
set_errhandler!(COMM_WORLD, ERRORS_RETURN)
3737
end
3838

3939
"""
40-
MPI.get_errorhandler(comm::MPI.Comm)
41-
MPI.get_errorhandler(win::MPI.Win)
42-
MPI.get_errorhandler(file::MPI.File.FileHandle)
40+
MPI.get_errhandler(comm::MPI.Comm)
41+
MPI.get_errhandler(win::MPI.Win)
42+
MPI.get_errhandler(file::MPI.File.FileHandle)
4343
4444
Get the current [`Errhandler`](@ref) for the relevant MPI object.
4545
4646
# See also
47-
- [`set_errorhandler!`](@ref)
47+
- [`set_errhandler!`](@ref)
4848
"""
49-
function get_errorhandler(comm::Comm)
49+
function get_errhandler(comm::Comm)
5050
errh = Errhandler()
5151
@mpichk ccall((:MPI_Comm_get_errhandler, libmpi), Cint, (MPI_Comm, Ptr{MPI_Errhandler}), comm, errh)
5252
return errh
5353
end
54-
function get_errorhandler(win::Win)
54+
function get_errhandler(win::Win)
5555
errh = Errhandler()
5656
@mpichk ccall((:MPI_Win_get_errhandler, libmpi), Cint, (MPI_Win, Ptr{MPI_Errhandler}), win, errh)
5757
return errh
5858
end
59-
function get_errorhandler(file::File.FileHandle)
59+
function get_errhandler(file::File.FileHandle)
6060
errh = Errhandler()
6161
@mpichk ccall((:MPI_File_get_errhandler, libmpi), Cint, (MPI_File, Ptr{MPI_Errhandler}), file, errh)
6262
return errh
6363
end
6464

6565
"""
66-
MPI.set_errorhandler!(comm::MPI.Comm, errh::Errhandler)
67-
MPI.set_errorhandler!(win::MPI.Win, errh::Errhandler)
68-
MPI.set_errorhandler!(file::MPI.File.FileHandle, errh::Errhandler)
66+
MPI.set_errhandler!(comm::MPI.Comm, errh::Errhandler)
67+
MPI.set_errhandler!(win::MPI.Win, errh::Errhandler)
68+
MPI.set_errhandler!(file::MPI.File.FileHandle, errh::Errhandler)
6969
7070
Set the [`Errhandler`](@ref) for the relevant MPI object.
7171
7272
# See also
73-
- [`get_errorhandler`](@ref)
73+
- [`get_errhandler`](@ref)
7474
"""
75-
function set_errorhandler!(comm::Comm, errh::Errhandler)
75+
function set_errhandler!(comm::Comm, errh::Errhandler)
7676
@mpichk ccall((:MPI_Comm_set_errhandler, libmpi), Cint, (MPI_Comm, MPI_Errhandler), comm, errh)
7777
return nothing
7878
end
79-
function set_errorhandler!(win::Win, errh::Errhandler)
79+
function set_errhandler!(win::Win, errh::Errhandler)
8080
@mpichk ccall((:MPI_Win_set_errhandler, libmpi), Cint, (MPI_Win, MPI_Errhandler), win, errh)
8181
return nothing
8282
end
83-
function set_errorhandler!(file::File.FileHandle, errh::Errhandler)
83+
function set_errhandler!(file::File.FileHandle, errh::Errhandler)
8484
@mpichk ccall((:MPI_File_set_errhandler, libmpi), Cint, (MPI_File, MPI_Errhandler), file, errh)
8585
return nothing
8686
end

test/test_errorhandler.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ using MPI, Test
22
MPI.Init()
33

44
@test MPI.ERRORS_ARE_FATAL != MPI.ERRORS_RETURN
5-
@test MPI.get_errorhandler(MPI.COMM_SELF) == MPI.ERRORS_RETURN
5+
@test MPI.get_errhandler(MPI.COMM_SELF) == MPI.ERRORS_RETURN
66
@test_throws MPI.MPIError MPI.Send(rand(10), 2, 0, MPI.COMM_SELF)
77

8-
MPI.set_errorhandler!(MPI.COMM_SELF, MPI.ERRORS_ARE_FATAL)
9-
@test MPI.get_errorhandler(MPI.COMM_SELF) == MPI.ERRORS_ARE_FATAL
8+
MPI.set_errhandler!(MPI.COMM_SELF, MPI.ERRORS_ARE_FATAL)
9+
@test MPI.get_errhandler(MPI.COMM_SELF) == MPI.ERRORS_ARE_FATAL
1010

0 commit comments

Comments
 (0)