mpich2+gfortran+siesta3.1安装过程
2013-03-05 16:41
92 查看
mpich2+gfortran+siesta3.1安装过程
最近有用户需要siesta软件,于是安装了一遍,还真是费了不少事,不知道是siesta还是netlib的数学库和intel的编译器不兼容,用intel的编译器试了好几遍都不成功,用gfortran一遍就顺利的通过了。下面是具体的过程。
一、gfortran
这个一般linux系统都自带的
二、mpich2
这个可以在官网上下载,其中的fortran模块需要用gfortran编译在~/.bashrc中 export FC=gfortran F90=gfortran 然后 ./configure
--prefix=/data3/home/xhx/opt/mpich2-gfortran --enable-fc --enable-f77 --with-pm=mpd:hydra。安装完之后在~/.bashrc中设置MPI环境变量。
三、安装netlib数学库
1、BLAS
到官网下载,直接进人文件夹直接make就行,会生成blas_LINUX.a文件。
2、lapack 3.4.2
到官网下载。
首先要进入BLACS目录,把librefblas.a make出来
cp make.inc.example make.inc
vim make.inc
SHELL = /bin/sh
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
# refers to the compiler options desired when NO OPTIMIZATION is
# selected. Define LOADER and LOADOPTS to refer to the loader and
# desired load options for your machine.
#
FORTRAN = gfortran
OPTS = -O2
DRVOPTS = $(OPTS)
NOOPT = -O0
LOADER = gfortran
LOADOPTS =
#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
#TIMER = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
# TIMER = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
TIMER = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
# TIMER = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER = NONE
#
# Configuration LAPACKE: Native C interface to LAPACK
# To generate LAPACKE library: type 'make lapackelib'
# Configuration file: turned off (default)
# Complex types: C99 (default)
# Name pattern: mixed case (default)
# (64-bit) Data model: LP64 (default)
#
# CC is the C compiler, normally invoked with options CFLAGS.
#
CC = gcc
CFLAGS = -O3
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
#
ARCH = ar
ARCHFLAGS= cr
RANLIB = ranlib
#
# Location of the extended-precision BLAS (XBLAS) Fortran library
# used for building and testing extended-precision routines. The
# relevant routines will be compiled and XBLAS will be linked only if
# USEXBLAS is defined.
#
# USEXBLAS = Yes
XBLASLIB =
# XBLASLIB = -lxblas
#
# The location of the libraries to which you will link. (The
# machine-specific, optimized BLAS library should be used whenever
# possible.)
#
BLASLIB = ../../librefblas.a
LAPACKLIB = liblapack.a
TMGLIB = libtmglib.a
LAPACKELIB = liblapacke.a
3、BLACS
从官网下载mpiblacs,从BMAKS文件夹中寻找合适的Bmake文件,直接make就行。
4、scalapack2.0.2
从官网下载scalapack,进入目录。
cp SLmake.inc.example SLmake.inc
make
四、安装siesta 3.1
到Obj目录下,
sh ../Src/obj_setup.sh
sh ../Src/configure --enable-mpi --with-blas=/data3/blas_LINUX.a --with-lapack=/data3/liblapack.a --with-blacs=/data3/blacs_MPI-LINUX-0.a --with-scalapack=/data3/libscalapack.a
make
如果顺利就会编译出siesta,如果出现错误,可以先到把Src/MPI 目录下的所有东西都拷贝到 Obj/MPI/目录下make之后再到Obj目录下make。
至此全部安装完毕。
最近有用户需要siesta软件,于是安装了一遍,还真是费了不少事,不知道是siesta还是netlib的数学库和intel的编译器不兼容,用intel的编译器试了好几遍都不成功,用gfortran一遍就顺利的通过了。下面是具体的过程。
一、gfortran
这个一般linux系统都自带的
二、mpich2
这个可以在官网上下载,其中的fortran模块需要用gfortran编译在~/.bashrc中 export FC=gfortran F90=gfortran 然后 ./configure
--prefix=/data3/home/xhx/opt/mpich2-gfortran --enable-fc --enable-f77 --with-pm=mpd:hydra。安装完之后在~/.bashrc中设置MPI环境变量。
三、安装netlib数学库
1、BLAS
到官网下载,直接进人文件夹直接make就行,会生成blas_LINUX.a文件。
2、lapack 3.4.2
到官网下载。
首先要进入BLACS目录,把librefblas.a make出来
cp make.inc.example make.inc
vim make.inc
SHELL = /bin/sh
#
# Modify the FORTRAN and OPTS definitions to refer to the
# compiler and desired compiler options for your machine. NOOPT
# refers to the compiler options desired when NO OPTIMIZATION is
# selected. Define LOADER and LOADOPTS to refer to the loader and
# desired load options for your machine.
#
FORTRAN = gfortran
OPTS = -O2
DRVOPTS = $(OPTS)
NOOPT = -O0
LOADER = gfortran
LOADOPTS =
#
# Timer for the SECOND and DSECND routines
#
# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
#TIMER = EXT_ETIME
# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
# TIMER = EXT_ETIME_
# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
TIMER = INT_ETIME
# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
# TIMER = INT_CPU_TIME
# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
# TIMER = NONE
#
# Configuration LAPACKE: Native C interface to LAPACK
# To generate LAPACKE library: type 'make lapackelib'
# Configuration file: turned off (default)
# Complex types: C99 (default)
# Name pattern: mixed case (default)
# (64-bit) Data model: LP64 (default)
#
# CC is the C compiler, normally invoked with options CFLAGS.
#
CC = gcc
CFLAGS = -O3
# The archiver and the flag(s) to use when building archive (library)
# If you system has no ranlib, set RANLIB = echo.
#
ARCH = ar
ARCHFLAGS= cr
RANLIB = ranlib
#
# Location of the extended-precision BLAS (XBLAS) Fortran library
# used for building and testing extended-precision routines. The
# relevant routines will be compiled and XBLAS will be linked only if
# USEXBLAS is defined.
#
# USEXBLAS = Yes
XBLASLIB =
# XBLASLIB = -lxblas
#
# The location of the libraries to which you will link. (The
# machine-specific, optimized BLAS library should be used whenever
# possible.)
#
BLASLIB = ../../librefblas.a
LAPACKLIB = liblapack.a
TMGLIB = libtmglib.a
LAPACKELIB = liblapacke.a
3、BLACS
从官网下载mpiblacs,从BMAKS文件夹中寻找合适的Bmake文件,直接make就行。
4、scalapack2.0.2
从官网下载scalapack,进入目录。
cp SLmake.inc.example SLmake.inc
make
四、安装siesta 3.1
到Obj目录下,
sh ../Src/obj_setup.sh
sh ../Src/configure --enable-mpi --with-blas=/data3/blas_LINUX.a --with-lapack=/data3/liblapack.a --with-blacs=/data3/blacs_MPI-LINUX-0.a --with-scalapack=/data3/libscalapack.a
make
如果顺利就会编译出siesta,如果出现错误,可以先到把Src/MPI 目录下的所有东西都拷贝到 Obj/MPI/目录下make之后再到Obj目录下make。
至此全部安装完毕。
相关文章推荐
- Eclipse3.1 + struts + tomcat + lomboz安装配置过程
- Debian_Sarge3.1硬盘从NT/XP系统引导安装基本系统到X桌面全过程
- OpenLaszlo 3.2 IDEforLaszlo 0.2.0(Eclipse 3.1) 的安装配置过程
- PYQT4 + Python2.6 + eric4-4.2.2a的安装全过程
- 【linux】安装centOS过程中遇到的困难
- Linux下安装Oracle的过程和涉及的知识点-系列3
- Hadoop2.6.0安装过程中出现的问题(一)
- 在虚拟机里安装centos 6.4和centos 5.8里配置vim 7.4安装过程
- centos 安装samba 全过程
- Ubuntu14.04下安装 Jlink 往S3C2440 开发板下载程序过程的 安装、使用
- 自己安装PY-FASTER-RCNN过程
- mysql和mod_perl2安装过程中几个问题解决办法
- windows下 rails3.1+Rmagick+ImageMagick安装
- VSS2005安装和配置过程中遇到的问题
- 安装win8、ubuntu双系统的过程
- Ubuntu 12.04(32位)安装Oracle 11g(32位)全过程以及几乎所有问题的解决办法
- oracle安装常见问题-安装过程中遇到网络配置需求检查失败
- Linux下安装VMware虚拟机的过程详解
- 同时安装office2016与visio2016的实现过程
- android apk 安装过程