Skip to content

Commit 4b17b8f

Browse files
committed
minor changes
1 parent de0a909 commit 4b17b8f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ParallelUtilities.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ end
162162

163163
get_nprocs_node(procs_used::Vector{<:Integer}=workers()) = get_nprocs_node(get_hostnames(procs_used))
164164

165-
function pmapsum(f::Function,iterable,args...;kwargs...) where {T}
165+
function pmapsum(f::Function,iterable,args...;kwargs...)
166166

167167
procs_used = workers_active(iterable)
168168
num_workers = length(procs_used)
@@ -182,9 +182,7 @@ function pmapsum(f::Function,iterable,args...;kwargs...) where {T}
182182
p = first(pid_rank0_on_node)
183183

184184
# Final sum across all nodes
185-
S = @fetchfrom p sum(fetch(f) for f in node_sum_futures)
186-
187-
return S
185+
@fetchfrom p sum(fetch(f) for f in node_sum_futures)
188186
end
189187

190188
function pmap_onebatch_per_worker(f::Function,iterable,args...;num_workers=nothing,kwargs...)

0 commit comments

Comments
 (0)