-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ti.init(arch=ti.opengl) failed with Taichi 0.8.1 #3069
Comments
Hello! Which GPU do you have? Also can you try the Vulkan backend?
…On Thu, Sep 30, 2021, 8:46 PM Y7K4 ***@***.***> wrote:
*Describe the bug*
With Taichi 0.8.1, ti.init(arch=ti.opengl) doesn't work.
Btw, ti.opengl with v0.7.32 and ti.cpu with v0.8.1 both work.
*To Reproduce*
A minimal Python file to reproduce:
import taichi as ti
ti.init(arch=ti.opengl)
*Log/Screenshots*
Full error message:
(venv) ***@***.***:~$ python3 example.py
[Taichi] version 0.8.1, llvm 10.0.0, commit cc2dd34, linux, python 3.8.10
[Taichi] Starting on arch=opengl
[E 09/30/21 23:36:16.302 52849] ***@***.*** glClearBufferSubData: GL_INVALID_OPERATION
***********************************
* Taichi Compiler Stack Traceback *
***********************************
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::Logger::error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::opengl::check_opengl_error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::opengl::GLCommandList::CmdBufferFill::execute()
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::opengl::GLStream::submit(taichi::lang::CommandList*)
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::opengl::GLStream::submit_synced(taichi::lang::CommandList*)
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::opengl::OpenGlRuntime::OpenGlRuntime()
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so: taichi::lang::OpenglProgramImpl::materialize_runtime(taichi::lang::MemoryPool*, taichi::lang::KernelProfilerBase*, unsigned long**)
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so(+0x45aaeb) [0x7fcac84feaeb]
/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib/taichi_core.so(+0x39ad2e) [0x7fcac843ed2e]
python3(PyCFunction_Call+0x59) [0x5f2cc9]
python3(_PyObject_MakeTpCall+0x150) [0x5f3010]
python3() [0x50bf55]
python3(_PyEval_EvalFrameDefault+0x57d7) [0x56fb87]
python3(_PyEval_EvalCodeWithName+0x26a) [0x568d9a]
python3(_PyFunction_Vectorcall+0x393) [0x5f5b33]
python3(_PyEval_EvalFrameDefault+0x18eb) [0x56bc9b]
python3(_PyEval_EvalCodeWithName+0x26a) [0x568d9a]
python3(PyEval_EvalCode+0x27) [0x68cdc7]
python3() [0x67e161]
python3() [0x67e1df]
python3() [0x67e281]
python3(PyRun_SimpleFileExFlags+0x197) [0x67e627]
python3(Py_RunMain+0x212) [0x6b6e62]
python3(Py_BytesMain+0x2d) [0x6b71ed]
/lib/x86_64-linux-gnu/libc.so.6: __libc_start_main
python3(_start+0x2e) [0x5f96de]
Internal error occurred. Check out this page for possible solutions:https://docs.taichi.graphics/docs/lang/articles/misc/install
Traceback (most recent call last):
File "example.py", line 3, in <module>
ti.init(arch=ti.opengl)
File "/home/kyc/venv/lib/python3.8/site-packages/taichi/lang/__init__.py", line 439, in init
impl.get_runtime().prog.materialize_runtime()
RuntimeError: ***@***.*** glClearBufferSubData: GL_INVALID_OPERATION
*Additional comments*
Output of ti diagnose:
(venv) ***@***.***:~$ ti diagnose
[Taichi] version 0.8.1, llvm 10.0.0, commit cc2dd34, linux, python 3.8.10
*******************************************
** Taichi Programming Language **
*******************************************
Docs: https://taichi.rtfd.io/en/stable
GitHub: https://github.com/taichi-dev/taichi
Forum: https://forum.taichi.graphics
Taichi system diagnose:
python: 3.8.10 (default, Jun 2 2021, 10:49:15)
[GCC 9.4.0]
system: linux
executable: /home/kyc/venv/bin/python3
platform: Linux-5.11.0-36-generic-x86_64-with-glibc2.29
architecture: 64bit ELF
uname: uname_result(system='Linux', node='kyc-T470p', release='5.11.0-36-generic', version='#40~20.04.1-Ubuntu SMP Sat Sep 18 02:14:19 UTC 2021', machine='x86_64', processor='x86_64')
locale: en_US.UTF-8
PATH: /home/kyc/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PYTHONPATH: ['/home/kyc/venv/bin', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/kyc/venv/lib/python3.8/site-packages', '/home/kyc/venv/lib/python3.8/site-packages/taichi/core/../lib']
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
import: <module 'taichi' from '/home/kyc/venv/lib/python3.8/site-packages/taichi/__init__.py'>
cc: False
cpu: True
metal: False
opengl: True
cuda: False
vulkan: True
`glewinfo` not available: [Errno 2] No such file or directory: 'glewinfo'
`nvidia-smi` not available: [Errno 2] No such file or directory: 'nvidia-smi'
[Taichi] version 0.8.1, llvm 10.0.0, commit cc2dd34, linux, python 3.8.10
[Taichi] version 0.8.1, llvm 10.0.0, commit cc2dd34, linux, python 3.8.10
[Taichi] Starting on arch=x64
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/kyc/venv/lib/python3.8/site-packages/taichi/lang/__init__.py", line 439, in init
impl.get_runtime().prog.materialize_runtime()
RuntimeError: ***@***.*** glClearBufferSubData: GL_INVALID_OPERATION
Taichi OpenGL test failed: Command '['/home/kyc/venv/bin/python3', '-c', 'import taichi as ti; ti.init(arch=ti.opengl)']' returned non-zero exit status 1.
[W 09/30/21 23:42:04.918 53403] ***@***.*** Arch=[<Arch.cuda: 5>] is not supported, falling back to CPU
[Taichi] version 0.8.1, llvm 10.0.0, commit cc2dd34, linux, python 3.8.10
[Taichi] Starting on arch=x64
[Taichi] version 0.8.1, llvm 10.0.0, commit cc2dd34, linux, python 3.8.10
*******************************************
** Taichi Programming Language **
*******************************************
Docs: https://taichi.rtfd.io/en/stable
GitHub: https://github.com/taichi-dev/taichi
Forum: https://forum.taichi.graphics
Running example minimal ...
[Taichi] Starting on arch=x64
>>> Running time: 0.36s
42
Consider attaching this log when maintainers ask about system information.
>>> Running time: 9.40s
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3069>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACY7Q5CEBZFNIUP7BSI4I7LUEUVKNANCNFSM5FDXWXNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
My laptop only has an integrated GPU, Intel HD Graphics 630. I just tried the Julia set example with the Vulkan backend, and it worked. |
I think I have a rough idea why this might be happening, but in the
meantime maybe use the Vulkan backend, features wise Vulkan has multiple
Snode root and GL has a semi working global dynamic field, but I do suggest
using Vulkan backend if it works for you!
…On Thu, Sep 30, 2021, 9:30 PM Y7K4 ***@***.***> wrote:
My laptop only has an integrated GPU, Intel HD Graphics 630.
I just tried the Julia set example with the Vulkan backend, and it worked.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3069 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACY7Q5F6GXZBWIJA2YENRWDUEU2MXANCNFSM5FDXWXNQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
So I dug around the issue a bit, from the OpenGL specs: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glClearBufferSubData.xhtml Which claims that there are only two ways this command generates error
However both of these are impossible according to the specs, as we did not call After double checking the code, I realized I used Hopefully that fix will be fixing this issue, as I have no Intel device to test & check against. I'm closing this for now, if this bug still exists after that fix is pushed into the next taichi release, please reopen it for me. |
Which commit fixes this issue? I still get this error with the following release: [Taichi] version 0.8.3, llvm 10.0.0, commit 021af5d, linux, python 3.9.7 [Taichi] Starting on arch=opengl
/usr/local/g/home/nn/.local/lib/python3.9/site-packages/taichi/core/../lib/taichi_core.so: taichi::Logger::error(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool) Internal error occurred. Check out this page for possible solutions: |
Hi, how do you get OpenGL without a GPU? |
Sorry, I am totally new to graphics programming. I was thinking GPU is not necessary for graphics programming. Please correct me if I am wrong. :) Maybe it would helpful to describe the hardware requirement to use Taichi? Thanks |
Hi! If you don't have a GPU you can call It's kind of interesting to see that the GL backend tried to initialize, we should probably address this. You don't need a GPU, just that some taichi examples are written to default to GPU and fallback to CPU. The fallback part failed. |
By the way, if you can provide some details on which cloud provider you used, what linux distro you used, and most preferably a rough idea of what is installed on the system, that would be very helpful for us to fix the fallback |
I just tried taichi v0.8.3 with integrated graphics (same setup as mentioned before: Ubuntu 20.04, Intel HD Graphics 630), and I still got the same issue.
|
@Y7K4 does |
@k-ye For some reason when I use v0.8.0 I get a different error regardless of the backend. This looks like a different issue.
|
Ouch, that's actually sudo apt-get update
sudo apt-get install libz3-dev |
OpenGL backend doesn't work with
|
Thanks. We don't really have your card at hand ;-( Are you able to build Taichi from source (https://docs.taichi.graphics/lang/articles/contribution/dev_install)? If so, could you compare the outcome between
This would help us identify the problem a lot faster |
OK, I will try to build from source later this week. |
OpenGL backend works at both |
Describe the bug
With Taichi 0.8.1,
ti.init(arch=ti.opengl)
doesn't work.Btw,
ti.opengl
with v0.7.32 andti.cpu
with v0.8.1 both work.To Reproduce
A minimal Python file to reproduce:
Log/Screenshots
Full error message:
Additional comments
Output of
ti diagnose
:The text was updated successfully, but these errors were encountered: