Use addprocs() for DistributedStream
This commit is contained in:
parent
63f471f880
commit
2cf8ca5f8c
5
.github/workflows/main.yaml
vendored
5
.github/workflows/main.yaml
vendored
@ -13,14 +13,19 @@ jobs:
|
|||||||
- name: Setup project
|
- name: Setup project
|
||||||
run: julia --project -e 'import Pkg; Pkg.instantiate()'
|
run: julia --project -e 'import Pkg; Pkg.instantiate()'
|
||||||
- name: Test run PlainStream.jl
|
- name: Test run PlainStream.jl
|
||||||
|
if: ${{ ! cancelled() }}
|
||||||
run: julia --project src/PlainStream.jl --arraysize 100
|
run: julia --project src/PlainStream.jl --arraysize 100
|
||||||
- name: Test run ThreadedStream.jl
|
- name: Test run ThreadedStream.jl
|
||||||
|
if: ${{ ! cancelled() }}
|
||||||
run: julia --threads 2 --project src/ThreadedStream.jl --arraysize 100
|
run: julia --threads 2 --project src/ThreadedStream.jl --arraysize 100
|
||||||
- name: Test run DistributedStream.jl
|
- name: Test run DistributedStream.jl
|
||||||
|
if: ${{ ! cancelled() }}
|
||||||
run: julia -p2 --project src/DistributedStream.jl --arraysize 100
|
run: julia -p2 --project src/DistributedStream.jl --arraysize 100
|
||||||
- name: Test run CUDAStream.jl
|
- name: Test run CUDAStream.jl
|
||||||
|
if: ${{ ! cancelled() }}
|
||||||
run: julia --project src/CUDAStream.jl --list
|
run: julia --project src/CUDAStream.jl --list
|
||||||
- name: Test run AMDGPUStream.jl
|
- name: Test run AMDGPUStream.jl
|
||||||
|
if: ${{ ! cancelled() }}
|
||||||
run: julia --project src/AMDGPUStream.jl --list
|
run: julia --project src/AMDGPUStream.jl --list
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
|||||||
@ -26,5 +26,5 @@ With Julia on path, run the benchmark with:
|
|||||||
**Important:**
|
**Important:**
|
||||||
* Julia is 1-indexed, so N > 1 in `--device N`
|
* 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
|
* 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 <N>` 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.
|
* 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.
|
||||||
|
|||||||
@ -2,6 +2,8 @@ using Distributed
|
|||||||
|
|
||||||
include("Stream.jl")
|
include("Stream.jl")
|
||||||
|
|
||||||
|
addprocs()
|
||||||
|
|
||||||
@everywhere include("StreamData.jl")
|
@everywhere include("StreamData.jl")
|
||||||
@everywhere using SharedArrays
|
@everywhere using SharedArrays
|
||||||
@everywhere const SharedArrayData = StreamData{T,SharedArray{T}} where {T}
|
@everywhere const SharedArrayData = StreamData{T,SharedArray{T}} where {T}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user