1. 設定conda環境變數
$ sudo vi ~/.bashrc
最後一行加入
export PATH="/home/chiustin/anaconda3/bin:$PATH"
$ sudo vi /etc/profile
export PATH="/home/chiustin/anaconda3/bin:$PATH"
$ sudo vi /etc/profile
最後一行加入
export PATH="/home/chiustin/anaconda3/bin:$PATH"
$ source /etc/profile
2. 安裝
$ conda config --add channels conda-forge
$ conda install hoomd
3. 更新(如果已經有安裝)
$ conda update hoomd
4. 編譯
$ conda install sphinx git mpich2 numpy cmake pkg-config sqlite
$ export SOFTWARE_ROOT=/path/to/prefix
$ git clone --recursive https://bitbucket.org/glotzer/hoomd-blue
$ cd hoomd-blue
$ mkdir build
$ cd build
$ cmake ../ -DCMAKE_INSTALL_PREFIX=${SOFTWARE_ROOT}/lib/python
$ cmake ../ -DCMAKE_INSTALL_PREFIX=${SOFTWARE_ROOT}/lib/python -DCMAKE_CXX_FLAGS=-march=native -DCMAKE_C_FLAGS=-march=native -DENABLE_CUDA=ON -DENABLE_MPI=ON
$ make -j4
$ make test
$ sudo make install (要加sudo 否則會fail)
$ export PYTHONPATH=$PYTHONPATH:${SOFTWARE_ROOT}/lib/python
5. HOOMD-blue example scripts
$ git clone https://bitbucket.org/glotzer/hoomd-examples.git
$ cd hoomd-examples
$ jupyter notebook
參考
沒有留言:
張貼留言