Was trying to set up a small benchmark to see if I can launch a bunch of Oceananigans.jl simulations using DaggerGPU.jl, but encountered an error when calling DaggerGPU.processor(:CUDA), something I took from the runtests.jl file that seemed necessary.
Script:
using Distributed
n_procs = 16
procs = Distributed.addprocs(n_procs)
@everywhere begin
using CUDA
using Dagger
using DaggerGPU
using Oceananigans
end
@everywhere function vast_empty_ocean(arch, N, Nt, Δt)
@info "Worker $(myid()) is spinning up..."
grid = RegularCartesianGrid(size=(N, N, N), extent=(1, 1, 1))
model = IncompressibleModel(architecture=arch, grid=grid)
[time_step!(model, Δt) for _ in 1:Nt]
return model.clock.time
end
cuproc = DaggerGPU.processor(:CUDA)
opts = Dagger.Sch.ThunkOptions(;proctypes=[cuproc])
ctx = Dagger.Context()
addprocs!(ctx, procs)
thunk = Dagger.delayed(vcat, options=opts)((Dagger.delayed(vast_empty_ocean, options=opts)(GPU(), 128, 10000, n) for n in 1:n_procs)...)
job = @async collect(ctx, thunk)
@time result = fetch(job)
Distributed.workers() |> Distributed.rmprocs
Error:
ERROR: LoadError: UndefVarError: ThreadProc not defined
Stacktrace:
[1] getproperty at ./Base.jl:26 [inlined]
[2] processor at /home/alir/.julia/packages/DaggerGPU/NiekK/src/DaggerGPU.jl:19 [inlined]
[3] processor(::Symbol) at /home/alir/.julia/packages/DaggerGPU/NiekK/src/DaggerGPU.jl:18
[4] top-level scope at /home/alir/tmp/dagger/daggergpu_oceananigans.jl:21
[5] include(::String) at ./client.jl:457
[6] top-level scope at REPL[1]:1
in expression starting at /home/alir/tmp/dagger/daggergpu_oceananigans.jl:21
Version info:
julia> versioninfo()
Julia Version 1.5.2
Commit 539f3ce943 (2020-09-23 23:17 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, cascadelake)
Was trying to set up a small benchmark to see if I can launch a bunch of Oceananigans.jl simulations using DaggerGPU.jl, but encountered an error when calling
DaggerGPU.processor(:CUDA)
, something I took from theruntests.jl
file that seemed necessary.Script:
Error:
Version info:
Environment: