Overture软件简介
Overture是一套基于面向对象技术设计的求解偏微分方程的数值计算软件,它为用户完成数值求解各种类型偏微分方程问题(特别是流体力学问题)提供了一套可移植的、灵活的开发平台。Overture内建支持有限差分和有限体积法等常用的数值计算方法,并且支持多重网格法。Overture是一套融合了网格生成,差分计算,边界条件设定,数据存取和图形显示等功能的综合型数值计算软件。
软件下载
1.官网下载地址
http://www.overtureframework.org/downLoad.html
2.CSDN下载地址
http://download.csdn.net/detail/ngvjai/5081380
软件的安装
1. Open motif的安装
yum install openmotif
yum install openmotif-devel
motif介绍 http://blog.csdn.net/mathlover/article/details/416298
2. Mesa OpenGL的安装
tar xzf MesaLib-XXX.tar
tar xzf MesaDemos-XXX.tar.gz
tar xzf MesaGLUT-XXX.tar.gz
cd Mesa-XXX
make 从结果中选一个与机器配置的类型,比如我的机器是linux64位的,就选择linux-x86-64
make linux-x86-64
在安装过程中可能缺少某些库,可以把缺少的库都安好在进行OpenGL的安装
yum install gtk*
yum install Xorg
yum install libdrm-devel
yum install expat-devel
在bash终端里进行安装!
3. HDF的安装
tar xzf hdf5-XXX.tar.gz
mv hdf5-XXX hdf5
cd hdf5
unsetenv CC
unsetenv cc
setenv CC gcc
./configure -prefix=当前工作目录
make
make install
HDF在csh下进行安装,hdf5官网 http://www.hdfgroup.org/HDF5/
4. A++的安装
gzip -d AP-nnn.tar.gz
tar -xf AP-nnn.tar
cd A++P++nnn
./configure --enable-SHARED_LIBS --prefix=当前工作目录
make
make install
A++是串行矩阵类。具体可参见https://computation.llnl.gov/casc/Overture/henshaw/documentation/App/manual/manual.html
5.LAPACK的安装
tar xzf lapack.tgz
cd LAPACK
将INSTALL目录下的make.inc.LINUX文件复制到主文件夹并将其名改为make.inc
例如:
cp INSTALL/make.inc.LINUX make.inc
编辑make.inc文件,选择正确的编译器和编译选项,这里我用的是gfortran
生成库BLAS
make blaslib
生成库LAPACK
make lapacklib
将这两个库的名称进行更改
mv ./blas_LINUX.a ./libblas.a
mv ./lapack_LINUX.a ./liblapack.a
6.PETSc的安装
tar xzf petsc-lite-2.3.2-p3.tar.gz
mv petsc-2.3.2-p3 petsc-2.3.2
cd petsc-2.3.2
setenv PETSC_DIR 当前工作目录
setenv PETSC_ARCH linux-gnu-opt
setenv PETSC_LIB $PETSC_DIR/lib/$PETSC_ARCH
setenv CC gcc
./config/configure.py -PETSC_ARCH=linux-gnu-opt -with-debugging=0 -with-fortran=0 -with-matlab=0 -with-mpi=0 -with-shared=1 -with-dynamic=1 --download-c-blas-lapack=1
make
Overture使用PETSc求解稀疏矩阵,具体内容可参见其官网http://www.mcs.anl.gov/petsc/
7. Overture串行版本的安装
tar xzf Overture.XXX.tar
cd Overture.XXX
编辑文件defenv,更改里面的环境变量,具体更改如下:
setenv XLIBS xxx
xxx目录包含有X window 系统的头文件目录(include)和库文件目录(lib)。当使用ls $XLIBS/lib查看时,应该可以看到libX11.so或是libX11.a文件。
setenv OpenGL xxx
当你用ls $OpenGL/lib查看时,可以看到文件libGL.so或libGL.a。如果你使用Mesa你将会看到libMesaGL.so或是libMesaGL.a文件。
setenv MOTIF xxx
如果你用ls $MOTIF/lib查看时,你应看到libXm.so或是libXm.a文件。
setenv HDF xxx
如果你用ls $HDF查看时,你应看到HDF目录中包含有include和lib目录。
setenv APlusPlus xxx
如果你用ls $APlusPlus 查看时,你应看到A++目录中包含有include和lib目录。
setenv Overture xxx
Overture软件安装的位置。
setenv CG xxx
如果你安装CG求解器,这个目录是CG文件解压后的件夹路径,这里不要改成别的路径否则在安装CG求解器时无法编译。
setenv CGBUILDPREFIX xxx
这是存放CG可执行文件和目标文件的位置,这个可以自己指定。
setenv LAPACK xxx
CG求解器需要LAPACK和BLAS的库。这个变量指向的目录含有liblapack.a和libblas.a的库文件。
setenv LD_LIBRARY_PATH ${MOTIF}/lib:${XLIBS}/lib:${HDF}/lib:${OpenGL}/lib:${Overture}/lib:${APlusPlus}/lib
当运行Overture里,Overture程序会自动加载这些库文件。有的可能lib要改为lib64对于64位的系统来说,具体可在库里面查看是放在lib下还是在lib64下。
更改后,将文件保存。
终端类型改为csh下的root用户后
surce defenv
setenv LANG en_US
perl configure
make
安装要约要30分钟左右,安可后可用./check.p进行测试。
安装成功
测试成功
打开ogen时的界面
我的defenv文件内容:
#! /bin/csh -f
#
#Define environment variables for Overture
#
# see the install notes on the web for further explanation or Overture/doc/install.tex
#
# edit this file and change as appropriate for your system,
# then type 'source defenv'
# You will need to change the following:
setenv XLIBS /usr
setenv MOTIF /usr
setenv OpenGL /home/soldier/Documents/overture5/mesa/Mesa-7.2
setenv HDF /home/soldier/Documents/overture5/hdf5
#PETSC的变量自己加进来,一共是3个
setenv PETSC_DIR /opt/overture/petsc-2.3.2-p6
setenv PETSC_ARCH linux-gnu-opt
setenv PETSC_LIB $PETSC_DIR/lib/$PETSC_ARCH
setenv APlusPlus /home/soldier/Documents/overture5/A++P++-0.8.0/A++/install
setenv Overture /home/soldier/Documents/overture5/Overture.v25
# Here are variables to set if you intend to build CG
# CG : location for CG (source tree)
# CGBUILDPREFIX : location of CG executables (compile tree). This can be the same as CG
# if you only intend to build one version of CG.
# LAPACK : location of the LAPACK library
setenv CG /home/soldier/Documents/overture5/cg2.5
setenv CGBUILDPREFIX /home/soldier/Documents/overture5/cg2.5/cg2.5d
# In the following example LAPACK is found with the PGI compilers
setenv LAPACK /home/soldier/Documents/overture5/LAPACK
# Here are some handy alias's and variables
alias ogen $Overture/bin/ogen
alias plotStuff $Overture/bin/plotStuff
alias rap $Overture/bin/rap
alias mbuilder $Overture/bin/mbuilder
set primer = $Overture/primer
set sampleGrids = $Overture/sampleGrids
setenv CGE $CGBUILDPREFIX
alias cgad ${CGE}/ad/bin/cgad
alias cgasf ${CGE}/asf/bin/cgasf
alias cgcns ${CGE}/cns/bin/cgcns
alias cgins ${CGE}/ins/bin/cgins
alias cgmx ${CGE}/mx/bin/cgmx
alias cgmp ${CGE}/mp/bin/cgmp
alias cgsm ${CGE}/sm/bin/cgsm
set ad = ${CG}/ad
set asf = ${CG}/asf
set cns = ${CG}/cns
set ins = ${CG}/ins
set mx = ${CG}/mx
set mp = ${CG}/mp
set sm = ${CG}/sm
# The LD_LIBRARY_PATH indicates the places to look for dynamic libraries. This variable should
# not be needed in most cases since we use the 'rpath' loader option
# setenv LD_LIBRARY_PATH $MOTIF/lib64:$XLIBS/lib64:$OpenGL/lib64:$HDF/lib:$Overture/lib:${APlusPlus}/lib
# setenv LD_LIBRARY_PATH $MOTIF/lib64:$XLIBS/lib64:$OpenGL/lib64:$HDF/lib:$Overture/lib:${APlusPlus}/lib:${PETSC_LIB}
关于环境变量的说明:
可以将环境变量写在/etc/csh.cshrc里面,这样每次打开csh时变量都已经定义好了。我的/etc/csh.cshrc里面的内容如下所示(这次Overture安装在/opt目录下):
# /etc/cshrc
#
# csh configuration for all shell invocations.
# By default, we want this to get set.
# Even for non-interactive, non-login shells.
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation validity in
# /usr/share/doc/setup-*/uidgid file
if ($uid > 199 && "`id -gn`" == "`id -un`") then
umask 002
else
umask 022
endif
if ($?prompt) then
if ($?tcsh) then
set promptchars='$#'
set prompt='[%n@%m %c]%# '
# make completion work better by default
set autolist
else
set prompt=\[$user@`hostname -s`\]\$\
endif
endif
if ( $?tcsh ) then
bindkey "^[[3~" delete-char
endif
bindkey "^R" i-search-back
set echo_style = both
set histdup = erase
set savehist = (1024 merge)
if ($?prompt) then
if ($?TERM) then
switch($TERM)
case xterm*:
if ($?tcsh) then
set prompt='%{\033]0;%n@%m:%c\007%}[%n@%m %c]%# '
endif
breaksw
case screen:
if ($?tcsh) then
set prompt='%{\033_%n@%m:%c\033\\%}[%n@%m %c]%# '
endif
breaksw
default:
breaksw
endsw
endif
endif
setenv MAIL "/var/spool/mail/$USER"
# Check if we aren't a loginshell and do stuff if we aren't
if (! $?loginsh) then
if ( -d /etc/profile.d ) then
set nonomatch
foreach i ( /etc/profile.d/*.csh )
if ( -r "$i" ) then
if ($?prompt) then
source "$i"
else
source "$i" >&/dev/null
endif
endif
end
unset i nonomatch
endif
endif
#在最下面添加关于Overture的环境变量
#Define environment variables for Overture
setenv XLIBS /usr
setenv MOTIF /usr
setenv OpenGL /opt/overture/Mesa-7.2
setenv HDF /opt/overture/hdf5
setenv PETSC_DIR /opt/overture/petsc-2.3.2-p6
setenv PETSC_ARCH linux-gnu-opt
setenv PETSC_LIB $PETSC_DIR/lib/$PETSC_ARCH
setenv APlusPlus /opt/overture/A++P++-0.8.0/A++/install
setenv Overture /opt/overture/Overture.v25
setenv CG /opt/overture/cg
setenv CGBUILDPREFIX /opt/overture/cg.s
setenv LAPACK /opt/overture/LAPACK
# Here are some handy alias's and variables
alias ogen $Overture/bin/ogen
alias plotStuff $Overture/bin/plotStuff
alias rap $Overture/bin/rap
alias mbuilder $Overture/bin/mbuilder
set primer = $Overture/primer
set sampleGrids = $Overture/sampleGrids
setenv CGE $CGBUILDPREFIX
alias cgad ${CGE}/ad/bin/cgad
alias cgasf ${CGE}/asf/bin/cgasf
alias cgcns ${CGE}/cns/bin/cgcns
alias cgins ${CGE}/ins/bin/cgins
alias cgmx ${CGE}/mx/bin/cgmx
alias cgmp ${CGE}/mp/bin/cgmp
alias cgsm ${CGE}/sm/bin/cgsm
set ad = ${CG}/ad
set asf = ${CG}/asf
set cns = ${CG}/cns
set ins = ${CG}/ins
set mx = ${CG}/mx
set mp = ${CG}/mp
set sm = ${CG}/sm
setenv LD_LIBRARY_PATH $MOTIF/lib64:$XLIBS/lib64:$OpenGL/lib64:$HDF/lib:$Overture/lib:${APlusPlus}/lib:${PETSC_LIB}
7. CG(Composite Grid)求解器串行版本的安装
环境变量设置与Overture一样,如果上面的环境变量已经设定好就不进在进行设置了。
tar zxf cg.XXX.tar
cd cg.XXX
make
安装好后,可以在cg主目录下用 make check 进行测试。