
1)ARPACK下载:http://www.caam.rice.edu/software/ARPACK/
2)ARPACK安装:
a)解压缩:tar -zxvf ****.tar.z
b)cd ARPACK
vi ARmake.inc(安装的关键在于该文件的配置,下面给出我的配置文件,附上说明,用红字标明)
###########################################################################
#
# Program: ARPACK
#
# Module: ARmake.inc
#
# Purpose: Top-level Definitions
#
# Creation date: February 22, 1996
#
# Modified:
#
# Send bug reports, comments or suggestions to arpack@caam.rice.edu
#
############################################################################
#
# %---------------------------------%
# | SECTION 1: PATHS AND LIBRARIES |
# %---------------------------------%
#
#
# %--------------------------------------%
# | You should change the definition of |
# | home if ARPACK is built some place |
# | other than your home directory. |
# %--------------------------------------%
#
#home = $(HOME)/ARPACK
home= /usr/local/ARPACK (此安装路径要自己修改,指向要安装的目录)
#
# %--------------------------------------%
# | The platform identifier to suffix to |
# | the end of library names |
# %--------------------------------------%
#
PLAT = LINUX (在此指出操作平台,如LINUX,SGI,等)
#
# %------------------------------------------------------%
# | The directories to find the various pieces of ARPACK |
# %------------------------------------------------------%
#
BLASdir = $(home)/BLAS
LAPACKdir = $(home)/LAPACK
UTILdir = $(home)/UTIL
SRCdir = $(home)/SRC
#
DIRS = $(BLASdir) $(LAPACKdir) $(UTILdir) $(SRCdir)(如果你的机器已经装了BLAS及LAPACK2.0,那么就可以把该行前面加#,把其注释掉,把下面那行的开头的#去掉。)
#
# %-------------------------------------------------------------------%
# | Comment out the previous line and uncomment the following |
# | if you already have the BLAS and LAPACK installed on your system. |
# | NOTE: ARPACK assumes the use of LAPACK version 2 codes. |
# %-------------------------------------------------------------------%
#
#DIRS = $(UTILdir) $(SRCdir)
#
# %---------------------------------------------------%
# | The name of the libraries to be created/linked to |
# %---------------------------------------------------%
#
ARPACKLIB = $(home)/libarpack_$(PLAT).a
LAPACKLIB =
BLASLIB =
#
ALIBS = $(ARPACKLIB) $(LAPACKLIB) $(BLASLIB)
#
#
# %---------------------------------------------------------%
# | SECTION 2: COMPILERS |
# | |
# | The following macros specify compilers, linker/loaders, |
# | the archiver, and their options. You need to make sure |
# | these are correct for your system. |
# %---------------------------------------------------------%
#
#
# %------------------------------%
# | Make our own suffixes' list. |
# %------------------------------%
#
.SUFFIXES:
.SUFFIXES: .f .o
#
# %------------------%
# | Default command. |
# %------------------%
#
.DEFAULT:
@$(ECHO) "Unknown target $@, try: make help"
#
# %-------------------------------------------%
# | Command to build .o files from .f files. |
# %-------------------------------------------%
#
.f.o:
@$(ECHO) Making $@ from $<
@$(FC) -c $(FFLAGS) $<
#
# %-----------------------------------------%
# | Various compilation programs and flags. |
# | You need to make sure these are correct |
# | for your system. |
# %-----------------------------------------%
#
FC = pgf77 (指出你的fortran编译器,我这里用的是PGI的fortran77编译器)
FFLAGS = -tp k8-64 -fastsse -mcmodel=medium (要与你的上面的Fortran的设置相对应)
LDFLAGS =
CD = cd
ECHO = echo
LN = ln
LNFLAGS = -s
MAKE = /usr/bin/make
RM = rm
RMFLAGS = -f
SHELL = /bin/sh
#
# %----------------------------------------------------------------%
# | The archiver and the flag(s) to use when building an archive |
# | (library). Also the ranlib routine. If your system has no |
# | ranlib, set RANLIB = touch. |
# %----------------------------------------------------------------%
#
AR = ar
ARFLAGS = rv
#RANLIB = touch
RANLIB = ranlib
#
# %----------------------------------%
# | This is the general help target. |
# %----------------------------------%
#
help:
@$(ECHO) "usage: make ?"
这样设置完毕后,保存,然后输入命令,make lib,就一路默认下去就ok了。
为了查看安装成功与否,到目录/EXAMPLES/SIMPLE,输入命令:make snsimp,如果编译成功,./snsimp运行就ok了,如果安装过程中还有其他问题,请留言,我如果有时间就会及时回复。


