いわて駐在研究日誌2。

NEVER STAND BEHIND ME

CFDEM(OF+LIGGGHTS)

ダウンロード

ここからインストラクションをダウンロードする。要登録。

http://www.cfdem.com/download

インストール&テスト

    インストラクションに従って、gitレポジトリから、LIGGGHTSとCFDcouplingをgit cloneしてくる。
  • 環境変数は下記の通り、~/.bashrcに登録する。OF2.3.xの環境設定が済んでいることが前提のようなので、必要ならば赤字の部分を各自の環境に合わせて適宜修正しておく。

#================================================#
#- source cfdem env vars
export CFDEM_VERSION=PUBLIC
export CFDEM_PROJECT_DIR=$HOME/CFDEM/CFDEMcoupling-$CFDEM_VERSION-$WM_PROJECT_VERSION
export CFDEM_SRC_DIR=$CFDEM_PROJECT_DIR/src
export CFDEM_SOLVER_DIR=$CFDEM_PROJECT_DIR/applications/solvers
export CFDEM_DOC_DIR=$CFDEM_PROJECT_DIR/doc
export CFDEM_UT_DIR=$CFDEM_PROJECT_DIR/applications/utilities
export CFDEM_TUT_DIR=$CFDEM_PROJECT_DIR/tutorials
export CFDEM_PROJECT_USER_DIR=$HOME/CFDEM/$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION
export CFDEM_bashrc=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/bashrc
export CFDEM_LIGGGHTS_SRC_DIR=$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src
export CFDEM_LIGGGHTS_MAKEFILE_NAME=fedora_fpic
export CFDEM_LPP_DIR=$HOME/LIGGGHTS/mylpp/src
export CFDEM_PIZZA_DIR=$HOME/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src
. $CFDEM_bashrc

最後の行は、毎回CFDEMをつかうわけではないので、aliasコマンドにしておく。OF23の環境変数設定をしてから呼び出すこと。

alias OF23CFDEM=". $CFDEM_bashrc"
#================================================#

  • DEMデータをVTKに変換するツールlppもインストール&環境設定

git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/lpp

vi ~/.bashrc

CFDEM_lppPath=~/LIGGGHTS_CFDEM/lpp
alias lpp="python $CFDEM_lppPath/src/lpp.py"
alias pizza  ="python $CFDEM_lppPath/src/pizza.py"

  • 環境設定のテスト

cfdemSysTest

*******************
system settings:
*******************
CFDEM_VERSION=PUBLIC
couple to OF_VERSION=2.3.x
compile option=Opt

check if paths are set correctly
valid:yes critical:yes - $CFDEM_PROJECT_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC
valid:yes critical:no - $CFDEM_PROJECT_USER_DIR = /home/waku/LIGGGHTS_CFDEM/waku-PUBLIC
valid:yes critical:yes - $CFDEM_SRC_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC/src
valid:yes critical:yes - $CFDEM_SOLVER_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC/applications/solvers
valid:yes critical:yes - $CFDEM_TUT_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC/tutorials
valid:yes critical:yes - $CFDEM_LIGGGHTS_SRC_DIR = /home/waku/LIGGGHTS_CFDEM/LIGGGHTS-PUBLIC/src
valid:yes critical:yes - $CFDEM_LPP_DIR = /home/waku/LIGGGHTS_CFDEM/lpp/src
valid:yes critical:no - $CFDEM_PIZZA_DIR = /home/waku/LIGGGHTS_CFDEM/lpp/src
valid:yes critical:no - $CFDEM_TEST_HARNESS_PATH = /home/waku/LIGGGHTS_CFDEM/waku-PUBLIC/log/logFilesCFDEM-PUBLIC-2.3.x

