taichi-dev / meshtaichi

MeshTaichi: A Compiler for Efficient Mesh-based Operations (SIGGRAPH Asia 2022)
225 stars 11 forks source link

Problem of running the examples code #15

Closed hhaofan closed 5 months ago

hhaofan commented 8 months ago

Dear meshtaichi developer:

Thanks for the development. However, when I tried to run the example code, e.g. the ms.py in /mass_spring folder, it gave me the error like below:

taichi.lang.exception.TaichiCompilationError:` 
File "ms.py", line 43, in vv_substep:
        for v1 in v0.verts:
        ^^^^^^^^^^^^^^^^^^^
Traceback (most recent call last):
  File "/home/haoyin/anaconda3/envs/residual_physics_haoyin/lib/python3.8/site-packages/taichi/lang/ast/ast_transformer_utils.py", line 27, in __call__
    return method(ctx, node)
  File "/home/haoyin/anaconda3/envs/residual_physics_haoyin/lib/python3.8/site-packages/taichi/lang/ast/ast_transformer.py", line 1521, in build_For
    return ASTTransformer.build_nested_mesh_for(ctx, node)
  File "/home/haoyin/anaconda3/envs/residual_physics_haoyin/lib/python3.8/site-packages/taichi/lang/ast/ast_transformer.py", line 1464, in build_nested_mesh_for
    entry_expr = _ti_core.get_relation_access(
TypeError: get_relation_access(): incompatible function arguments. The following argument types are supported:
    1. (arg0: taichi::lang::mesh::MeshPtr, arg1: taichi._lib.core.taichi_python.Expr, arg2: taichi::lang::mesh::MeshElementType, arg3: taichi._lib.core.taichi_python.Expr, arg4: taichi._lib.core.taichi_python.DebugInfo) -> taichi._lib.core.taichi_python.Expr

Invoked with: <taichi._lib.core.taichi_python.MeshPtr object at 0x7f2cdc114bb0>, <taichi._lib.core.taichi_python.Expr object at 0x7f2cd3b295b0>, <MeshElementType.Vertex: 0>, <taichi._lib.core.taichi_python.Expr object at 0x7f2cd3ba4ef0>

Also, when I tried to run the vertex_normal/normal.py script, it gave me the error like:

[Taichi] version 1.7.0, llvm 15.0.4, commit 2fd24490, linux, python 3.8.3
[Taichi] Starting on arch=cuda
[E 01/24/24 22:08:23.752 197140] [scalarize.cpp:scalarize_store_stmt@56] Assertion failure: stmt->val->template is<MatrixInitStmt>()

terminate called after throwing an instance of 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >'
Aborted (core dumped)

I am using [Taichi] version 1.7.0, llvm 15.0.4, commit 2fd24490, linux, python 3.8.3 It seems there are some issue of the code. Could you take a look at that? Thanks!

jiayaozhang commented 5 months ago
pip uninstall taichi
pip install taichi==1.6.0

can solve this problem

hhaofan commented 5 months ago

Thanks! It's solved!