diff --git a/JuliaStream.jl/README.md b/JuliaStream.jl/README.md index 9126167..851a59d 100644 --- a/JuliaStream.jl/README.md +++ b/JuliaStream.jl/README.md @@ -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 ` 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 ` 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. diff --git a/JuliaStream.jl/src/DistributedStream.jl b/JuliaStream.jl/src/DistributedStream.jl index 361c737..2aa7ae7 100644 --- a/JuliaStream.jl/src/DistributedStream.jl +++ b/JuliaStream.jl/src/DistributedStream.jl @@ -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} diff --git a/JuliaStream.jl/src/StreamData.jl b/JuliaStream.jl/src/StreamData.jl index 07498fe..55e055a 100644 --- a/JuliaStream.jl/src/StreamData.jl +++ b/JuliaStream.jl/src/StreamData.jl @@ -1,8 +1,7 @@ - struct StreamData{T,C<:AbstractArray{T}} - a::C - b::C - c::C - scalar::T - size::Int - end \ No newline at end of file + a::C + b::C + c::C + scalar::T + size::Int +end