arrayfire / forge

High Performance Visualization
221 stars 48 forks source link

[Bug] crash when running examples #235

Closed 3togo closed 1 year ago

3togo commented 1 year ago

when I try to run the examples in cuda folder, all crashed with sudden closing while trying to open window.

eg. ./histogram Below is the gdb output

unknown error in /home/eli/git/forge/include/fg/compute_copy.h at line 148 [Thread 0x7fffa77fe000 (LWP 6716) exited] [Thread 0x7fff9e39a000 (LWP 6722) exited] [Thread 0x7fff9eb9b000 (LWP 6721) exited] [Thread 0x7fffa4d5f000 (LWP 6720) exited] [Thread 0x7fffa7fff000 (LWP 6715) exited] [Thread 0x7fffc8ff9000 (LWP 6714) exited] [Thread 0x7fffc97fa000 (LWP 6713) exited] [Thread 0x7fffc9ffb000 (LWP 6712) exited] [Thread 0x7fffca7fc000 (LWP 6711) exited] [Thread 0x7fffcb7fe000 (LWP 6709) exited] [Thread 0x7fffcbfff000 (LWP 6708) exited] [Thread 0x7fffe8cc7000 (LWP 6707) exited] [Thread 0x7fffe94c8000 (LWP 6706) exited] [Thread 0x7fffe9cc9000 (LWP 6705) exited] [Thread 0x7fffea4ca000 (LWP 6704) exited] [Thread 0x7fffeaccb000 (LWP 6703) exited] [Thread 0x7fffeb4cc000 (LWP 6702) exited] [Thread 0x7fffebccd000 (LWP 6701) exited] [Thread 0x7fffec4ce000 (LWP 6700) exited] [Thread 0x7ffff693d000 (LWP 6697) exited] [Thread 0x7fffcaffd000 (LWP 6710) exited] [New process 6697] [Inferior 1 (process 6697) exited with code 01] (gdb)

eli@eli-A17-R4:~/git/forge/build/examples/cuda$ nvidia-smi Thu Sep 8 16:20:13 2022
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 515.65.01 Driver Version: 515.65.01 CUDA Version: 11.7 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A | | N/A 46C P8 6W / N/A | 6MiB / 6144MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1056 G /usr/lib/xorg/Xorg 4MiB | +-----------------------------------------------------------------------------+

9prady9 commented 1 year ago

@3togo stack trace info from description is quite limited, Can you get anything else useful ? Perhaps try graphics examples from CUDA toolkit, that can help narrow down the issue - if it is forge or system issue. Usually, if window opening itself failed, in 99% of cases it is related to system setup.

3togo commented 1 year ago

changing prime-select setting from "on-demand" to "nvidia" will fix the problem.

sudo prime-select nvidia

p.s. it is not a must because some of my computers does not have any problems with forge when prime-select is set to "on demand" mode.