OpenGL error: error Invalid Operation
Hi,
I have met the similar question as Issue #16 . I am using Ubuntu 16.04 LTS, CUDA 9.2.148 and Nvidia driver version 440.64, which is the same with softgym test environment. I am testing on the local machine and entirely outside of docker.
I got the similar error as Issue #16 .
$ python examples/random_env.py --env_name RopeFlatten --headless 1 Waiting to generate environment variations. May take 1 minute for each variation... OpenGL: glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, GL_RGBA8, width, height) - error Invalid Operation in /home/liaolab/softgym_ws/softgym/PyFlex/bindings/opengl/shadersGL.cpp at line 3464 python: /home/liaolab/softgym_ws/softgym/PyFlex/bindings/opengl/shader.cpp:81: void glAssert(const char*, long int, const char*): Assertion `0' failed. Aborted (core dumped)
Besides, if I did not turn on the headless mode, I got the Segmentation fault mentioned in other issues.
$ python examples/random_env.py --env_name RopeFlatten Waiting to generate environment variations. May take 1 minute for each variation... Could not initialize GL extensions Reshaping Segmentation fault (core dumped)
Since I am working on a local machine, I wonder how I could handle this "error invalid operation error".
For reference, the following are the environment variables setting following the instructions in Issue #9 :
$ echo $PYFLEXROOT /home/liaolab/softgym_ws/softgym/PyFlex echo $PYTHONPATH /home/liaolab/softgym_ws/softgym/PyFlex/bindings/build:/home/liaolab/softgym_ws/softgym/PyFlex/bindings/build:/home/liaolab/softgym_ws/softgym/PyFlex/bindings/build: $ echo $LD_LIBRARY_PATH /home/liaolab/softgym_ws/softgym/PyFlex/external/SDL2-2.0.4/lib/x64:/home/liaolab/softgym_ws/softgym/PyFlex/external/SDL2-2.0.4/lib/x64:/home/liaolab/softgym_ws/softgym/PyFlex/external/SDL2-2.0.4/lib/x64:/home/liaolab/softgym_ws/softgym/PyFlex/external/SDL2-2.0.4/lib/x64:/usr/local/cuda-9.2/lib64
Thank you for any help you can offer!
Having same issue on cluster. Nvidia driver 440.44 CUDA 9.0 Ubuntu 16.04 on the cluster. I actually have this exact same configuration on a remote workstation and softgym has worked great there for the last few months. Interesting that the issue is appearing on cluster with the same configuration now.
In both cases I also didn't use docker. In my case the error is slightly different, it states:
eglInitialize() failedeglChooseConfig() failedeglCreateContext() failedeglCreatePbufferSurface() failedeglQueyContext(EGL_RENDER_BUFFER) failedCould not initialize GL extensions
@chenjq20 Would it be possible if you can provide a more complete description of how you installed SoftGym?
Also, issue 16 does not seem to link anywhere (if I click it, I get nothing). I think you meant https://github.com/Xingyu-Lin/softgym/issues/16
Sorry for the miss of link about issue 16 and 9. I have edited the issue description. Thank you for your kind remind.
I installed SoftGym following the instructions in this blog. The steps involved is as followed.
sudo apt-get install build-essential libgl1-mesa-dev freeglut3-dev libglfw3 libgles2-mesa-dev
conda env create -f environment.yml
conda activate softgym
conda install pybind11
. ./prepare_1.0.sh
. ./compile_1.0.sh
cd ../../..
export PYFLEXROOT=${PWD}/PyFlex
export PYTHONPATH=${PYFLEXROOT}/bindings/build:$PYTHONPATH
export LD_LIBRARY_PATH=${PYFLEXROOT}/external/SDL2-2.0.4/lib/x64:$LD_LIBRARY_PATH
Also, I tried a Nvidia driver version of 460.67 first, but met the problem of Segmentation fault mentioned in Issue #9. Then I uninstalled the 460.67 driver and installed the Nvidia driver version of 440.64, with the cuda version unchanged.
Thank you again for your kind help!
For further reference, the information about the Nvidia driver and cuda is as followed:
$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2018 NVIDIA Corporation Built on Tue_Jun_12_23:07:04_CDT_2018 Cuda compilation tools, release 9.2, V9.2.148 $ nvidia-smi Thu Sep 2 15:23:10 2021
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.64 Driver Version: 440.64 CUDA Version: 10.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 960 Off | 00000000:01:00.0 On | N/A | | N/A 27C P8 N/A / N/A | 59MiB / 4039MiB | 0% Default | +-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 1003 G /usr/lib/xorg/Xorg 57MiB | +-----------------------------------------------------------------------------+
Thanks!
Hi, I am stuck and I wonder if using docker with Ubuntu 16.04 would solve this problem. I will be very appreciated for any help of suggestions!
Hi @chenjq20 sorry about my late response.
In my blog post, I listed a few working configurations that I managed to get, for example with Ubuntu 16.04 I got this with CUDA 9.0 without docker (as stated near the bottom of that post). This seems to be different from the 9.2 version that you report.
It might not hurt to try Docker with Ubuntu 16.04.
By the way in Markdown you can use the triple backticks (`) to make code and command line output more readable (it will keep the spacing the same for each character).
Thank you very much for your suggestions! I will try CUDA 9.0 or Docker and improve the style of code post.
Hi, I have tried to uninstall cuda 9.2 and install cuda 9.0. However, with Ubuntu 16.04 LTS, CUDA 9.0.176 and Nvidia driver version 440.64, I got the same error as reported above:
Waiting to generate environment variations. May take 1 minute for each variation...
OpenGL: glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, GL_RGBA8, width, height) - error Invalid''Operationin /home/liaolab/softgym_ws/softgym/PyFlex/bindings/opengl/shadersGL.cpp at line 3464
python: /home/liaolab/softgym_ws/softgym/PyFlex/bindings/opengl/shader.cpp:81: void glAssert(const char*, long int, const char*): Assertion '0' failed.
Aborted (core dumped)
As I tried to use Docker, I learned that Docker no longer support Ubuntu 16.04. I wonder what change I should take a try.
I wonder if the OpenGL version has effect this error. The OpenGL version is as followed:
OpenGL version string: 3.0 Mesa 18.0.5
Thank you for any help you can offer!
Sorry for the mistaken OpenGL version above. The complete information of OpenGL is as followed:
$ glxinfo | grep OpenGL
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
I wonder if the OpenGL version has something to do with the OpenGL error above and how I could solve this problem.
Thank you!