Skip to content

Gracefully handle invalid GL context in optimus laptop under linux #142

@ptheywood

Description

@ptheywood

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions