-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLocalComm.jl
53 lines (39 loc) · 1.5 KB
/
LocalComm.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
export LocalComm
#This class is to create a stand in for Tpetra's local maps
"""
LocalComm(::Comm{GID, PID, LID})
Creates a comm object that creates an error when inter-process communication is attempted, but still allows access to the correct process ID information
"""
struct LocalComm{GID <: Integer, PID <: Integer, LID <: Integer} <: Comm{GID, PID, LID}
original::Comm{GID, PID, LID}
end
function barrier(comm::LocalComm)
throw(InvalidStateError("Cannot call barrier on a local comm"))
end
function broadcastAll(comm::LocalComm, v::AbstractArray, root::Integer)
throw(InvalidStateError("Cannot call broadcastAll on a local comm"))
end
function gatherAll(comm::LocalComm, v::AbstractArray)
throw(InvalidStateError("Cannot call gatherAll on a local comm"))
end
function sumAll(comm::LocalComm, v::AbstractArray)
throw(InvalidStateError("Cannot call sumAll on a local comm"))
end
function maxAll(comm::LocalComm, v::AbstractArray)
throw(InvalidStateError("Cannot call maxAll on a local comm"))
end
function minAll(comm::LocalComm, v::AbstractArray)
throw(InvalidStateError("Cannot call minAll on a local comm"))
end
function scanSum(comm::LocalComm, v::AbstractArray)
throw(InvalidStateError("Cannot call scanSum on a local comm"))
end
function myPid(comm::LocalComm)
myPid(comm.original)
end
function numProc(comm::LocalComm)
numProc(comm.original)
end
function createDistributor(comm::LocalComm)
throw(InvalidStateError("Cannot call createDistributor on a local comm"))
end