-
Notifications
You must be signed in to change notification settings - Fork 2
Description
FLAMEGPU/FLAMEGPU2#1289 identfied that when using an optimus laptop, and the nvidia gpu is not selected FLAME GPU will crash with an error related to the flame gpu logo.
As the FLAME GPU 2 visualiser currently only supports visualiastion of an active simulation on a local GPU and use opengl-cuda interop, the visualisation must be running on the same gpu as the simulation.
Ideally, we should be able to detect this on visualsiation startup (if required), and gracefully exit with an error message if the visualisation was not running on an nvidia GPU.
Hopefully a call to cudaGLGetDevices will return 0 devices in this case.
Under linux, it is not possible to force the correct gpu to be used, while on windows linking against cuda is usually enough for the correct gpu to be used, and if not a dllexport can ecourage this but this hasn't been required here due to the cuda link.