Advanced Simulation Library(ASL)&& An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method (IBAMR)
How to install asl and ibamr tools:
ASL 和 IBAMR 都是有限元分析的工具,流体力学等,ASL可以使用GPU加速计算,
主机配置,i7 6代,1060, 32G,500G,ubuntu1604。
安装ASL、配置依赖、安装、运行测试:
1.GPU DRIVER && CUDA SDK OpenCL
在Ubuntu 软件源下载GPU驱动。
NVIDIA 官网下载cuda run安装包,安装时候不要选择图形图像显示驱动的安装。
装一些依赖:
sudo apt-get install clinfo dkms xz-utils openssl libnuma1 libpciaccess0 bc curl libssl-dev lsb-core libicu-dev -y
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get install mono-complete -y
2.CMAKE
sudo apt-get install libncurses5-dev cmake-curses-gui -y
sudo apt-get install build-essential -y
wget http://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
tar xf cmake-3.11..tar.gz && cd cmake-3.11. && ./configure
make -j8 && sudo make install
3.OpenGL
sudo apt-get install build-essential libgl1-mesa-dev freeglut3-dev libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev gfortran doxygen graphviz -y
4.VTK
The Visualization Toolkit (VTK) is an open-source, freely available software system for 3D computer graphics, image processing, and visualization.
又是一个神乎其技的开源工具。
sudo apt-get install libvtk6.
wget https://www.vtk.org/files/release/6.3/VTK-6.3.0.zip
unzip VTK-6.3..zip
mkdir VTK-build && cd VTK-build&&ccmake ../VTK-6.3.
然后按“c”确认配置生成可编译文件,直到“g”选项出现,然后按“g”即可
make -j8
sudo make install
5.BOOST
首先安装一个低版本的boost,这个是给ASL用的。
sudo apt-get install libboost1.-all-dev -y
6.ASL
unzip ASL-0.1..zip
mkdir build-asl && cd build-asl
cmake -D OpenCL_INCLUDE_DIR=/usr/local/cuda-9.0/include/ -G "Unix Makefiles" ../ASL-0.1.
cmake -D OpenCL_LIBRARY=/usr/local/cuda-9.0/lib64/libOpenCL.so -G "Unix Makefiles" ../ASL-0.1.
make -j8
sudo make install
运行实例:
cd examples/flow/locomotive
wget http://asl.org.il/input_data/locomotive.stl
./asl-locomotive --input locomotive.stl
====================================================================================================================
安装IBAMR、配置依赖、安装、运行测试:此处已经是旧版的ibamr了下载其源码需要找到GitHub上倒数第二个版本v0.2 https://github.com/IBAMR/IBAMR/releases
1.安装BOOST
mkdir sfw && cd sfw && mkdir linux && cd linux && mkdir boost && cd boost
unzip boost_1_60_0.zip
mv boost_1_60_0 1.6.
export BOOST_ROOT=$HOME/sfw/linux/boost/1.6.
mkdir $BOOST_ROOT/include
ln -s $BOOST_ROOT/boost $BOOST_ROOT/include
7 sudo apt install libz-dev m4 gfortran -y
2.安装eigen
cd sfw && cd linux && mkdir eigen && cd eigen
下载 eigen 3.3.
tar -jxvf 3.3..tar.bz2
cmake eigen-eigen-f562a193118d
make -j8 && sudo make install
3.安装HDF5
cd sfw/linux && mkdir hdf5 && cd hdf5
下载 hdf5-1.8..tar.bz2
tar xvjf ~/hdf5-1.8..tar.bz2
cd hdf5-1.8.
./configure \
CC=gcc \
CXX=g++ \
FC=gfortran \
F77=gfortran \
--enable-production \
--disable-debug \
--prefix=$HOME/sfw/linux/hdf5/1.8.
make -j8 && make check && sudo make install
4.安装SILO
cd $HOME/sfw/linux
tar xvfz silo-4.10.tar.gz && cd silo-4.10
./configure \
CC=gcc \
CXX=g++ \
FC=gfortran \
F77=gfortran \
--prefix=$HOME/sfw/linux/silo/4.10 \
--disable-silex
make -j8 && sudo make install
5.安装MUPARSER
sudo apt-get install libmuparser-dev -y
6.安装OpenMPI
cd $HOME/sfw/linux tar xvfj openmpi-1.10..tar.bz2
cd openmpi-1.10. ./configure \
CC=gcc \
CXX=g++ \
FC=gfortran \
F77=gfortran \
--prefix=$HOME/sfw/linux/openmpi/1.10. \
--disable-mpi-cxx-seek \
--disable-heterogeneous \
--enable-orterun-prefix-by-default make -j8 && make check && sudo make install
7.安装PETSC
7.1首先编译debug 版:
sudo apt-get install libblas-dev liblapack-dev -y cd $HOME/sfw && mkdir petsc && cd petsc wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.7.2.tar.gz tar xvfz petsc-3.7..tar.gz mv petsc-3.7. 3.7. && cd 3.7. export PETSC_DIR=$PWD export PETSC_ARCH=linux-debug ./config/configure.py \
--CC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
--CXX=$HOME/sfw/linux/openmpi/1.10./bin/mpicxx \
--FC=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
--LDFLAGS="-L$HOME/sfw/linux/openmpi/1.10.2/lib -Wl,-rpath,$HOME/sfw/linux/openmpi/1.10.2/lib" \
--with-debugging= \
--with-c++-support \
--download-hypre= make && make test
7.2再编译optimize版:
export PETSC_DIR=$PWD export PETSC_ARCH=linux-opt ./config/configure.py \
--CC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
--CXX=$HOME/sfw/linux/openmpi/1.10./bin/mpicxx \
--FC=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
--COPTFLAGS="-O3" \
--CXXOPTFLAGS="-O3" \
--FOPTFLAGS="-O3" \
--LDFLAGS="-L$HOME/sfw/linux/openmpi/1.10.2/lib -Wl,-rpath,$HOME/sfw/linux/openmpi/1.10.2/lib" \
--with-default-arch= \
--PETSC_ARCH=$PETSC_ARCH \
--with-debugging= \
--with-c++-support \
--with-hypre= \
--download-hypre= \
--with-x=\ make && make test
8.安装SAMRAI
cd $HOME/sfw && mkdir samrai && cd samrai && mkdir 2.4.&& cd 2.4. tar xvfz SAMRAI-v2.4.4.tar.gz && mv SAMRAI SAMRAI-2.4.
然后要打一个补丁
wget https://github.com/IBAMR/IBAMR/releases/download/v0.1-rc1/SAMRAI-v2.4.4-patch-121212.gz cd SAMRAI-2.4. gunzip -c ../SAMRAI-v2.4.4-patch-.gz | patch -p2 ./source/scripts/includes --link cd $HOME/sfw/samrai/2.4. mkdir objs-debug && cd objs-debug ../SAMRAI-2.4./configure \
--prefix=$HOME/sfw/samrai/2.4./linux-g++-debug \
--with-CC=gcc \
--with-CXX=g++ \
--with-F77=gfortran \
--with-MPICC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
--with-hdf5=$HOME/sfw/linux/hdf5/1.8. \
--without-hypre \
--with-silo=$HOME/sfw/linux/silo/4.10 \
--without-blaslapack \
--without-cubes \
--without-eleven \
--without-kinsol \
--without-petsc \
--without-sundials \
--without-x \
--with-doxygen \
--with-dot \
--enable-debug \
--disable-opt \
--enable-implicit-template-instantiation \
--disable-deprecated make -j8 && sudo make install
优化版本:
cd $HOME/sfw/samrai/2.4. &&mkdir objs-opt &&cd objs-opt ../SAMRAI-2.4./configure \
CFLAGS="-O3" \
CXXFLAGS="-O3" \
FFLAGS="-O3" \
--prefix=$HOME/sfw/samrai/2.4./linux-g++-opt \
--with-CC=gcc \
--with-CXX=g++ \
--with-F77=gfortran \
--with-MPICC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
--with-hdf5=$HOME/sfw/linux/hdf5/1.8. \
--without-hypre \
--with-silo=$HOME/sfw/linux/silo/4.10 \
--without-blaslapack \
--without-cubes \
--without-eleven \
--without-kinsol \
--without-petsc \
--without-sundials \
--without-x \
--with-doxygen \
--with-dot \
--disable-debug \
--enable-opt \
--enable-implicit-template-instantiation \
--disable-deprecated make -j8 && sudo make install
9.安装libMesh
cd $HOME/sfw/linux &&mkdir libmesh &&cd libmesh &&mkdir 1.0. &&cd 1.0. wget https://github.com/libMesh/libmesh/releases/download/v1.0.0/libmesh-1.0.0.tar.gz THEN: tar xvfz libmesh-1.0..tar.gz && mv libmesh-1.0. LIBMESH &&cd $HOME/sfw/linux/libmesh/1.0. && mkdir objs-debug && cd objs-debug export BOOST_ROOT=$HOME/sfw/linux/boost/1.6. ../LIBMESH/configure \
--prefix=$HOME/sfw/linux/libmesh/1.0./1.0.-debug \
--with-methods=dbg \
PETSC_DIR=$HOME/sfw/petsc/3.7. \
PETSC_ARCH=linux-debug \
CC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
CXX=$HOME/sfw/linux/openmpi/1.10./bin/mpicxx \
FC=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
F77=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
--enable-triangle \
--disable-cxx11 \
--disable-openmp \
--disable-perflog \
--disable-strict-lgpl \
--disable-pthreads \
--disable-cppthreads \
--disable-unique-ptr make -j8 && sudo make install
然后安装优化版:
cd $HOME/sfw/linux/libmesh/1.0. &&mkdir objs-opt &&cd objs-opt export BOOST_ROOT=$HOME/sfw/linux/boost/1.6. ../LIBMESH/configure \
--prefix=$HOME/sfw/linux/libmesh/1.0./1.0.-opt \
--with-methods=opt \
PETSC_DIR=$HOME/sfw/petsc/3.7. \
PETSC_ARCH=linux-opt \
CC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
CXX=$HOME/sfw/linux/openmpi/1.10./bin/mpicxx \
FC=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
F77=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
--enable-triangle \
--disable-cxx11 \
--disable-openmp \
--disable-perflog \
--disable-strict-lgpl \
--disable-pthreads \
--disable-cppthreads \
--disable-unique-ptr
make -j8 && sudo make install
终于到了主角,10.安装IBAMR
cd $HOME/sfw && mkdir ibamr && cd ibamr git clone https://github.com/IBAMR/IBAMR.git THEN:4 tar xvfj ibamr.tar.bz2 && cd $HOME/sfw/ibamr && mkdir ibamr-objs-dbg && cd ibamr-objs-dbg export BOOST_ROOT=$HOME/sfw/linux/boost/1.6. && export PETSC_ARCH=linux-debug && export PETSC_DIR=$HOME/sfw/petsc/3.7. ../IBAMR/configure \
CFLAGS="-g -O1 -Wall" \
CXXFLAGS="-g -O1 -Wall" \
FCFLAGS="-g -O1 -Wall" \
CC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
CXX=$HOME/sfw/linux/openmpi/1.10./bin/mpicxx \
FC=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
CPPFLAGS="-DOMPI_SKIP_MPICXX" \
--with-hypre=$PETSC_DIR/$PETSC_ARCH \
--with-samrai=$HOME/sfw/samrai/2.4./linux-g++-debug \
--with-hdf5=$HOME/sfw/linux/hdf5/1.8. \
--with-silo=$HOME/sfw/linux/silo/4.10 \
--with-boost=$HOME/sfw/linux/boost/1.6. \
--enable-libmesh \
--with-libmesh=$HOME/sfw/linux/libmesh/1.0./1.0.-debug \
--with-libmesh-method=dbg
make lib -j8 && make examples -j8
然后安装优化版本
cd $HOME/sfw/ibamr && mkdir ibamr-objs-opt && cd ibamr-objs-opt && export PETSC_ARCH=linux-opt && export PETSC_DIR=$HOME/sfw/petsc/3.7. ../IBAMR/configure \
CC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
CXX=$HOME/sfw/linux/openmpi/1.10./bin/mpicxx \
F77=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
FC=$HOME/sfw/linux/openmpi/1.10./bin/mpif90 \
MPICC=$HOME/sfw/linux/openmpi/1.10./bin/mpicc \
MPICXX=$HOME/sfw/linux/openmpi/1.10./bin/mpicxx \
CFLAGS="-O3 -Wall" \
CXXFLAGS="-O3 -Wall -std=gnu++11" \
FFLAGS="-O3 -Wall" \
FCFLAGS="-O3 -Wall" \
CPPFLAGS="-DOMPI_SKIP_MPICXX" \
--with-hypre=$PETSC_DIR/$PETSC_ARCH \
--with-samrai=$HOME/sfw/samrai/2.4./linux-g++-opt \
--with-hdf5=$HOME/sfw/linux/hdf5/1.8. \
--with-silo=$HOME/sfw/linux/silo/4.10 \
--with-boost=$HOME/sfw/linux/boost/1.6. \
--enable-libmesh \
--with-libmesh=$HOME/sfw/linux/libmesh/1.0./1.0.-opt \
--with-libmesh-method=opt
make -j8 &&make check
运行实例程序:
cd $HOME/sfw/ibamr/ibamr-objs-opt/examples/IB/staggered_grid/explicit/ex1 make examples ./main2d input2d
完,qsy。
Advanced Simulation Library(ASL)&& An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method (IBAMR)的更多相关文章
- <转>C Runtime Library(MSVCRT)来历
(转载)C Runtime Library(MSVCRT)来历 msvcrt.dll (名称:Microsoft C Runtime Library)提供了printf,malloc,strcpy ...
- 【CF802C】Heidi and Library(网络流)
[CF802C]Heidi and Library(网络流) 题面 CF 洛谷 题解 前面两个Easy和Medium都是什么鬼玩意啊.... 不难发现如果这天的要求就是第\(a_i\)种书的话,那么\ ...
- Android Design Support Library(三)用CoordinatorLayout实现Toolbar隐藏和折叠
此文的代码在Android Design Support Library(一)用TabLayout实现类似网易选项卡动态滑动效果代码的基础上进行修改,如果你没有看过本系列的第一篇文章最好先看一看.Co ...
- 35.按要求编写Java程序: (1)编写一个接口:InterfaceA,只含有一个方法int method(int n); (2)编写一个类:ClassA来实现接口InterfaceA,实现int method(int n)接口方 法时,要求计算1到n的和; (3)编写另一个类:ClassB来实现接口InterfaceA,实现int method(int n)接口 方法时,要求计算n的阶乘(n
35.按要求编写Java程序: (1)编写一个接口:InterfaceA,只含有一个方法int method(int n): (2)编写一个类:ClassA来实现接口InterfaceA,实现in ...
- JAVA进阶之旅(二)——认识Class类,反射的概念,Constructor,Field,Method,反射Main方法,数组的反射和实践
JAVA进阶之旅(二)--认识Class类,反射的概念,Constructor,Field,Method,反射Main方法,数组的反射和实践 我们继续聊JAVA,这次比较有意思,那就是反射了 一.认识 ...
- 1、NASA Super Cloud Library(SCL)
Empowering Data Management, Diagnosis, and Visualization of Cloud-Resolving Models (CRM) by Cloud Li ...
- (转载)Ubuntu 安装GNU Scientific library(GSL)
背景: Blei的hlda的C语言实现需要使用C语言的科学计算包GSL,因此决定安装.由于在windows下安装极其繁琐,先在Linux上安装之. 系统环境: Linux version 2.6.35 ...
- 【转】使用Boost Graph library(二)
原文转自:http://shanzhizi.blog.51cto.com/5066308/942972 让我们从一个新的图的开始,定义一些属性,然后加入一些带属性的顶点和边.我们将给出所有的代码,这样 ...
- 数据结构(六)查找---平衡二叉树(ASL)
前提 我们之前的二叉排序树的插入(构建)是按照我们输入的数据来进行的,若是我们的数据分布不同,那么就会构造不同的二叉树 { , , , , , , , , , } { , , , , , , , , ...
随机推荐
- lister.ora配置
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = D:\ ...
- Android 遍历全国的地区二(获取天气)
根据上次的内容 1. 界面布局 weather_layout.xml <LinearLayout xmlns:android="http://schemas.android.com/a ...
- DateTime和字符串转换问题
DateTime和string之间的相互转换经常碰到,可就这么简单的一个转换其中也有些需要注意的地方. static void Main(string[] args) { string format ...
- 集成学习之Boosting —— Gradient Boosting实现
Gradient Boosting的一般算法流程 初始化: \(f_0(x) = \mathop{\arg\min}\limits_\gamma \sum\limits_{i=1}^N L(y_i, ...
- Locust 介绍篇
Locust介绍: Locust作为基于Python语言的性能测试框架. 其优点在于他的并发量可以实现单机10倍于LoadRunner和Jmeter工具.他的工作原理为协程并发,也就是gevent库. ...
- Oracle 分析函数及常用函数
什么叫分析函数(Analytic function)? Oracle从8.1.6开始提供分析函数,分析函数用于计算基于组的某种聚合值,它和聚合函数的不同之处是 对于每个组返回多行,而聚合函数对于每个组 ...
- boost 中文编码转换
Lstring CHanderHttp::CircleDesc(Lint nCurCircle, Lint nMaxCircle,Lint usercount){ std::stringstream ...
- tomcat日志文件目录修改
tomcat每次启动时,自动在logs目录下生产以下日志文件,造成日志文件众多: 将logs的日志文件放置到新建的文件夹位置,避免主硬盘空间的占用.主要更改catalina.out的文件位置和每日的日 ...
- HTML save data to CSV or excel
/********************************************************************************* * HTML save data ...
- JS查找孩子节点
以前看了JS方面的书,如今用到了,书看得再多,不用就忘了,所以经常用用你所学到的知识,温故知新. <!DOCTYPE html> <html> <head> < ...