Switch back to -p for DistributedStream

This commit is contained in:
Tom Lin 2021-06-30 19:03:39 +01:00
parent fe180656d1
commit d675875dcd
3 changed files with 13 additions and 15 deletions

View File

@ -13,7 +13,7 @@ This is an implementation of BabelStream in Julia which contains the following v
Prerequisites
* Julia 1.6+
* Julia >= 1.6+
With Julia on path, run the benchmark with:
@ -24,7 +24,7 @@ With Julia on path, run the benchmark with:
```
**Important:**
* Julia is 1-indexed, so N > 1 in `--device N`
* Thread count for `ThreadedStream` must be set via the `JULIA_NUM_THREADS` environment variable (e.g `export JULIA_NUM_THREADS=$(nproc)`) otherwise it defaults to 1
* `DistributedStream` uses `addprocs()` call directly which defaults to `$(nproc)`, **do not use the `-p <N>` flag** as per the [documentation](https://docs.julialang.org/en/v1/manual/distributed-computing).
* Julia is 1-indexed, so N >= 1 in `--device N`.
* Thread count for `ThreadedStream` must be set via the `JULIA_NUM_THREADS` environment variable (e.g `export JULIA_NUM_THREADS=$(nproc)`) otherwise it defaults to 1.
* Worker count for `DistributedStream` is set with `-p <N>` as per the [documentation](https://docs.julialang.org/en/v1/manual/distributed-computing).
* Certain implementations such as CUDA and AMDGPU will do hardware detection at runtime and may download and/or compile further software packages for the platform.

View File

@ -1,10 +1,9 @@
using Distributed
include("Stream.jl")
addprocs()
@everywhere using Pkg
@everywhere Pkg.activate("."; io=devnull) # don't spam `Activating environment at...`
@everywhere include("StreamData.jl")
@everywhere include("Stream.jl")
@everywhere using SharedArrays
@everywhere const SharedArrayData = StreamData{T,SharedArray{T}} where {T}

View File

@ -1,8 +1,7 @@
struct StreamData{T,C<:AbstractArray{T}}
a::C
b::C
c::C
scalar::T
size::Int
end
a::C
b::C
c::C
scalar::T
size::Int
end