Our team is working on parallel off-screen rendering. We are going to run it on the cluster, each node of the cluster has two GPUs NVIDIA Tesla k40. The rendering on the node is performed in parallel: each thread renders the part of the scene and after that blending takes place. The rendering is based on OpenGL.
Therefore we have a problem: how can we assign separate GPU to separate thread of rendering?
We know, that there is an extension WGL_NV_gpu_affinity, but as we know, it is for Windows (we work under Linux) and is supported by Quadro only.
The document http://developer.download.nvidia.com/GTC/PDF/GTC2012/PresentationPDF/S0353-GTC2012-Multi-GPU-Rendering.pdf recommends for Linux systems to retrieve separate X-screen for each thread with XOpenDisplay function. But this solution meets difficulties in our case: we do not have administrator’s rights on the cluster, so we are not able to create new X-displays
Therefore, if is there exist another approach to bind OpenGL context to specific GPU?
And one more question. We are using CUDA in the same rendering thread for scene pre-calculation. We are able to bind the thread to GPU with cudaSetDevice. Is it possible force the thread to work with the same GPU in the case of CUDA and in the case of OpenGL context in the same thread?