taichi-dev / taichi_elements

High-performance multi-material continuum physics engine in Taichi
MIT License
489 stars 70 forks source link

Cant run the demos #16

Closed matyklug18 closed 4 years ago

matyklug18 commented 4 years ago

this is what it says:

[Taichi] version 0.5.10, cuda 10.2, commit d28533c5, python 3.8.1
llvm-as: /tmp/taichi-v84c1nys/runtime/runtime.ll:485:3: error: instruction expected to be numbered '%6'
  %7 = load i32, i32* %3, align 4
matyklug18 commented 4 years ago

i compiled taichi now with clang 8, and now it says:

[Taichi] version 0.5.10, cuda 10.1, commit d28533c5, python 3.8.1
/home/matyk/taichi/taichi/runtime/llvm/runtime.cpp:108:6: error: functions that differ only in their
      return type cannot be overloaded
void vprintf(Ptr format, Ptr arg);
~~~~ ^
/usr/include/stdio.h:347:12: note: previous declaration is here
extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
       ~~~ ^
/home/matyk/taichi/taichi/runtime/llvm/runtime.cpp:1282:3: error: no matching function for call to
      'vprintf'
  vprintf((Ptr)format, helper.ptr());
  ^~~~~~~
/usr/include/stdio.h:347:12: note: candidate function not viable: no known conversion from 'Ptr'
      (aka 'unsigned char *') to 'const char *__restrict' for 1st argument
extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
           ^
2 errors generated.
yuanming-hu commented 4 years ago

Hi @matyklug18 which OS are you on? Are you installing Taichi via pip or build from source?

matyklug18 commented 4 years ago

i am on linux, kernel 5.4.24-1-MANJARO , and i built from source. i used clang 8.0.1 and llvm 8.0.1.

yuanming-hu commented 4 years ago

Could you try building Taichi with clang-7 (while still using llvm 8.0.1)?

matyklug18 commented 4 years ago

so, i compiled taichi with clang7 along with llvm 8.0.1(all i did was execute the cmake command and the make command), i got the same error as in my comment. probably should mention that the demos launch when not using CUDA(but are extremly slow). the cmake command: cmake .. -DCUDA_VERSION=10.1 -DTI_WITH_CUDA:BOOL=True -D CMAKE_CXX_COMPILER=/opt/llvm70/bin/clang-7 and llvm-config --version(not sure if that is the right command, i have no idea what llvm is) says 8.0.1

matyklug18 commented 4 years ago

seems like its an issue of taichi itself, as i cant run anything that involves it. i will open an issue on https://github.com/taichi-dev/taichi

matyklug18 commented 4 years ago

fixed in https://github.com/taichi-dev/taichi/pull/750