taichi-dev / difftaichi

10 differentiable physical simulators built with Taichi differentiable programming (DiffTaichi, ICLR 2020)
2.47k stars 260 forks source link

diffmpm3d.py doesn‘t work with metal #41

Closed ryanaltair closed 2 years ago

ryanaltair commented 3 years ago
(difftaichi-1-EJh8dB-py3.8) ➜  examples git:(test) ✗ python diffmpm3d.py
[Taichi] mode=release
[Taichi] preparing sandbox at /var/folders/2c/1fvvzc9145j4b2kl3d539vvr0000gn/T/taichi-980668x5
[Taichi] version 0.7.16, llvm 10.0.0, commit 8d24c2f1, osx, python 3.8.9
[Taichi] Starting on arch=metal
[W 04/23/21 14:24:06.938] [impl.py:layout@451] @ti.layout will be deprecated in the future, use ti.root directly to specify data layout anytime before the data structure materializes.
n_particles 30495
n_solid 30495
[Taichi] materializing...
[E 04/23/21 14:24:08.203] Received signal 11 (Segmentation fault: 11)

                            * Taichi Core - Stack Traceback *
==========================================================================================
|                       Module |  Offset | Function                                      |
|----------------------------------------------------------------------------------------|
*               taichi_core.so |     126 | taichi::Logger::error(std::__1::basic_string< |
                                         | char, std::__1::char_traits<char>, std::__1:: |
                                         | allocator<char> > const&, bool)               |
*               taichi_core.so |     228 | taichi::(anonymous namespace)::signal_handler |
                                         | (int)                                         |
*     libsystem_platform.dylib |      29 | (null)                                        |
* AppleIntelKBLGraphicsMTLDriver |       0 | (null)                                      |
*               taichi_core.so |      68 | taichi::lang::metal::(anonymous namespace)::B |
                                         | ufferMemoryView::BufferMemoryView(unsigned lo |
                                         | ng, taichi::lang::MemoryPool*)                |
*               taichi_core.so |     629 | taichi::lang::metal::KernelManager::Impl::Imp |
                                         | l(taichi::lang::metal::KernelManager::Params) |
                                         |                                               |
*               taichi_core.so |     289 | taichi::lang::metal::KernelManager::KernelMan |
                                         | ager(taichi::lang::metal::KernelManager::Para |
                                         | ms)                                           |
*               taichi_core.so |    3122 | taichi::lang::Program::materialize_layout()   |
*               taichi_core.so |     111 | taichi::lang::layout(std::__1::function<void  |
                                         | ()> const&)                                   |
*               taichi_core.so |      93 | void pybind11::cpp_function::initialize<void  |
                                         | (*&)(std::__1::function<void ()> const&), voi |
                                         | d, std::__1::function<void ()> const&, pybind |
                                         | 11::name, pybind11::scope, pybind11::sibling> |
                                         | (void (*&)(std::__1::function<void ()> const& |
                                         | ), void (*)(std::__1::function<void ()> const |
                                         | &), pybind11::name const&, pybind11::scope co |
                                         | nst&, pybind11::sibling const&)::'lambda'(pyb |
                                         | ind11::detail::function_call&)::operator()(py |
                                         | bind11::detail::function_call&) const         |
*               taichi_core.so |    4408 | pybind11::cpp_function::dispatcher(_object*,  |
                                         | _object*, _object*)                           |
*                       Python |     171 | (null)                                        |
*                       Python |     274 | (null)                                        |
*                       Python |     804 | (null)                                        |
*                       Python |   29861 | (null)                                        |
*                       Python |    1947 | (null)                                        |
*                       Python |     227 | (null)                                        |
*                       Python |     346 | (null)                                        |
*                       Python |   29833 | (null)                                        |
*                       Python |     106 | (null)                                        |
*                       Python |     108 | (null)                                        |
*                       Python |   30754 | (null)                                        |
*                       Python |    1947 | (null)                                        |
*                       Python |     227 | (null)                                        |
*                       Python |     155 | (null)                                        |
*                       Python |      61 | (null)                                        |
*                       Python |      78 | (null)                                        |
*                       Python |   10133 | (null)                                        |
*                       Python |     106 | (null)                                        |
*                       Python |     346 | (null)                                        |
*                       Python |   30050 | (null)                                        |
*                       Python |    1947 | (null)                                        |
*                       Python |      51 | (null)                                        |
*                       Python |     102 | (null)                                        |
*                       Python |      82 | (null)                                        |
*                       Python |     133 | (null)                                        |
*                       Python |     660 | (null)                                        |
*                       Python |    1870 | (null)                                        |
*                       Python |     306 | (null)                                        |
*                       Python |      42 | (null)                                        |
*                libdyld.dylib |       1 | (null)                                        |
*                          ??? |       2 | (null)                                        |
==========================================================================================

Internal error occurred. Check out this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting