Skip to content

Segfault with threaded loop #607

Description

@colleeneb

We are seeing a sefgault with some code on Aurora. Credit to @j-hayes . Let us know if more info is needed! It should be reproducible on Aurora.

Reproducer

Code

using oneAPI
using Base.Threads

function main()
    num_devices = 1
    p = 2
    W_matricies = Array{oneAPI.oneArray{Float64}}(undef, num_devices)
    println("starting"); flush(stdout)
    Threads.@threads for device_id in 1:num_devices
        oneAPI.device!(device_id)
        println("Current iteration: ", device_id)
        W_matricies[device_id] = oneAPI.zeros(Float64, p)
        println("done $device_id"); flush(stdout)
    end
    println("done"); flush(stdout)
end
main()

Run

julia --project=/lus/flare/projects/Julia/jacksonjhayes/JuliaChem.jl/aurora_env --threads=4 ThreadedBLASRepo.jl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions