Skip to content

办公室新Workstation的ubuntu上自己安装Abaqus2017的一些记录

办公室新Workstation的ubuntu上自己安装Abaqus2017的一些记录 published on No Comments on 办公室新Workstation的ubuntu上自己安装Abaqus2017的一些记录

1. 从别处拷过来的安装包,在拷贝过程中可能权限被修改导致无法运行,直接简单粗暴
chmod -R +x *
然后修改所有的Linux.sh
DSY_OS_Release="CentOS"
或者直接用命令
find . -name "Linux.sh" | sudo xargs sed -i 's/export DSY_OS_Release=${DSY_OS_Release}/export DSY_OS_Release=CentOS/g'

2. 运行./StartGUI.sh安装,如果出现错误
error while loading shared libraries: libXm.so.4: cannot open shared object file: No such file or directory
则安装
install libmotif-dev

3. 先安装service(solver),再安装cae

4. 如果安装cae的过程中无法链接license server
安装flexnet
/opt/SIMULIA/License/2017/linux_a64/code/bin/lmutil lmdiag -c 27008@flexnet
ref: http://www.harrisgeospatial.com/Support/SelfHelpTools/HelpArticles/HelpArticles-Detail/TabId/2718/ArtMID/10220/ArticleID/19294/3246.aspx

5. 运行cae的时候
X Error: code 2 major 154 minor 3: BadValue (integer parameter out of range for operation).
虽然没太大影响,总是看的不爽

"
I had a similar issue when running some GL applications via 'ssh -X' and solved it by adding "+iglx" to xserver-command in /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf.

# Dump core
xserver-command=X -core +iglx
After which you either reboot or Ctrl-Alt-F1, login, and 'sudo service lightdm restart'.
"

ref: https://polymerfem.com/forum/finite-element-modeling/computer-software-aa/3288-glx-error-when-launching-abaqus-on-debian

6. 这步不需要,仅作为记录
file ****
ln -s /lib64/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3

另:
如果安装了CUDA,会导致编译很多软件出现locale error stray *** in program等问题。去掉环境变量即可

7. 对于ansys workbench,会出现Unable to resolve function glXMakeCurrent等等,参考
https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/589250

sudo ln -s /usr/lib/nvidia-384/libGL.so.384.98 /usr/lib/libGL.so.1

安装meshlab心得

安装meshlab心得 published on No Comments on 安装meshlab心得

Workstation的glibc版本过低,无解。只能往ubuntu装

1. 下载vcglib 1.01,
https://github.com/cnr-isti-vclab/vcglib/releases
这是一个header file only的库,不用安装

2. 选择相应meshlab版本,V2016.12,
http://www.meshlab.net/#download

3. 按照readme里面的提示放置。qt需要5.8版本,设置好路径

4. 安装
cd src/external/
gmake external.pro
make

cd src/
gmake meshlab_full.pro
make

5. 出错
Cannot find file: /home/nicklj/Platform/thirdparty/meshlab/src/plugins_experimental/io_TXT/io_TXT.pro.
make: *** [sub-plugins_experimental-io_TXT-make_first-ordered] Error 2
发现目录里面io_txt.pro是小写,这是在逗我?
mv plugins_experimental/io_TXT/io_txt.pro plugins_experimental/io_TXT/io_TXT.pro

5. 继续出错
/usr/bin/ld: ../../external/lib/linux-g++/libmpir.a(lt4-clear.o): unrecognized relocation (0x2a) in section `.text'
参考:https://github.com/cnr-isti-vclab/meshlab/issues/47

LibMpir is an external library that could be a little tricky to compile (that's particularly true on Windows...a lot easier on Linux), so we provide inside the MeshLab source code an already compile version of the library itself. Obviously that approach could be dangerous, considering the wide range of the compilers existing. If you are interested in the plugin I suggest you to:

download the mpir 2.4.0 source code from the mpir official site http://mpir.org/downloads.html
call ./configure --enable-cxx --enable-static --with-pic in the extracted library folder
call ./make
move the generated mpir.h and mpirxx.h in src\external\inc\linux-g++\mpir-2.4.0
move the static libs libmpir.a and libmpirxx.a in src\external\lib\linux-g+(be careful the files are compiled in a hidden folder if you have the "don't show hidden folders" file browser option set to true you can waste an afternoon, as it happens to me, to find the compiled libs 😀 )
try to compile again the filter_csg plugin in MeshLab

编译后的.a文件在.lib目录下

6. make meshlab, 搞定

qtcreator: /lib64/libc.so.6: version `GLIBC_2.14' not found (最后还是没有比较好的解决办法)

qtcreator: /lib64/libc.so.6: version `GLIBC_2.14' not found (最后还是没有比较好的解决办法) published on No Comments on qtcreator: /lib64/libc.so.6: version `GLIBC_2.14' not found (最后还是没有比较好的解决办法)

https://my.oschina.net/zhangxu0512/blog/262275

Run qtcreator, cannot find GLIBC_2.14

1. Check current glibc
strings /lib64/libc.so.6 |grep GLIBC

2. 从http://www.gnu.org/software/libc/ 下载源代码。我下载的版本是2.14,链接地址是http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
However, 2.14 cannot be compiled by gcc5.2.0, so I download the 2.20

3.
tar xvf glibc-2.14.tar.gz
cd glibc-2.14
mkdir build
cd ./build
../configure --prefix=/opt/glibc-2.14
make -j4
make install

4. There will be
Error: no such instruction: `vinserti128 $1,%xmm0,%ymm0,%ymm0'

5. Install binutils-2.25

6. 运行的时候依然有问题
转自 https://herowong.me/archives/install-and-running-multiple-version-glibc-in-a-single-host-1.html

可以通过ldd命令查看程序依赖的动态库

一般情况下(在没有指定DT_RPATH和DT_RUNPATH的情况下)
1.先查找$LD_LIBRARY_PATH中的目录
2.再查找缓存文件/etc/ld.so.cache
3.再默认的目录/lib,/usr/lib或者是/lib64和/usr/lib64

ld.so.cache缓存文件可以通过ldconfig命令来配置,具体就不多说了
而在用gcc编译一个程序的时候加载动态库文件的顺序又是怎么样的呢?
1.由gcc写死的路径,通过gcc –print-search-dirs看到,这里加载的是一些 libgcc_s.so的库
2.$LIBRARY_PATH变量指定目录或者是编译-L参数指定的目录
3.由ld命令设定的目录,这部分也是在编译ld这个程序时写死的,可以通过“ld –verbose | grep SEARCH”来查看

回到刚才的问题,把新版本的Glibc添加到$LD_LIBRARY_PATH加会导致其它常用的程序如ls会挂掉,那我能不能把编译我想要的工具时指定使用新版的Glibc呢?当然可以,去google一下你可以看到so上的这个问题的答案 在编译的时候加上
-Wl,–rpath=/path/to/newglibc \
-Wl,–dynamic-linker=/path/to/newglibc/ld-linux.so.2

New update on configure deal.ii with trilinos

New update on configure deal.ii with trilinos published on 1 Comment on New update on configure deal.ii with trilinos

Since mpi environment is essential and all package require the same mpi environment, it is better to separate the MPICH into the home folder, not downloaded with petsc. Here is some refined procedures

1,2,3,4. The same as "Tips on setting up deal.ii and petsc"

5. Download and install mpich-3.2.    https://www.mpich.org/. Setup environment variable,

$ export PATH=$PATH:HOME/mpich-3.2/bin

6. Download and install petsc, as in https://www.dealii.org/developer/external-libs/petsc.html. It should be noted that "--download-hypre=1" is required for deal.ii 8.4.0 and later, otherwise there  is error "undefined reference to `PCHYPRESetType' " when compiling program. MPI environment needs to be assigned. However, blas and lapack can be downloaded, since not all softwares require the same blas&lapack. Here is a configuration

./config/configure.py PETSC_ARCH=arch-linux-release \
--with-shared=1 --with-x=0 --with-mpi=1 --download-hypre=1 --with-debugging=0 \
--with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 --download-fblaslapack
(or specify --with-blas-lapack-dir=$MYHOME/fblaslapack-3.4.2)

7. Download and install METIS, P4EST, OpenBLAS as before

8. Download and install trilinos using:

cmake \
-D Trilinos_ENABLE_Sacado=ON \
-D Trilinos_ENABLE_MueLu:BOOL=ON \
-D Trilinos_ENABLE_Anasazi:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_Triutils:BOOL=ON \
-D Trilinos_ENABLE_Belos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D Trilinos_ENABLE_Stratimikos=ON \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_CXX_FLAGS="-g -O3" \
-D CMAKE_C_FLAGS="-g -O3" \
-D CMAKE_FORTRAN_FLAGS="-g -O5" \
-D Trilinos_EXTRA_LINK_FLAGS="-lgfortran -pthread" \
-D CMAKE_VERBOSE_MAKEFILE=ON \
-D Trilinos_VERBOSE_CONFIGURE=OFF \
-D TPL_ENABLE_MPI=ON \
-D MPI_BASE_DIR=$MYHOME/mpich-3.2/bin \
-D BUILD_SHARED_LIBS=ON \
\
-D TPL_ENABLE_BLAS:BOOL=ON \
-D BLAS_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.15/include \
-D BLAS_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.15/lib \
-D BLAS_LIBRARY_NAMES:STRING="libopenblas.a" \
-D TPL_ENABLE_LAPACK=ON \
-D LAPACK_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.15/include \
-D LAPACK_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.15/lib \
-D LAPACK_LIBRARY_NAMES:STRING="libopenblas.a" \
\
-D CMAKE_INSTALL_PREFIX:PATH=$MYHOME/trilinos-11.14.3 \
../

9. If we want to use UMFPACK compiled by ourselves (not significant speed change), download it from http://faculty.cse.tamu.edu/davis/suitesparse.html, unzip to the home folder. It requires blas&lapack, we can use OpenBLAS.
Add "$MYHOME/OpenBLAS-0.2.15/lib" to LD_LIBRARY_PATH, and LIBRARY_PATH environment variable$ make install BLAS=-lopenblas LAPACK=-lopenblas
Since SparseSuite needs to be found by dynamics link at runtime, we need to add $MYHOME/SparseSuite/lib to LD_LIBRARY_PATH

10. Download deal.II 8.4.0 and install (Be careful only deal.II 8.3.0 comes with meshconvert)

cmake \
-DCMAKE_C_COMPILER="mpicc" -DCMAKE_CXX_COMPILER="mpicxx" -DCMAKE_Fortran_COMPILER="mpif90" \
-DCMAKE_INSTALL_PREFIX=$MYHOME/dealii-8.4.0 \
-DDEAL_II_WITH_METIS=ON -DMETIS_DIR=$MYHOME/metis-5.1.0 \
-DDEAL_II_WITH_P4EST=ON -DP4EST_DIR=$MYHOME/p4est-1.1 \
-DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=$MYHOME/trilinos-11.14.3 \
(-DUMFPACK_DIR=$MYHOME/SuiteSparse -DDEAL_II_COMPONENT_PARAMETER_GUI=ON ) ../

A practice of imposing *imperfection for post-buckling analysis in Abaqus

A practice of imposing *imperfection for post-buckling analysis in Abaqus published on No Comments on A practice of imposing *imperfection for post-buckling analysis in Abaqus

1. Step - Linear Perturbation - Buckle

2. Apply boundary conditions and force. This will essentially influence the result. Force direction is very important, but magnitude doesn't matter. Choose the number of eigenvalues we need, generally 10 is enough.

3. Edit inp file. In the output region, we add

** OUTPUT REQUESTS
*Node file, global=yes
U

The result node will be written in the *.fil

4. Observe in the result which mode we need. Try to adjust the scaling factor to see what is a appropriate value for imposing the imperfection, see 1e-5 for example

5. Edit the analysis inp file, add

*IMPERFECTION, FILE=aaa, STEP=1, (NSET=NodeSet)
7, 2e-5

