You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-25Lines changed: 12 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,12 @@ julia> using ParallelUtilities
24
24
*`pmapreduce_elementwise`
25
25
*`pmapsum_elementwise`
26
26
* Functions to evenly split a Tuple of ranges
27
-
*`evenlyscatterproduct`
28
-
*`nworkersactive`
29
-
*`workersactive`
27
+
*`ProductSplit`
28
+
*`ntasks`
30
29
*`whichproc`
31
30
*`procrange_recast`
32
31
*`localindex`
33
-
*`procid_and_localindex`
32
+
*`whichproc_localindex`
34
33
*`extremadims`
35
34
*`extrema_commonlastdim`
36
35
* Utility functions to query the cluster
@@ -82,10 +81,10 @@ julia> xrange,yrange,zrange = 1:3,2:4,3:6 # ranges should be strictly increasing
82
81
83
82
There are a total of 36 possible `(x,y,z)` combinations possible given these ranges. Let's say that we would like to split the evaluation of the function over 10 processors. We describe the simple way to evaluate this and then explain how this is achieved.
84
83
85
-
The set of parameters may be split up using the function `evenlyscatterproduct`. In this example each of the 10 processors receive a chunk as listed below
84
+
The set of parameters may be split up using the function `ProductSplit`. In this example each of the 10 processors receive a chunk as listed below
86
85
87
86
```julia
88
-
julia> [collect(evenlyscatterproduct((xrange,yrange,zrange),10,i)) for i=1:10]
87
+
julia> [collect(ProductSplit((xrange,yrange,zrange),10,i)) for i=1:10]
@@ -258,8 +257,6 @@ Note that this does not track the progress of the individual maps, it merely tra
258
257
259
258
The two separate functions `pmapreduce` and `pmapreduce_commutative` exist for historical reasons. They use different binary tree structures for reduction. The commutative one might be removed in the future in favour of `pmapreduce`.
260
259
261
-
262
-
263
260
## ProductSplit
264
261
265
262
In the above examples we have talked about the tasks being distributed approximately equally among the workers without going into details about the distribution, which is what we describe here. The package provides an iterator `ProductSplit` that lists that ranges of parameters that would be passed on to each core. This may equivalently be achieved using an
@@ -295,13 +292,6 @@ julia> Tuple(length(ProductSplit((xrange,yrange,zrange),10,i)) for i=1:10)
295
292
(4, 4, 4, 4, 4, 4, 3, 3, 3, 3)
296
293
```
297
294
298
-
The object may be generated through the function `evenlyscatterproduct` using the same signature
0 commit comments