@@ -83,8 +83,6 @@ const ANY_TAG = Int(MPI_ANY_TAG)
83
83
const TAG_UB = Int (MPI_TAG_UB)
84
84
const UNDEFINED = Int (MPI_UNDEFINED)
85
85
86
-
87
-
88
86
function serialize (x)
89
87
s = IOBuffer ()
90
88
Base. serialize (s, x)
@@ -185,7 +183,7 @@ function Send{T<:MPIDatatype}(obj::T, dest::Integer, tag::Integer, comm::Comm)
185
183
end
186
184
187
185
function send (obj, dest:: Integer , tag:: Integer , comm:: Comm )
188
- buf = serialize (obj)
186
+ buf = MPI . serialize (obj)
189
187
Send (buf, dest, tag, comm)
190
188
end
191
189
@@ -210,7 +208,7 @@ function Isend{T<:MPIDatatype}(obj::T, dest::Integer, tag::Integer, comm::Comm)
210
208
end
211
209
212
210
function isend (obj, dest:: Integer , tag:: Integer , comm:: Comm )
213
- buf = serialize (obj)
211
+ buf = MPI . serialize (obj)
214
212
Isend (buf, dest, tag, comm)
215
213
end
216
214
@@ -240,7 +238,7 @@ function recv(src::Integer, tag::Integer, comm::Comm)
240
238
count = Get_count (stat, UInt8)
241
239
buf = Array (UInt8, count)
242
240
stat = Recv! (buf, Get_source (stat), Get_tag (stat), comm)
243
- (deserialize (buf), stat)
241
+ (MPI . deserialize (buf), stat)
244
242
end
245
243
246
244
function Irecv! {T<:MPIDatatype} (buf:: Union{Ptr{T},Array{T}} , count:: Integer ,
@@ -266,7 +264,7 @@ function irecv(src::Integer, tag::Integer, comm::Comm)
266
264
count = Get_count (stat, UInt8)
267
265
buf = Array (UInt8, count)
268
266
stat = Recv! (buf, Get_source (stat), Get_tag (stat), comm)
269
- (true , deserialize (buf), stat)
267
+ (true , MPI . deserialize (buf), stat)
270
268
end
271
269
272
270
function Wait! (req:: Request )
@@ -358,7 +356,7 @@ function bcast(obj, root::Integer, comm::Comm)
358
356
isroot = Comm_rank (comm) == root
359
357
count = Array (Cint, 1 )
360
358
if isroot
361
- buf = serialize (obj)
359
+ buf = MPI . serialize (obj)
362
360
count[1 ] = length (buf)
363
361
end
364
362
Bcast! (count, root, comm)
@@ -367,7 +365,7 @@ function bcast(obj, root::Integer, comm::Comm)
367
365
end
368
366
Bcast! (buf, root, comm)
369
367
if ! isroot
370
- obj = deserialize (buf)
368
+ obj = MPI . deserialize (buf)
371
369
end
372
370
obj
373
371
end
0 commit comments