This can be put just before all the steps.
When the NSET is used, be careful of the boundary condition and contact constrain if multiple instances exist in the assembly

6. Run the analysis

Tips on setting up deal.ii and petsc

Tips on setting up deal.ii and petsc published on No Comments on Tips on setting up deal.ii and petsc

Install deal.ii along is quite strait forward. We just need to download the latest package from http://dealii.org/download.html, and compile it according to the documents https://www.dealii.org/developer/readme.html

Generally, this can be down without any problem, and most of the cases in the example folder can be run correctly. However, when comes to the MPI, problem will occur. deall.ii requires to work together with petsc, but there are always some problems. Now I just record some tips which may help the successfully setup of both softwares. These procedures are just concepts and can only work for my case. The directory need to be modified in other system.

1. Deactive the environment setup of intel compiler. This will be investigated in the future.

2. Compile and install gcc-5.2.0, the version 4.8.4 used in ubuntu seems cannot work well with deal.ii+petsc+MPI+cxx11. Besides, in the company's computer, the gcc version is quite old, and we need to build ourselves gcc. Ref: https://gcc.gnu.org/wiki/InstallingGCC

3. Set environment variable,
export PATH=$HOME/gcc-5.2.0/bin:$PATH
export LD_LIBRARY_PATH=$HOME/gcc-5.2.0/lib64

4. In the company's computer, there is no cmake. So we need to compile it, and add it to the $PATH. Also download the boost if required. Boost do not need to install, just set env.

5. Download and install petsc. The most easy way to configure it is
./configure --download-fblaslapack --download-mpich
make all test

6. So we just use this mpich as our default mpi, set env
export PETSC_DIR=$HOME/petsc-3.6.1
export PETSC_ARCH=arch-linux2-c-debug
export PATH=$HOME/petsc-3.6.1/arch-linux2-c-debug/bin:$PATH   (this is for downloaded mpich)

7. In order to run MPI program in deal.ii, we also need a library call METIS. Download and compile it.

