From 2cf8ca5f8cdd3b2efb5653dde4da8e5c61143cf1 Mon Sep 17 00:00:00 2001 From: Tom Lin Date: Thu, 10 Jun 2021 04:57:52 +0100 Subject: [PATCH] Use addprocs() for DistributedStream --- .github/workflows/main.yaml | 5 +++++ JuliaStream.jl/README.md | 2 +- JuliaStream.jl/src/DistributedStream.jl | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3c90b37..f666150 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -13,14 +13,19 @@ jobs: - name: Setup project run: julia --project -e 'import Pkg; Pkg.instantiate()' - name: Test run PlainStream.jl + if: ${{ ! cancelled() }} run: julia --project src/PlainStream.jl --arraysize 100 - name: Test run ThreadedStream.jl + if: ${{ ! cancelled() }} run: julia --threads 2 --project src/ThreadedStream.jl --arraysize 100 - name: Test run DistributedStream.jl + if: ${{ ! cancelled() }} run: julia -p2 --project src/DistributedStream.jl --arraysize 100 - name: Test run CUDAStream.jl + if: ${{ ! cancelled() }} run: julia --project src/CUDAStream.jl --list - name: Test run AMDGPUStream.jl + if: ${{ ! cancelled() }} run: julia --project src/AMDGPUStream.jl --list test: diff --git a/JuliaStream.jl/README.md b/JuliaStream.jl/README.md index 7d94a34..9126167 100644 --- a/JuliaStream.jl/README.md +++ b/JuliaStream.jl/README.md @@ -26,5 +26,5 @@ 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 - * You must *prepend* the number of processes needed for `DistributedStream`, e.g `julia -p$(nproc) --project src/DistributedStream.jl` + * `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). * 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 970c699..361c737 100644 --- a/JuliaStream.jl/src/DistributedStream.jl +++ b/JuliaStream.jl/src/DistributedStream.jl @@ -2,6 +2,8 @@ using Distributed include("Stream.jl") +addprocs() + @everywhere include("StreamData.jl") @everywhere using SharedArrays @everywhere const SharedArrayData = StreamData{T,SharedArray{T}} where {T}