error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES and Unsupported gpu architecture 'compute_20'

When I compiled my program. The OS is ubuntu 16.04. The GPU is GTX1070.The driver for GPU is NVIDIA-Linux-x86_64-390.48. The cuda is cuda_9.1.85_387.26_linux. I intall the driver for GPU with the following
command: “sudo ./NVIDIA-Linux-x86_64-390.48.run –no-opengl-files ” . when I type the command “glxinfo | grep OpenGL"in the terminal, The following info"OpenGL vendor string: VMware, Inc. OpenGL renderer string: llvmpipe (LLVM 5.0, 256 bits) OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.2.8…” .The vendor string is VMware, Inc. I think it is not right? And when I run a program, there is error " error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES”. SO how I can solve this error?

When I compile is program,there is also another error:nvcc fatal : Unsupported gpu architecture ‘compute_20’, So I can solve this error?

Thank you!

You installed the driver using the option –no-opengl-files, so no OpenGL files are installed. This is advised if graphics output is done on another gpu, e.g. integrated intel. If the monitor is connected to the nvidia gpu, the opengl files have to be installed.
Cuda 9/9.1 has dropped support for compute capability <3.0, so you have to change the used cc in source or set the appropriate commandline option -arch or -gencode.

Thank you very much! I will try.