Is there any way to display such Cuda8.0 samples as Mandelbrot ?

I am suffering from such Cuda8.0 samples as Mandelbrot execution problem.

[Developing Environment]
PC:Dell Vostro3668 i7-7700 3.6GHz
OS:Windows10Home
Cuda:Cuda8.0
OpenCV:OpenCV3.1
VS:VisualStudio2015
CMake:CMake3.10.0
GPU 0:intel®HD Graphics 630
GPU 1:NVIDIA Geforce GTX 1050Ti (CC=6.1)

[Symptom]
(1)Such 3D Demo as Vulkan-Shadertoy>Geomechanical of Geeks GPU Caps Viewer 1.38.2.1 works.
(2)bandwidthTest works, deviceQuery works as well.
(3)\CUDA Samples\v8.0\2_Graphics\Mandelbrot\Mandelbrot_vs2015.sln is successfully built. But next message appear on the screen and disappear soon after debug execution.

Data initialization done.
Initializing GLUT…
OpenGL window created.
Creating GL texture…
Texture created.
Creating PBO…
CUDA error at Mandelbrot.cpp:978 code=46(cudaErrorDevicesUnavailable) “cudaGraphicsGLRegisterBuffer(&cuda_pbo_resource, gl_PBO, cudaGraphicsMapFlagsWriteDiscard)”

No Mandelbrot is displayed on the screen. I suppose it is a Cuda-OpenGL interop problem. But I have no way to solve it. Any help is welcome.

This sample is a CUDA-GL interop sample, and that error message usually indicates that the OpenGL context got created on a display device (i.e. a GPU) that is not the same as the device the CUDA context got created on.

To avoid this, you need to force the OpenGL context to get created on the NVIDIA GPU not the Intel GPU.

This is a fairly common problem so if you google for it you will find solutions. One solution is to create a optimus profile for the application.

http://nvidia.custhelp.com/app/answers/detail/a_id/2615/~/how-do-i-customize-optimus-profiles-and-settings%3F

Thank you for your quick response. I’ll examine what you indicated.

I had error messages of Mandelbrot program execution. I had been thinking GPU as not a graphical process measures but as a general purpose GPU measures. So I had been using on board VGA output to the display without any connection to the GPU output. If I changed it to the GPU DVI output, I could get Mandelbrot image without any error messages.