一、FFTW Download下载与安装
FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). We believe that FFTW, which is free software, should become the FFT library of choice for most applications. FFTW 是 C 用于计算离散傅里叶变换 (DFT) 的子例程库 在一个或多个维度中,具有任意输入大小,并且都是实数 和复杂数据(以及偶数/奇数数据,即离散数据 余弦/正弦变换或 DCT/DST)。我们认为 FFTW、 这是自由软件,应该成为大多数人的首选 FFT 库 应用。
The latest official release of FFTW is version 3.3.10, available from our download page. Version 3.3 introduced support for the AVX x86 extensions, a distributed-memory implementation on top of MPI, and a Fortran 2003 API. Version 3.3.1 introduced support for the ARM Neon extensions. See the release notes for more information. FFTW 的最新正式版本是 3.3.10 版,可从我们的下载页面获取。版本 3.3 引入了对 AVX x86 扩展的支持、基于 MPI 的分布式内存实现以及 Fortran 2003 API。版本 3.3.1 引入了对 ARM Neon 扩展的支持。有关详细信息,请参阅发行说明。
The FFTW package was developed at MIT by Matteo Frigo and Steven G. Johnson. FFTW 包由 Matteo Frigo 和 Steven G. Johnson 在 MIT 开发。
Our benchmarks, performed on on a variety of platforms, show that FFTW’s performance is typically superior to that of other publicly available FFT software, and is even competitive with vendor-tuned codes. In contrast to vendor-tuned codes, however, FFTW’s performance is portable: the same program will perform well on most architectures without modification. Hence the name, “FFTW,” which stands for the somewhat whimsical title of “Fastest Fourier Transform in the West.” 我们的基准测试, 在各种平台上演出,表明 FFTW 的表现 通常优于其他公开可用的 FFT 软件,甚至与供应商调整的代码竞争。 在 然而,与供应商调整的代码相比,FFTW 的性能是 可移植:相同的程序无需修改即可在大多数架构上表现良好。因此得名“FFTW”,它代表着“西方最快的傅里叶变换”这个有点异想天开的标题。
下载之后进行解压安装:
1
2
3
4
5
6
7
tar -zxvf fftw-3.3.10
cd fftw-3.3.10
mkdir build
cd build
./configure --prefix=/opt/fftw
make -j
sudo make install
需要特别注意的是,默认一般使用gcc和gfortran编译器。
如果需要使用intel编译器icc和ifx(ifort),最好在编译前强制指定:
1
2
3
4
5
export CC=icc
export CXX=icpc
export F77=ifort
export F90=ifort
export FC=ifort
二、hypre — Releases下载与安装
HYPRE is a library of high performance preconditioners and solvers featuring multigrid methods for the solution of large, sparse linear systems of equations on massively parallel computers. HYPRE 是一个高性能预条件器和求解器库,具有多网格方法,用于在大规模并行计算机上求解大型稀疏线性方程组。
For documentation, see our readthedocs page. 有关文档,请参阅我们的 readthedocs 页面。
For information on code development, build requirements, publications, and more, see our Wiki page. 有关代码开发、构建要求、出版物等的信息,请参阅我们的 Wiki 页面。
To install HYPRE, please see either the documentation or the file INSTALL.md. 要安装 HYPRE,请参阅文档或文件 INSTALL.md。
An overview of the HYPRE release history can be found in the file CHANGELOG. HYPRE 发行历史的概述可以在文件 CHANGELOG 中找到。
Support information can be found in the file SUPPORT.md. 支持信息可以在 file SUPPORT.md 中找到。
下载之后进行解压安装,在src文件夹中:
1
2
3
4
5
6
7
tar -zxvf hypre-2.32.0
cd hypre-2.32.0
cd src
mkdir build
cd build
../configure --prefix=/opt/hypre #路径有时候设置不生效
cmake ../
hypre安装需要cmake ../,且安装路径有时候设置不生效,需要打开CMakeCache.txt文件,搜索PREFIX。一共有3处,修改为要安装的路径(/opt/hypre)。
继续完成编译和安装。
1
2
make -j
sudo make install
需要特别注意的是,hypre默认使用并行编译器:
1
2
3
4
5
export CC=mpicc
export CXX=mpicxx
export F77=mpif90
export F90=mpif90
export FC=mpif90