Skip to content

Commit aa838b3

Browse files
authored
update pmapreduce example (#13)
* update pmapreduce example * version bump to v0.8.5
1 parent e14043a commit aa838b3

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ParallelUtilities"
22
uuid = "fad6cfc8-4f83-11e9-06cc-151124046ad0"
33
authors = ["Jishnu Bhattacharya"]
4-
version = "0.8.4"
4+
version = "0.8.5"
55

66
[deps]
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"

docs/Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
ParallelUtilities = "fad6cfc8-4f83-11e9-06cc-151124046ad0"
44

55
[compat]
6-
Documenter = "0.25"
6+
Documenter = "0.27"

docs/src/examples/pmapreduce.md

+20
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,26 @@ end
4242

4343
We compare the performance of the serial and parallel evaluations using 20 cores on one node:
4444

45+
We define a caller function first
46+
47+
```julia
48+
function compare_with_serial()
49+
# precompile
50+
main_mapreduce(0)
51+
main_pmapreduce(0)
52+
53+
# time
54+
println("Tesing serial")
55+
A = @time main_mapreduce(5e-6)
56+
println("Tesing parallel")
57+
B = @time main_pmapreduce(5e-6)
58+
59+
# check results
60+
println("Results match : ", A == B)
61+
end
62+
```
63+
64+
We run this caller on the cluster:
4565
```julia
4666
julia> compare_with_serial()
4767
Tesing serial

0 commit comments

Comments
 (0)