MUMPS 安装
Centos 7 :Install MUMPS
1. 下载安装包,需要提交申请
http://mumps.enseeiht.fr/
2. 安装并行版MUMPS需要以下一些依赖包
MPI、BLAS library、BLACS library、ScaLAPACK library
MPI可以在Intel_MPI、MPICH和OPENMPI中三选一,至于BLAS,BLACS,ScaLAPACK这三个库可使用Intel的MKL库,因此需要安装intel的编译器。
3. 解压进入文件目录(这个安装在哪里,就拷贝到那里),修改Makefile.inc。在此可直接复制Make.inc/目录下的Makefile.INTEL.PAR文件至MUMPS的根目录,并修改一些参数使之与自己的系统相符。红色是要修改的,蓝色是要添加的
# This file is part of MUMPS 5.0.2, released
# on Fri Jul 15 09:12:54 UTC 2016
#
#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:
# 1/ download Metis and compile it
# 2/ uncomment (suppress # in first column) lines
# starting with LMETISDIR, LMETIS
# 3/ add -Dmetis in line ORDERINGSF
# ORDERINGSF = -Dpord -Dmetis
# 4/ Compile and install MUMPS
# make clean; make (to clean up previous installation)
#
# Metis/ParMetis and SCOTCH/PT-SCOTCH (ver 6.0 and later) orderings are now available for MUMPS.
#
#SCOTCHDIR = ${HOME}/scotch_6.0
#ISCOTCH = -I$(SCOTCHDIR)/include # Should be provided for pt-scotch (not needed for Scotch)
#
# 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 = -L$(SCOTCHDIR)/lib -lesmumps -lscotch -lscotcherr
#LSCOTCH = -L$(SCOTCHDIR)/lib -lptesmumps -lptscotch -lptscotcherr -lscotch
LPORDDIR = $(topdir)/PORD/lib/
IPORD = -I$(topdir)/PORD/include/
LPORD = -L$(LPORDDIR) -lpord
LMETISDIR = ....../METIS/lib #因为我要用到METIS库,添加METIS目录下lib的绝对路径.如果不用可以不用去掉注释
#IMETIS = # should be provided if you use parmetis, to access parmetis.h
# 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 = -L$(LMETISDIR) -lmetis
#LMETIS = -L$(LMETISDIR) -lparmetis -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 = -Dpord -Dmetis
ORDERINGSC = $(ORDERINGSF)
LORDERINGS = $(LMETIS) $(LPORD) $(LSCOTCH)
IORDERINGSF = $(ISCOTCH)
IORDERINGSC = $(IMETIS) $(IPORD) $(ISCOTCH)
#End orderings
########################################################################
################################################################################
PLAT =
LIBEXT = .a
OUTC = -o
OUTF = -o
RM = /bin/rm -f
CC = mpiicc
FC = mpiifort
FL = mpiifort
AR = ar vr
#RANLIB = ranlib
RANLIB = echo
# Make this variable point to the path where the Intel MKL library is
# installed. It is set to the default install directory for Intel MKL.
MKLROOT=/opt/intel/mkl/lib/intel64
SCALAP = -L$(MKLROOT) -lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64
INCPAR = -I/usr/local/include -I/opt/intel/mkl/lib/
# LIBPAR = $(SCALAP) -L/usr/local/lib/ -llamf77mpi -lmpi -llam
SEFTDEF=-L/opt/intel/compilers_and_libraries_2016.2.181/linux/mpi/intel64/lib/
LIBPAR = $(SCALAP) $(SEFTDEF)
#LIBPAR = -lmpi++ -lmpi -ltstdio -ltrillium -largs -lt
INCSEQ = -I$(topdir)/libseq
LIBSEQ = -L$(topdir)/libseq -lmpiseq
#LIBBLAS = -L/usr/lib/xmm/ -lf77blas -latlas
LIBBLAS = -L$(MKLROOT) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core
LIBOTHERS = -lpthread
#Preprocessor defs for calling Fortran from C (-DAdd_ or -DAdd__ or -DUPPER)
CDEFS = -DAdd_
#Begin Optimized options
OPTF = -O -DALLOW_NON_INIT -nofor_main -openmp # or -qopenmp for most recent compilers
OPTL = -O -nofor_main -openmp
OPTC = -O -openmp
#End Optimized options
INCS = $(INCPAR)
LIBS = $(LIBPAR)
LIBSEQNEEDED =
4. 编译
make all lib
编译完成后会在lib目录下生成6个库文件。
5. 检验
在examples文件夹下, 根据README文档运行几个可执行文件。