JuliaGPU / JuliaGPU/oneAPI.jl

Segfault with threaded loop

Open
#607 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
215
Forks
37
Avg merge
10h 47m
Merged PRs (30d)
14

Description

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
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reproducer in ThreadedBLASRepo.jl and run it using the provided Julia project, --threads=4 command, and Aurora environment. Trace the threaded loop around oneAPI.device! and oneAPI.zeros to isolate the segfault. Done means the reproducer no longer segfaults, with regression coverage or a documented limitation for this case.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
hpc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.