library names
$CFDEM_LIGGGHTS_LIB_NAME = lmp_fedra_fpic
$CFDEM_LIB_NAME = lagrangianCFDEM-PUBLIC-2.3.x
$LD_LIBRARY_PATH  = /usr/local/dakota-6.0.0.Linux.x86_64/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/opt/rh/devtoolset-1.1/root/usr/lib64:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/CGAL-4.3/lib:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/gperftools-svn/lib:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/paraview-3.14.1/lib/paraview-3.14:/home/waku/OpenFOAM/waku-2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/site/2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/dummy:/opt/rh/devtoolset-1.1/root/usr/lib64:/usr/local/dakota-6.0.0.Linux.x86_64/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/usr/lib64:/usr/local/boost/1.49/lib:/usr/local//usr/local/openscad-2013.06/lib:/usr/local//usr/local/openscad-2013.06/lib:/usr/lib64:/usr/local/boost/1.49/lib
$WM_NCOMPPROCS  =
*******************
g++:
/usr/bin/g++
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc:
/usr/bin/gcc
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mpic++:
/usr/lib64/openmpi/bin/mpic++
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mpirun:
/usr/lib64/openmpi/bin/mpirun
mpirun (Open MPI) 1.5.4

Report bugs to http://www.open-mpi.org/community/help/
[waku@ensis10 LIGGGHTS_CFDEM]$ OF23P
[waku@ensis10 LIGGGHTS_CFDEM]$ cfdemSysTest
*******************
system settings:
*******************
CFDEM_VERSION=PUBLIC
couple to OF_VERSION=2.3.x
compile option=Opt

check if paths are set correctly
valid:yes critical:yes - $CFDEM_PROJECT_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC
valid:yes critical:no - $CFDEM_PROJECT_USER_DIR = /home/waku/LIGGGHTS_CFDEM/waku-PUBLIC
valid:yes critical:yes - $CFDEM_SRC_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC/src
valid:yes critical:yes - $CFDEM_SOLVER_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC/applications/solvers
valid:yes critical:yes - $CFDEM_TUT_DIR = /home/waku/LIGGGHTS_CFDEM/CFDEMcoupling-PUBLIC/tutorials
valid:yes critical:yes - $CFDEM_LIGGGHTS_SRC_DIR = /home/waku/LIGGGHTS_CFDEM/LIGGGHTS-PUBLIC/src
valid:yes critical:yes - $CFDEM_LPP_DIR = /home/waku/LIGGGHTS_CFDEM/lpp/src
valid:yes critical:no - $CFDEM_PIZZA_DIR = /home/waku/LIGGGHTS_CFDEM/lpp/src
valid:yes critical:no - $CFDEM_TEST_HARNESS_PATH = /home/waku/LIGGGHTS_CFDEM/waku-PUBLIC/log/logFilesCFDEM-PUBLIC-2.3.x

library names
$CFDEM_LIGGGHTS_LIB_NAME = lmp_fedra_fpic
$CFDEM_LIB_NAME = lagrangianCFDEM-PUBLIC-2.3.x
$LD_LIBRARY_PATH  = /opt/rh/devtoolset-1.1/root/usr/lib64:/usr/local/dakota-6.0.0.Linux.x86_64/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/opt/rh/devtoolset-1.1/root/usr/lib64:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/CGAL-4.3/lib:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/gperftools-svn/lib:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64Gcc/paraview-3.14.1/lib/paraview-3.14:/home/waku/OpenFOAM/waku-2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/site/2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/ThirdParty-2.3.x/platforms/linux64GccDPOpt/lib:/home/waku/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/dummy:/opt/rh/devtoolset-1.1/root/usr/lib64:/usr/local/dakota-6.0.0.Linux.x86_64/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/usr/lib64/lib/:/usr/local/openmpi_gcc/lib:/usr/lib64:/usr/local/boost/1.49/lib:/usr/local//usr/local/openscad-2013.06/lib:/usr/local//usr/local/openscad-2013.06/lib:/usr/lib64:/usr/local/boost/1.49/lib
$WM_NCOMPPROCS  =
*******************
g++:
/opt/rh/devtoolset-1.1/root/usr/bin/g++
g++ (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc:
/opt/rh/devtoolset-1.1/root/usr/bin/gcc
gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mpic++:
/usr/lib64/openmpi/bin/mpic++
g++ (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mpirun:
/usr/lib64/openmpi/bin/mpirun
mpirun (Open MPI) 1.5.4

Report bugs to http://www.open-mpi.org/community/help/

コンパイラまわりでエラーがなければ大丈夫そう。

LIGGGTHSのビルド

以下のコマンドを実行してLIGGGHTSをビルドする。

cfdemCompLIG

⇒ 盛大にエラーが出るので調査中。