8. Download and configure deal.ii
cmake -DCMAKE_INSTALL_PREFIX=$HOME/dealii-8.3.0 -DDEAL_II_WITH_METIS=ON -DMETIS_DIR=$HOME/metis-5.1.0 ../
need to be notice whether the following terms on turn to ON
i.e. C++11, MPI, METIS, PETSC
then, make install(If problems occurs or MPI and PETSC cannot be configured correctly, try "export CC=mpicc CXX=mpicxx"

9. If deal.ii is compiled in the Virtualbox, DON'T compile in parallel

10. If ubuntu 14.04 (Trusty) is used, strange errors may occur during compiling. Ref: https://groups.google.com/forum/#!msg/dealii/1oM3cqR0pWU/zOlMHspD9n8J
The method to fix:
sudo add-apt-repository ppa:bzindovic/suitesparse-bugfix-1319687
sudo apt-get update
sudo apt-get upgrade

--------------------------------------------------------------------------------

2015.10.07

If p4est and trilinos are required, refer to the following steps

11. Download the source code of p4est from: http://www.p4est.org/. Download the source package, and don't clone the git source.

12. Install p4est
$ ./configure --prefix=$HOME/p4est-1.1 --enable-mpi BLAS_LIBS=$MYHOME/petsc-3.6.1/arch-linux2-c-debug/lib/libfblas.a LAPACK_LIBS=$MYHOME/petsc-3.6.1/arch-linux2-c-debug/lib/libflapack.a
$ make -j2 && make install

13. Install netcdf, matio, glm(what's this? Required by trilinos)
$ sudo apt-get install libnetcdf-dev libmatio-dev libglm-dev

14. Unzip the trilinon source package, refer to the INSTALL file
$ mkdir build && cd build
$ cmake -DTPL_ENABLE_MPI=ON -DTrilinos_ENABLE_ALL_PACKAGES=ON \
-DCMAKE_INSTALL_PREFIX=<path to install Trilinos into> ../
$ make -j<n> install

15. Alternatively, maybe it is a better ideal to follow the guild on dealii website as https://www.dealii.org/developer/external-libs/trilinos.html. There are also many other guild regarding to the lib installation and worth reading.
cmake \
-D Trilinos_ENABLE_Sacado=ON \
-D Trilinos_ENABLE_MueLu:BOOL=ON \
-D Trilinos_ENABLE_Stratimikos=ON \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_CXX_FLAGS="-g -O3" \
-D CMAKE_C_FLAGS="-g -O3" \
-D CMAKE_FORTRAN_FLAGS="-g -O5" \
-D Trilinos_EXTRA_LINK_FLAGS="-lgfortran" \
-D CMAKE_VERBOSE_MAKEFILE=FALSE \
-D Trilinos_VERBOSE_CONFIGURE=FALSE \
-D TPL_ENABLE_MPI=ON \
-D BUILD_SHARED_LIBS=ON \
-D CMAKE_INSTALL_PREFIX:PATH=$HOME/share/trilinos \

if blas/lapack path need to be specified, we need

cmake \
-D Trilinos_ENABLE_Sacado=ON \
-D Trilinos_ENABLE_MueLu:BOOL=ON \
-D Trilinos_ENABLE_Stratimikos=ON \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_CXX_FLAGS="-g -O3" \
-D CMAKE_C_FLAGS="-g -O3" \
-D CMAKE_FORTRAN_FLAGS="-g -O5" \
-D Trilinos_EXTRA_LINK_FLAGS="-lgfortran -pthread" \
-D CMAKE_VERBOSE_MAKEFILE=FALSE \
-D Trilinos_VERBOSE_CONFIGURE=FALSE \
-D TPL_ENABLE_MPI=ON \
-D BUILD_SHARED_LIBS=ON \
\
-D TPL_ENABLE_BLAS:BOOL=ON \
-D BLAS_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.14/include \
-D BLAS_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.14/lib \
-D BLAS_LIBRARY_NAMES:STRING="libopenblas.a" \
-D TPL_ENABLE_LAPACK=ON \
-D LAPACK_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.14/include \
-D LAPACK_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.14/lib \
-D LAPACK_LIBRARY_NAMES:STRING="libopenblas.a" \
\
-D CMAKE_INSTALL_PREFIX:PATH=$MYHOME/trilinos-11.14.3 \
../

Currently, I found gcc-5.2.0 + OpenBLAS-0.2.41 + trilinos-11.14.3 can work. -pthread is very important here. otherwise errors occurs. Using other Blas semms problem

In order to instal OpenBLAS in virtualbox, use
make TARGET=NEHALEM

16. Then finally we can configure deal.ii by

cmake -DCMAKE_INSTALL_PREFIX=$HOME/dealii-8.3.0 -DDEAL_II_WITH_METIS=ON -DMETIS_DIR=$HOME/metis-5.1.0 -DDEAL_II_WITH_P4EST=ON -DP4EST_DIR=$HOME/p4est-1.1 -DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=$HOME/trilinos-12.2.1 ../

17. We need also add -pthread in the CMakeLists.txt as
set (CMAKE_CXX_FLAGS "-pthread")
SET(CMAKE_CXX_FLAGS "-pthread")
what is the differences?

--------------------------------------------------------------------------------

2015.10.07

这两天在家调程序,发现如果使用了trilinos库,在家里的系统里编译的就一直有问题,总是出现错误。先是不认相关的库,比如对于

TrilinosWrappers::SparseMatrix tm;
TrilinosWrappers::MPI::Vector rhs;
总是说sparseMatrix不是TrilinosWrappers中的类型,或者MPI不是TrilinosWrappers中的类型。后来查了/include/deal.II/lac/trilinos_vector.h ,看起来应该是#ifdef DEAL_II_WITH_TRILINOS这个判断并没有支持trilinos,所以后面就不继续声明了。干脆重装trilinos并重新编译dealii,所有都通过了,程序编译也都成功了,结果总是出现错误

/usr/bin/ld: warning: libmpi.so.1, needed by /home/nicklj/trilinos-11.14.3/lib/libmuelu-adapters.so, may conflict with libmpi.so.12
/usr/bin/ld: warning: libmpi.so.1, needed by /home/nicklj/trilinos-11.14.3/lib/libmuelu-adapters.so, may conflict with libmpi.so.12
CMakeFiles/main.dir/src/DE_implicit.cc.o: In function `dealii::TrilinosWrappers::MPI::Vector& dealii::TrilinosWrappers::MPI::Vector::operator=<double>(dealii::Vector<double> const&)':
/home/nicklj/dealii-8.3.0/include/deal.II/lac/trilinos_vector.h:695: undefined reference to `Epetra_MpiComm::Epetra_MpiComm(int)'
/home/nicklj/dealii-8.3.0/lib/libdeal_II.g.so.8.3.0: undefined reference to `Teuchos::details::safeCommFree(int*)'
collect2: error: ld returned 1 exit status
make[2]: *** [main] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2

在网上找了好半天,发现这个帖子:https://groups.google.com/forum/#!topic/dealii/dX5VZ61JiZE

说应该主要原因是trilinos和dealii采用了不同的编译器,前面已经说了,编译dealii的时候,我们会声明export CC=mpicc, export CXX=mpicxx,因为我们设置过路径让petsc帮我们装过mpich为默认mpi,所以dealii编译应该是用的这个。检查trilinos编译目录下的Makefile.export.Trilinos,发现

Trilinos_CXX_COMPILER=/usr/bin/mpicxx
Trilinos_C_COMPILER=/usr/bin/mpicc
Trilinos_Fortran_COMPILER=/usr/bin/mpif90

说明trilinos选择的mpi是系统默认的,难怪会出现总题,现在我们要改trilinos的编译配置,加一句-D MPI_BASE_DIR=$HOME/petsc-3.6.1/arch-linux2-c-debug/bin,最终配置为

cmake \
-D Trilinos_ENABLE_Sacado=ON \
-D Trilinos_ENABLE_MueLu:BOOL=ON \
-D Trilinos_ENABLE_Anasazi:BOOL=ON \
-D Trilinos_ENABLE_Epetra:BOOL=ON \
-D Trilinos_ENABLE_EpetraExt:BOOL=ON \
-D Trilinos_ENABLE_Triutils:BOOL=ON \
-D Trilinos_ENABLE_Belos:BOOL=ON \
-D Trilinos_ENABLE_Ifpack:BOOL=ON \
-D Trilinos_ENABLE_TESTS:BOOL=ON \
-D Trilinos_ENABLE_Stratimikos=ON \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_CXX_FLAGS="-g -O3" \
-D CMAKE_C_FLAGS="-g -O3" \
-D CMAKE_FORTRAN_FLAGS="-g -O5" \
-D Trilinos_EXTRA_LINK_FLAGS="-lgfortran -pthread" \
-D CMAKE_VERBOSE_MAKEFILE=FALSE \
-D Trilinos_VERBOSE_CONFIGURE=FALSE \
-D TPL_ENABLE_MPI=ON \
-D MPI_BASE_DIR=$HOME/petsc-3.6.1/arch-linux2-c-debug/bin \
-D BUILD_SHARED_LIBS=ON \
\
-D TPL_ENABLE_BLAS:BOOL=ON \
-D BLAS_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.14/include \
-D BLAS_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.14/lib \
-D BLAS_LIBRARY_NAMES:STRING="libopenblas.a" \
-D TPL_ENABLE_LAPACK=ON \
-D LAPACK_INCLUDE_DIRS=$MYHOME/OpenBLAS-0.2.14/include \
-D LAPACK_LIBRARY_DIRS=$MYHOME/OpenBLAS-0.2.14/lib \
-D LAPACK_LIBRARY_NAMES:STRING="libopenblas.a" \
\
-D CMAKE_INSTALL_PREFIX:PATH=$MYHOME/trilinos-11.14.3 \
../

最后补充一下,编译trilinos的时候似乎用单核编成功率更高?

-----------------------------------------------------------------------------------------------

2015.12.17

安装slepc库,用于eigenvalue求解

下载slepc,http://slepc.upv.es/download/download.php?filename=slepc-3.6.1.tar.gz,把最后的版本号改为和petsc相同的版本

在$HOME下解压

export SLEPC_DIR=$HOME/slepc-3.6.1
cd $HOME/slepc-3.6.1
./configure
make

配置dealii编译参数

cmake -DCMAKE_INSTALL_PREFIX=$HOME/dealii-8.3.0 -DDEAL_II_WITH_METIS=ON -DMETIS_DIR=$HOME/metis-5.1.0 -DDEAL_II_WITH_P4EST=ON -DP4EST_DIR=$HOME/p4est-1.1 -DDEAL_II_WITH_TRILINOS=ON -DTRILINOS_DIR=$HOME/trilinos-11.14.3 -DDEAL_II_WITH_SLEPC=ON -DSLEPC_DIR=$HOME/slepc-3.6.1 ../

 

OpenFOAM error message

OpenFOAM error message published on No Comments on OpenFOAM error message

When running OpenFOAM solver/utilities, sometimes you may encounter the following error:

Create time

fileName::stripInvalid() called for invalid fileName NewFolder
    For debug level (= 2) > 1 this is considered fatal
Aborted (core dumped)

This is because there is some illegal file name exists in the case folder. Check it carefully.

关于PETSc安装以及MPI,编译器相关问题

关于PETSc安装以及MPI,编译器相关问题 published on No Comments on 关于PETSc安装以及MPI,编译器相关问题

老板给买的新workstation到了,通过一些测试,对并行计算的速度有了更感性的认识。其实是比较一般的机器,这个电脑如果跑单线程程序,有可能比一般台式机还要慢。但一上多核的程序,速度提高的倍速令人惊叹。所以现在想趁有时间研究研究并行的一些知识,希望后面能用的上。

PETSc是个很有名的高性能计算库,具体是什么东西就不介绍了,安装按照官网上的来就可以了,比较简单,官网上给的配置是
./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-fblaslapack --download-mpich
前面的几个好懂,后面两个是默认你的电脑里面没有安装blas,lapack库以及mpich的,程序会自动帮你下载并编译。如果我电脑里面已经有这些,就不用下了,直接
./configure
make all

然后问题来了,我现在希望用intel c compiler来编译我的程序,在这种情况下,确实是可以指定--with-cc=icc什么的,但好像这样并不合适,因为你的MPI库有很可能是用gcc编译的,所以很有可能出问题。安装文档推荐的是直接指定mpich的目录,在这种情况下是不用指定--withc-cc的。
接下来因为我需要用intel编译mpich,官网上也介绍的很详细了。下载原程序,解压至任意路径,然后
./configure --perfix=$HOME/mpich CC=icc CXX=icpc F77=ifort FC=ifort (后面两个fortran编译器没有就不写)
这里面还可以设置优化选项,默认是-O2,可以开-O3,不过暂时觉得没必要。(具体见安装文档)
make
make install

现在MPICH装好了,因为怕和系统的openmpi冲突,所以安装到$HOME里面。设置一下环境变量,export $PATH=$HOME/mpich:$PATH,就可以用了

我们继续安装PETSc,这个程序提供了一个很好的构架,可以根据configure的不同设置不同的architecture.我们现在要用intel编译过的mpich,然后blas/lapack用intel的mkl
./configure PETSC_ARCH=linux-gnu-intel --with-blas-lapack-dir=/opt/intel/mkl --with-mpi-dir=$HOME/mpich
然后根据提示来就可以了
编译:make PETSC_DIR=/home/nicklj/petsc PETSC_ARCH=linux-gnu-intel all
测试:make PETSC_DIR=/home/nicklj/petsc PETSC_ARCH=linux-gnu-intel test
多核提速的benchmark: make PETSC_DIR=/home/nicklj/petsc PETSC_ARCH=linux-gnu-intel streams NPMAX=8

PETSc写起程序来好像还有点麻烦,后面有空可以研究研究