---
title: 故障排除
description: "现象描述："
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengabinit_02_0013.html
sourcePath: /source/zh/kunpenghpcs/hpcindapp/prtg-osc/kunpengabinit_02_0013.html
indexId: b4dff8d82474f60e8e45b20d5ead4d990e904a25b02b8693d7f75ef79abed14768
---
# 故障排除

#### 问题一：运行configure时报错

现象描述：

运行configure时报错，报错信息为：“error: external libxc support does not work”。

可能原因：

--with-libxc-libs=未按照顺序写。

处理步骤：

在8后按顺序加：

```
-
-with-libxc-libs=-lxcf90 -lxc
---
```


#### 问题二：编译ABINIT时make报错

现象描述：

编译ABINIT时make报错，报错信息为：“Error: Line truncated at (1) [-Werror=line-truncation]”。

可能原因：

此错误是因为代码中未限制132个字符。

处理步骤：

需要在8的FCFLAGS="-g -O2 -ffree-line-length-none"中增加-ffree-line-length-none。


#### 问题三：编译ABINIT时make报错

现象描述：

编译ABINIT时make报错，报错信息为：“File 'mpi.mod' opened at (1) is not a GNU Fortran module file”。

可能原因：

此错误是因为GCC和OpenMPI编译器版本不对应。

处理步骤：

统一OpenMPI和ABINIT使用的编译器可以解决问题。在安装过程中OpenMPI，BLAS-LAPACK，NetCDF等都需要保持统一编译器，否则会出现各种错误。


#### 问题四：编译ABINIT时make报错

现象描述：

编译ABINIT时make报错，报错信息为：“abinit-8.10.3/config/gnu/missing: line 81: automake-1.16: command not found”。

可能原因：

此错误是因为生成“Malefile”时制定了aclocal和automake版本为1.16。

处理步骤：

查看系统的automake版本在“Makefile”中替换成系统版本。

1. 执行以下命令打开“Makefile”文件。

```
vi abinit-8.10.3/build/Makefile
```


2. 按“i”进入编辑模式，修改Makefile为系统版本，注意粗体部分。

```
AUTOMAKE = ${SHELL} /storage/softwares/TaiShan/abinit/abinit-8.10.3/config/gnu/missing automake-
1.16
```


3. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。


#### 问题五：运行算例时报错

现象描述：

运行算例时报错，报错信息类似：段错误


可能原因：

诸如此类的段错误是由于编译ABINIT的编译器跟OpenMPI-4.0.1和BLAS使用的编译器不一致。

处理步骤：

安装Atompaw可优化数据的内存读写。

1. 执行以下命令进入Atompaw安装包存放目录。

```
cd
/path/to/ABINIT
/extral
```


2. 执行以下命令解压源码包。

```
tar xvf atompaw-4.0.1.0.tar.gz
```


3. 执行以下命令进入源码。

```
cd atompaw-4.0.1.0
```


4. 执行以下命令进行编译安装。

```
./configure
make
make install
```
