Ubuntu下使用Intel MKL 编译安装MUMPS 数学库
(2013-01-05 18:25:56)
标签:
杂谈 |
分类: 软件编译 |
下面摘自维基百科:
MUMPS (MUltifrontal Massively Parallel sparse direct Solver) is a software application for the solution of large sparse systems of linear algebraic equations on distributed memory parallel computers. It was developed in European project PARASOL (1996–1999) by CERFACS, IRIT-ENSEEIHT and RAL. The software implements the multifrontal method, which is a version of Gaussian elimination for large sparse systems of equations, especially those arising from the finite element method. It is written in Fortran 90 with parallelism by MPI and it uses BLAS and ScaLAPACK kernels for dense matrix computations. Since 1999, MUMPS has been supported by CERFACS, IRIT-ENSEEIHT, and INRIA.
The importance of MUMPS lies in the fact that it is a rare public domain implementation of the multifrontal method, if not the only professional and supported one.
MUMPS的最新版本是4.10.0,按照软件的说明,安装串行版本需要预先安装BLAS
数学库,我的笔记本上装了intel/composer_xe_2013.1.117,里面带了MKL数学库(Intel®
参照 Intel® Math Kernel Library Link Line Advisor 给出的建议,链接BLAS95的链接命令是:
$(MKLROOT)/lib/ia32/libmkl_blas95.a
-Wl,--start-group
编译器选项是:
-I$(MKLROOT)/include/ia32 -I$(MKLROOT)/include
当然还要安装Metis-3.0软件,由于该软件安装比较简单,这里就不在赘述。
最后MUMUPS的Makefile.inc文件如下:
maqz@bogon:~/software/MUMPS_4.10.0$ cat
Makefile.inc
#
#
#
#Begin orderings
# NOTE that PORD is distributed within MUMPS by default. If you
would like to
# use other orderings, you need to obtain the corresponding package
and modify
# the variables below accordingly.
# For example, to have Metis available within MUMPS:
#
#
#
#
#
#
#
#
#
#
#SCOTCHDIR
#ISCOTCH
# You have to choose one among the following two lines depending
on
# the type of analysis you want to perform. If you want to perform
only
# sequential analysis choose the first (remember to add -Dscotch in
the ORDERINGSF
# variable below); for both parallel and sequential analysis choose
the second
# line (remember to add -Dptscotch in the ORDERINGSF variable
below)
#LSCOTCH
#LSCOTCH
LPORDDIR = $(topdir)/PORD/lib/
IPORD
LPORD
LMETISDIR = /home/maqz/software/metis-3.0/
#IMETIS
# You have to choose one among the following two lines depending
on
# the type of analysis you want to perform. If you want to perform
only
# sequential analysis choose the first (remember to add -Dmetis in
the ORDERINGSF
# variable below); for both parallel and sequential analysis choose
the second
# line (remember to add -Dparmetis in the ORDERINGSF variable
below)
LMETIS
#LMETIS
# The following variables will be used in the compilation
process.
# Please note that -Dptscotch and -Dparmetis imply -Dscotch and
-Dmetis respectively.
#ORDERINGSF = -Dscotch -Dmetis -Dpord -Dptscotch -Dparmetis
ORDERINGSF
ORDERINGSC
LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
IORDERINGSF = $(ISCOTCH)
IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)
#End orderings
############################################################
############################################################
PLAT
LIBEXT
OUTC
OUTF
RM = /bin/rm -f
CC = icc
FC = ifort
FL = ifort
AR = ar vr
#RANLIB = ranlib
RANLIB
INCSEQ
LIBSEQ
LIBBLAS = -L/opt/intel/mkl/lib/ia32/libmkl_blas95.a
-Wl,--start-group /opt/intel/mkl/lib/ia32/libmkl_intel.a
/opt/intel/mkl/lib/ia32/libmkl_intel_thread.a
/opt/intel/mkl/lib/ia32/libmkl_core.a -Wl,--end-group -liomp5
-lpthread -lm
LIBOTHERS = -lpthread
#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or
-DUPPER)
CDEFS
#Begin Optimized options
OPTF
OPTL
OPTC
#End Optimized options
INCS = $(INCSEQ) -I/opt/intel/mkl/include/ia32
-I/opt/intel/mkl/include
LIBS = $(LIBSEQ)
LIBSEQNEEDED = libseqneeded
修改保存Makefile.inc 文件,然后在命令行输入 make all 命令,即可完成安装,enjoy it
!