---
title: 安装ScaLAPACK
description: "1. 使用PuTTY工具，以root用户登录服务器。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengcp2k7_02_0011.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengcp2k7_02_0011.html
indexId: 9b34c0568504e3e9e311cff99e409ebfb77e6a0021e6d7ec2ca9240103e444bb67
---
# 安装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”文件。

```
vim SLmake.inc
```


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

```
BLASLIB    = /path/to/EXTRA/librefblas.a
LAPACKLIB  = /path/to/EXTRA/liblapack.a
LIBS       = $(LAPACKLIB) $(BLASLIB)
```


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

```
make -j
```


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

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