ocl
ocl copied to clipboard
NVIDIA drivers - `examples/events.rs` panic
Now panics examples/events :)
Rest of examples works fine.
I'm guessing you're on NVIDIA hardware? If so, I don't think there's anything that can be done until they fix their drivers.
What default engine is choosed to run? 1st? If yes, than it is NVIDIA on my pc.
set the OCL_DEFAULT_PLATFORM_IDX
environment variable to 1
to use the second platform on your system (0
being the first).
Well, with Intel OpenCL it works well.
Yeah. AMD is fine too.
So if you avoid doing complex stuff with event callbacks you'll be fine. I never even use that particular functionality personally because there are other ways to achieve the same thing. I'm not entirely sure exactly what else is affected but that's the only thing I've uncovered in testing.
Shall we leave this issue open?
Guess yes, because nobody reads the closed issues and you may receive the similar bugreports from everyone who tried ocl.
Yeah, I put a note at the bottom of the README too but it's seldom read I guess.
@pravic
If you ever get a chance, would you mind testing this again with the latest version of ocl on master.
I may have fixed the problem.
I've had a look.
ocl\examples>for %f in (*.rs) do echo %f && cargo run --example %~nf > %~nf.log
(run cargo for each .rs file in examples folder).
Here are the results. The following examples were crashed with access violation (segfault):
async_cycles.rs async_menagerie.rs async_process.rs device_check.rs
Panic in event_callbacks.rs:
thread '<unnamed>' panicked at 'assertion failed: `(left == right)` (left: `368`, right: `357`)', event_callbacks.rsthread ':<unnamed>52' panicked at '
assertion failed: `(left == right)` (left: `107`, right: `96`)note: Run with `RUST_BACKTRACE=1` for a backtrace.
', thread '<unnamed>' panicked at 'assertion failed: `(left == right)` (left: `77`, right: `66`)', event_callbacks.rs:52event_callbacks.rs
thread '<unnamed>' panicked at 'assertion failed: `(left == right)` (left: `167`, right: `156`)', event_callbacks.rs:52:
52
However, some of them printed something: example-logs.zip.
When I switched to Intel, I've got a crash with some kind of dumps printed to stderr, for example, async_events.rs: async_cycles.err.zip. event_callbacks worked fine with Intel though.
Appreciate you taking the time to do that. I'll have a look and see if there's anything I can do on this end.
I'm concerned about those segfaults but I doubt there's much I can do about them. The workaround is probably the async_block
feature. The event_callback
panic is likewise still a wontfix
.
Looking at your panics on Intel though, it looks like some sort of issue setting event status. Did you experience the crash with the experimental (IDX: 1), the basic (IDX: 2) Intel platform, or both?
Could I trouble you to run any of the failing examples using the --features async_block
switch?
Do tests pass (specifically the async::rw_vec
test)?
Thanks a lot for your help.
Yep. Sorry for delay, I forgot about it :)
Default run:
echo async_cycles.rs && cargo run --example async_cycles 1>async_cycles.log
async_cycles.rs
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `t:\tamp\ocl\target\debug\examples\async_cycles.exe`
error: process didn't exit successfully: `t:\tamp\ocl\target\debug\examples\async_cycles.exe` (exit code: 3221225477)
With async_block
:
cargo run --example async_cycles --features async_block
Compiling ocl v0.13.1 (file:///T:/tamp/ocl)
Compiling ocl-extras v0.1.0 (file:///T:/tamp/ocl/ocl-extras)
Finished dev [unoptimized + debuginfo] target(s) in 8.99 secs
Running `t:\tamp\ocl\target\debug\examples\async_cycles.exe`
Platform: NVIDIA CUDA
Device: NVIDIA Corporation GeForce GTX 650
Starting cycles (t: 0.000000s) ...
* Fill starting (iter: 0, t: 0.015600s) ...
* Fill complete (iter: 0, t: 6.736812s)
All commands for iteration 0 enqueued (t: 6.736812s)
error: process didn't exit successfully: `t:\tamp\ocl\target\debug\examples\async_cycles.exe` (exit code: 3221225477)
Shows something, then crashes. The same with async_menagerie
:
Task [9] (complex): Buffer initialized.
Task [10] (simple): Buffer initialized.
Buffer pool is now full.
Waiting on 14 tasks to complete...
Task [2]: Complete.
Task [1]: Complete.
Task [0]: Complete.
error: process didn't exit successfully: `t:\tamp\ocl\target\debug\examples\async_menagerie.exe` (exit code: 3221225477)
But async_process
works well with this feature.