---
title: 安装ScaLAPACK
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/openmind_kunpengcp2k_02_0013.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/openmind_kunpengcp2k_02_0013.html
indexId: 6c2bde970cb3b4b393905a29a87d783a508a9afd7b437a095818b00680dd3ca575
---
# 安装ScaLAPACK

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令解压ScaLAPACK安装包。

```
tar -xvf scalapack-2.1.0.tgz
```


3. 执行以下命令进入解压后的目录。

```
cd scalapack-2.1.0
```


4. 执行以下命令进行粘贴复制。

```
cp SLmake.inc.example SLmake.inc
```


5. 执行以下命令进行修改“SLmake.inc”文件。

  a. 打开“SLmake.inc”文件。

```
vi SLmake.inc
```


  b. 按“i”进入编辑模式，修改如下内容。

```
BLASLIB=/path/to/LAPACK/libblas.a
LAPACKLIB=/path/to/LAPACK/liblapack.a
LIBS=$(LAPACKLIB) $(BLASLIB)
```


  c. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
6. 执行以下命令进行编译。

```
make
```


7. 执行以下命令复制生成静态库到另外目录。

```
cp *.a
/path/to/EXTRA
/mathlib
```
