Error when running a simple example using Taichi in dev mode)

Hi
I did a fresh install of Taichi on my Win10 system. I used CMake + MSVC to generate and compile the solution. However, I have some errors when I try to run any example provided with the lib. I’m not sure where the error comes from. I installed all the Python dependencies listed in the doc + clang-10 + LLVM-10.0.0. Note that for LLVM, I tried to use both pre-built binaries available on Taichi’s website and some binaries I generated by compiling the source code. Thank you very much for your help.

D:\Dev\taichi> python .\examples\mpm128.py
[Taichi] mode=development
[Taichi] , llvm 10.0.0, commit 3c2e5e9b, win, python 3.8.6
[Taichi] Starting on arch=cuda
[Hint] Use WSAD/arrow keys to control gravity. Use left/right mouse bottons to attract/repel. Press R to reset.
[Taichi] materializing…
[W 10/15/20 19:06:52.643] [llvm_context.cpp:taichi::lang::find_existing_command@123] Potential command clang-7
[W 10/15/20 19:06:52.643] [llvm_context.cpp:taichi::lang::find_existing_command@123] Potential command clang-8
[W 10/15/20 19:06:52.644] [llvm_context.cpp:taichi::lang::find_existing_command@123] Potential command clang-9
[W 10/15/20 19:06:52.644] [llvm_context.cpp:taichi::lang::find_existing_command@123] Potential command clang-10
[W 10/15/20 19:06:52.644] [llvm_context.cpp:taichi::lang::find_existing_command@123] Potential command clang
[E 10/15/20 19:06:52.644] [llvm_context.cpp:taichi::lang::find_existing_command@125] None command found.


  • Taichi Compiler Stack Traceback *

0x7ffd8e5b248a: taichi::print_traceback(line 293 in D:\Dev\taichi\taichi\system\traceback.cpp) in taichi_core.pyd
0x7ffd8e6571d7: taichi::Logger::error(line 115 in D:\Dev\taichi\taichi\util\logging.cpp) in taichi_core.pyd
0x7ffd8e4c7d54: taichi::lang::find_existing_command(line 125 in D:\Dev\taichi\taichi\llvm\llvm_context.cpp) in taichi_core.pyd
0x7ffd8e4c638b: taichi::lang::compile_runtime_bitcode(line 181 in D:\Dev\taichi\taichi\llvm\llvm_context.cpp) in taichi_core.pyd
0x7ffd8e4c4265: taichi::lang::TaichiLLVMContext::clone_runtime_module(line 354 in D:\Dev\taichi\taichi\llvm\llvm_context.cpp) in taichi_core.pyd
0x7ffd8e59fb65: taichi::lang::StructCompiler::make(line 265 in D:\Dev\taichi\taichi\struct\struct_llvm.cpp) in taichi_core.pyd
0x7ffd8e4ff910: taichi::lang::Program::materialize_layout(line 368 in D:\Dev\taichi\taichi\program\program.cpp) in taichi_core.pyd
0x7ffd8e485b09: taichi::lang::layout(line 10 in D:\Dev\taichi\taichi\ir\frontend.cpp) in taichi_core.pyd
0x7ffd8e552033: <lambda_55644380621a23fbcc04fbe196894983>::operator()(line 159 in C:\Users\arnau\AppData\Roaming\Python\Python38\site-packages\pybind11\include\pybind11\pybind11.h) in taichi_core.pyd
0x7ffd8e5181e6: <lambda_55644380621a23fbcc04fbe196894983>::<lambda_invoker_cdecl>(line 100 in C:\Users\arnau\AppData\Roaming\Python\Python38\site-packages\pybind11\include\pybind11\pybind11.h) in taichi_core.pyd
0x7ffd8e4504eb: pybind11::cpp_function::dispatcher(line 624 in C:\Users\arnau\AppData\Roaming\Python\Python38\site-packages\pybind11\include\pybind11\pybind11.h) in taichi_core.pyd
0x7ffd9f18d0c4: PyCFunction_Call in python38.dll
0x7ffd9f1aafe2: PyEval_EvalFrameDefault in python38.dll
0x7ffd9f1a4838: PyEval_EvalCodeWithName in python38.dll
0x7ffd9f1a9daf: PyEval_EvalFrameDefault in python38.dll
0x7ffd9f1a4838: PyEval_EvalCodeWithName in python38.dll
0x7ffd9f1ab899: PyEval_EvalFrameDefault in python38.dll
0x7ffd9f1a4838: PyEval_EvalCodeWithName in python38.dll
0x7ffd9f1a5fbf: PyFunction_Vectorcall in python38.dll
0x7ffd9f15a374: PyObject_FastCallDict in python38.dll
0x7ffd9f158e2e: PyObject_Call_Prepend in python38.dll
0x7ffd9f158d9d: PyCodec_EncodeText in python38.dll
0x7ffd9f15c477: PySequence_GetItem in python38.dll
0x7ffd9f1aca6c: PyEval_EvalFrameDefault in python38.dll
0x7ffd9f1a4838: PyEval_EvalCodeWithName in python38.dll
0x7ffd9f1aabc6: PyEval_EvalFrameDefault in python38.dll
0x7ffd9f1a4838: PyEval_EvalCodeWithName in python38.dll
0x7ffd9f1778df: PyEval_EvalCodeEx in python38.dll
0x7ffd9f17783d: PyEval_EvalCode in python38.dll
0x7ffd9f1770e2: PyArena_New in python38.dll
0x7ffd9f177071: PyArena_New in python38.dll
0x7ffd9f1e354c: PyRun_FileExFlags in python38.dll
0x7ffd9f1e32ef: PyRun_SimpleFileExFlags in python38.dll
0x7ffd9f31679b: PyRun_AnyFileExFlags in python38.dll
0x7ffd9f2c0aaf: Py_gitversion in python38.dll
0x7ffd9f1259e0: Py_RunMain in python38.dll
0x7ffd9f125869: Py_RunMain in python38.dll
0x7ffd9f259939: Py_Main in python38.dll
0x7ff73a951258: Unknown Function in python.exe
0x7ffde6517034: BaseThreadInitThunk in KERNEL32.DLL
0x7ffde76dcec1: RtlUserThreadStart in ntdll.dll

Internal error occurred. Check out this page for possible solutions:


Traceback (most recent call last):
File “.\examples\mpm128.py”, line 104, in
reset()
File “D:\Dev\taichi\python\taichi\lang\kernel.py”, line 574, in wrapped
return primal(*args, **kwargs)
File “D:\Dev\taichi\python\taichi\lang\kernel.py”, line 501, in call
self.materialize(key=key, args=args, arg_features=arg_features)
File “D:\Dev\taichi\python\taichi\lang\kernel.py”, line 301, in materialize
self.runtime.materialize()
File “D:\Dev\taichi\python\taichi\lang\impl.py”, line 228, in materialize
taichi_lang_core.layout(layout)
RuntimeError: [llvm_context.cpp:taichi::lang::find_existing_command@125] None command found.

Have you added clang and llvm-as to your PATH environment variable? Consider type clang --version to cmd to confirm it.

Thank you so much for your answer.
I did add clang and llvm to my PATH env variable.
When I type “clang --version” on a shell I get:
“clang version 10.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: D:\Dev\clang-10.0.0\bin”

Thank you again