-
官方的安装指南通常来说是最详细的。
我自己试着安装了一下这种需要联合编译的软件,这不是一个成功的安装日志只是记录一下自己的遇到的问题。
- linux 服务器:
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.4 (Final)
Release: 6.4
Codename: Final- OpenFOAM
预安装,module load 加载,版本: openfoam/3.0.1 - 无root权限
这个安装网页,没有提到其它的依赖库,似乎只要有O.F. 相应的版本就可以了。
下面我一步步来尝试安装。
- 首先加载OpenFOAM
- 通过git 下载 LIGGGHTS
$ cd $ mkdir LIGGGHTS $ cd LIGGGHTS $ git clone git://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git LIGGGHTS-PUBLIC
同样安装 CFDEM(R)
$ cd $ mkdir LIGGGHTS $ cd LIGGGHTS $ git clone git://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git LIGGGHTS-PUBLIC $ git clone git://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
获取库中最新文件
cd $HOME/CFDEM/CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION git stash //小心这个操作会擦出本地修改的代码 git pull
设置环境变量:
$ cd $ emacs .bashrc
在.bashrc中写入
#================================================# #- 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 #================================================#
重新登录,信息提示:
using default CFDEM_ADD_LIBS_DIR=/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal using default CFDEM_ADD_LIBS_NAME=additionalLibs_3.0.1 !!! ERROR !!!: CFDEM_ADD_LIBS_DIR/CFDEM_ADD_LIBS_NAME=/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1 does not exist. make new dirs /home/userID/CFDEM/userID-PUBLIC-3.0.1 ? (y/n)
检查安装:
$CFDEM_PROJECT_DIR $CFDEM_SRC_DIR $CFDEM_LIGGGHTS_SRC_DIR
出现三次:
/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1: is a directory
检查pizza的地址?
$ cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/ $ sh cfdemSystemTest.sh
检查结果
********************************************* * C F D E M (R) c o u p l i n g * * * * by DCS Computing GmbH * * www.dcs-computing.com * ********************************************* ********************************* CFDEM(R)coupling system settings: ********************************* CFDEM_VERSION=PUBLIC couple to OF_VERSION=3.0.1 compile option=Opt check if paths are set correctly valid:yes critical:yes - $CFDEM_PROJECT_DIR = /home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1 valid:NO critical:no - $CFDEM_PROJECT_USER_DIR = /home/userID/CFDEM/userID-PUBLIC-3.0.1 does not exist valid:yes critical:yes - $CFDEM_SRC_DIR = /home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src valid:yes critical:yes - $CFDEM_SOLVER_DIR = /home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/applications/solvers valid:yes critical:yes - $CFDEM_TUT_DIR = /home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/tutorials valid:yes critical:yes - $CFDEM_LIGGGHTS_SRC_DIR = /home/userID/LIGGGHTS/LIGGGHTS-PUBLIC/src valid:NO critical:yes - $CFDEM_LPP_DIR = /home/userID/LIGGGHTS/mylpp/src does not exist valid:yes critical:yes - $CFDEM_ADD_LIBS_DIR = /home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal valid:NO critical:no - $CFDEM_PIZZA_DIR = /home/userID/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src does not exist valid:NO critical:no - $CFDEM_TEST_HARNESS_PATH = /home/userID/CFDEM/userID-PUBLIC-3.0.1/log/logFilesCFDEM-PUBLIC-3.0.1 does not exist valid:NO critical:no - $C3PO_SRC_DIR = does not exist library names $CFDEM_LIGGGHTS_LIB_NAME = lmp_fedora_fpic $CFDEM_LIB_NAME = lagrangianCFDEM-PUBLIC-3.0.1 $LD_LIBRARY_PATH = /global/scratch/userID/OpenFOAM/userID-3.0.1/platforms/linux64IccDPInt32Opt/lib:/global/software/OpenFOAM-3.0.1/ThirdParty-3.0.1/platforms/linux64IccDPInt32Opt/lib/openmpi-system:/global/software/OpenFOAM-3.0.1/platforms/linux64IccDPInt32Opt/lib/openmpi-system:/global/software/OpenFOAM-3.0.1/ThirdParty-3.0.1/platforms/linux64IccDPInt32Opt/lib:/global/software/OpenFOAM-3.0.1/platforms/linux64IccDPInt32Opt/lib:/global/software/OpenFOAM-3.0.1/platforms/linux64IccDPInt32Opt/lib/dummy:/global/software/intel/composerxe/mkl/lib/intel64:/global/software/intel/composerxe/lib/intel64:/global/system/globus-5.2.5/lib64 $WM_NCOMPPROCS = $WM_LABEL_SIZE = 32 Additional lib settings .Makefile_vtk_tmp:1: /home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1: No such file or directory make: *** No rule to make target `/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1'. Stop. ******************* g++: /usr/bin/g++ g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3) 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-3) 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++: /global/software/openmpi-1.6.5/intel/bin/mpic++ icpc (ICC) 14.0.2 20140120 Copyright (C) 1985-2014 Intel Corporation. All rights reserved. mpirun: /global/software/openmpi-1.6.5/intel/bin/mpirun mpirun (Open MPI) 1.6.5 Report bugs to http://www.open-mpi.org/community/help/ ********************** additional packages...
结果显示
$CFDEM_PROJECT_USER_DIR $CFDEM_PIZZA_DIR $CFDEM_TEST_HARNESS_PATH $C3PO_SRC_DIR
不存在,不知道有什么影响?
编译LIGGGHTS(R) and CFDEM(R)coupling:
回到home:git clone git://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
注意,这个git clone从手册中似乎不全,我是到他的rep查到的准确地址。
编译LIGGGHTS(R)
安装过程很快,但是我注意到有一个处有错误
using CFDEM_LAMMPS_LIB_DIR=/home/userID/LIGGGHTS/LIGGGHTS-PUBLIC/src/../lib defined by user. using CFDEM_ADD_LIBS_DIR=/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal defined by user. using CFDEM_ADD_LIBS_NAME=additionalLibs_3.0.1 defined by user. !!! ERROR !!!: CFDEM_ADD_LIBS_DIR/CFDEM_ADD_LIBS_NAME=/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1 does not exist.
有一个lib似乎不存在。
接着编译CFDEM(R)coupling
$ cd $ cfdemCompCFDEM
然后就出现了很多error,由于太多,我就不贴了,注意到几处细节:
Please provide the utilities to be compiled in the /global/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/utilities-list.txt file. structure: path to provide the path relative to CFDEM_UT_DIR example: cfdemPostproc/dir
似乎要编译的话,要在
/global/home/userID/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/utilities-list.txt
指定一些具体的求解器, 安装说明书到这里就没有多写了。这次不成功的安装也就到这吧。
-
太感谢,您的分享了,我也遇到到了类似的问题,现在正在找原因,有什么发现咱们再一起讨论,太感谢了。
-
收下我的膝盖和腿毛
-
你好,请问 @random_ran 发的方法你是否自己操作过?我考虑从我的网站添加一个链接直接跳转到这里,让 @random_ran 的大作有更多人关注,:expressionless:
-
@killer_allan
Any feedback? :joking: -
感谢反馈。由于内容版权问题,CFD中国不想牵涉到版权纠纷,很抱歉楼上的内容将随后被删除。不过我会尝试和大家一起写一个比较完整地安装过程,希望对你有帮助。
@赵一铭 不知这周除了那个CFD界文章是否还有时间参考 @random_ran 的过程做一次安装尝试?你看你的时间安排,太近的话我自己装一下也可以 :cheeky:
-
@李东岳 ,感谢东岳大哥及其他同仁的帮忙,这个安装过程还有有些问题,期待问题的解决,谢谢。
-
@xpqiu 最近两天也在试着装CFDEM,碰到了几乎一样的错误。
Please provide the libraries to be compiled in the /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/library-list.txt file.
下面有几条
Make/linux64GccDPInt32Opt/options:64: /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1: No such file or directory make: *** No rule to make target '/home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1'. Stop. Make/linux64GccDPInt32Opt/options:64: /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1: No such file or directory make: *** No rule to make target '/home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle/etc/addLibs_universal/additionalLibs_3.0.1'. Stop. wmake error: file 'Make/linux64GccDPInt32Opt/sourceFiles' could not be created in /home/he/CFDEM/CFDEMcoupling-PUBLIC-3.0.1/src/lagrangian/cfdemParticle
-
@hurricane007
恭喜!期待。
装完了我找人测试下。 -
@hurricane007 您好,新手跪求您的安装教程。万分感谢!!
-