编译安装调试 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:

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

设置环境变量:

bash 复制代码
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

下载代码:

bash 复制代码
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

配置编译

bash 复制代码
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
相关推荐
Eloudy3 个月前
sgetrf M N is 103040 时报错,这是个bug么 lapack and Openblas the same,修复备忘
lapack·openblas
noravinsc5 个月前
paraview 跨节点并行渲染
mpi·paraview
长安er5 个月前
高性能并行计算华为云实验一:MPI矩阵运算
华为云·并行·高性能·mpi·高性能并行计算·串行
canmoumou7 个月前
【分布式通信】NPKit,NCCL的Profiling工具
人工智能·mpi·nccl
piaopiaolanghua1 年前
MPI和C++/Qt混用的收发消息的例子(主从模式)
qt·mpi
KingOfMyHeart1 年前
MPI之通信模式(标准,缓存,同步,就绪)
缓存·同步·mpi·并行计算·通信模式·标准·就绪