yuanming-hu / taichi_mpm

High-performance moving least squares material point method (MLS-MPM) solver. (ACM Transactions on Graphics, SIGGRAPH 2018)
MIT License
2.34k stars 317 forks source link

Compilation error #31

Closed Oscariox closed 4 years ago

Oscariox commented 4 years ago

Hi When I run "python3 install.py", I get this:

clang-6/7 is the only supported compiler for Taichi compiler development

Can you help me?

Oscariox

flynneva commented 4 years ago

hey Oscariox,

I ran into the same problem. go over to @yuanming-hu and clone his taichi repo:

git clone https://github.com/yuanming-hu/taichi
cd taichi

once that finishes, cd into the new taichi directory and run his updated setup script

python3 dev_setup.py

that installed everything correctly for me I think and even configured my environment

yuanming-hu commented 4 years ago

Hi guys,

Sorry about that. Please follow the instruction here: https://taichi.readthedocs.io/en/latest/installation.html#ubuntu-arch-linux-and-mac-os-x

This project depends on a legacy version of taichi, and you are getting the message because your are using the latest version.

flynneva commented 4 years ago

P.S. I fixed the bug i was seeing by installing libc++-dev and clang.

posting here in case others run into the same issue.

sudo apt install clang libc++-dev
yuanming-hu commented 4 years ago

Hi @flynneva

Thanks for trying but I guess the latest version of taichi does not work with taichi_mpm... :-(

flynneva commented 4 years ago

no worries! now I am just trying to get taichi working :)

yuanming-hu commented 4 years ago

https://github.com/yuanming-hu/taichi/tree/legacy This is the branch you will need to use for taichi_mpm. Sorry about the confusion.

Oscariox commented 4 years ago

Thanks it solved my issue

1234shel commented 4 years ago

Even the legacy version does not work for me. I get compile error.

dblanm commented 3 years ago

In case this helps anyone, I managed to install MPM on Ubuntu 20. Below what I did: Clone legacy modules:

git clone https://github.com/yuanming-hu/taichi.git --branch legacy cd taichi git clone https://github.com/yuanming-hu/taichi_runtime external/lib -b linux --depth 1 git submodule update --init --recursive

Install required pip packages

pip install --user psutil pip install --user colorama numpy Pillow flask scipy pybind11 flask_cors GitPython yapf distro requests PyQt5

Install clang-7 and other required libraries

sudo apt-get update sudo apt-get install python3-dev git build-essential cmake make g++ libx11-dev sudo apt-get install libtinfo-dev clang-7 libc++-dev

Build taichi

mkdir build && cd build cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++-7 make -j8

Then write at the end of ~/.bashrc

export TAICHI_NUM_THREADS=8 export TAICHI_REPO_DIR=/your/path/to/taichi export PYTHONPATH=$TAICHI_REPO_DIR/python/:$PYTHONPATH export PATH=$TAICHI_REPO_DIR/bin/:$PATH

Test that it works, run in python: import taichi as tc. If you run python in the same terminal make sure to run 'source ~/.bashrc'

Taichi-MPM installation, run:

ti install mpm