编译安装调试 scaLapack 和 openmpi 以及 lapack


编译安装调试 scaLapack

/home/hipper/ex_scalapack/
mkdir ./lapack
mkdir -p ./lapack/local/lib
mkdir ./openmpi
mkdir ./scalapack


1,编译安装 Lapack

下载代码:

cd lapack
wget https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.12.0.tar.gz
tar zxf v3.12.0.tar.gz

编译lapack:

cd lapack-3.12.0/
cp make.inc.example make.inc
make -j

ls ./

安装 lapack:

cd ..
cp lapack-3.12.0/lib*.a ./local/lib/

设置scalapack编译时需要的环境变量:

libLapackPath=/home/hipper/ex_scalapack/lapack/local/lib/liblapack.a
libRefBlasPath=/home/hipper/ex_scalapack/lapack/local/lib/librefblas.a

2, 编译安装 openmpi

下载代码:
 

cd openmpi/
wget https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.6.tar.gz


配置编译:
 

./configure  --prefix=/home/hipper/ex_scalapack/openmpi/local --with-cuda  2>&1 | tee config.out

make -j
make install

./configure --help

可以查看配置选项,

比如编译 libopenmpi_cxx.so:

./configure  \
--prefix=/home/hipper/ex_openmpi/local \
--enable-mpi-cxx  \
--enable-mpi-fortran \
--with-cuda  2>&1 | tee config.out

设置环境变量:

export PATH=$PATH:/home/hipper/ex_scalapack/openmpi/local/bin
export LD_LIBRARY_PATH=/home/hipper/ex_scalapack/openmpi/local/lib:$LD_LIBRARY_PATH

ls ../local/bin

3,编译安装 sacLapack

下载代码:
 

cd scalapack/
git clone https://github.com/Reference-ScaLAPACK/scalapack.git
或者:
wget https://github.com/Reference-ScaLAPACK/scalapack/archive/refs/tags/v2.2.0.tar.gz
tar zxf v2.2.0.tar.gz

配置编译
 

mkdir build/
cd build/
cmake -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_CXX_COMPILER=mpicxx \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_Fortran_COMPILER=mpifort \
-DLAPACK_LIBRARIES=$libLapackPath \
-DBLAS_LIBRARIES=$libRefBlasPath \
../scalapack

make -j

ls ./lib/

4. 单机简单测试

ls ./TESTING/

./xdqr

参考:

https://support.huawei.com/enterprise/zh/doc/EDOC1100283144/17286012


https://docs.nvidia.com/nvpl/_static/scalapack/getting-started.html



https://github.com/amd/aocl-scalapack

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值