-
CXXABI… not found
(1)strings /xxx/libstdc++.so.6 |grep CXXABI 先查看一下是否有你需要的版本
(2)从系统的库里查看是否有高版本的 libstdc++.so.6.xx ,一般是在/usr/lib64里
(3)将高版本的重新链接 ln -s libstdc++.so.6 libstdc++.so.6.xx 注意替换xx为你需要的版本
(4)在 module load conda 时,可能没有加载 conda/lib ,手动添加 LD_LIBRARY_PATH 即可 -
git ’ ’ … 时提示too many argument
问题的原因是有些系统内的git版本太低,无法识别新的参数,如果不是自己的电脑只能从别的地方下载好需要的包再上传(太坑爹了) -
对‘H5Aopen’未定义的引用,等等
添加-L/path/to/hdf5/lib -lhdf5 -
对‘cblas_sgemv’未定义的引用,等等
添加-L/path/to/lapack/lib -lcblas -
对‘sgemv_’未定义的引用,等等
添加-L/path/to/lapack/lib -lblas -
对‘_gfortran_st_write’未定义的引用,等等
添加 -lgfortran -
miniconda3 创建环境命令
conda create -n env_name -f env_file
网上很多教程还停留在老版本,使用 conda env create … -
conda 安装 basemap
conda install basemap 时会安装matplotlib 3.0.0,此时在 python 中使用 from mpl_toolkits.basemap import Basemap 会报错 ImportError: cannot import name ‘is_scalar’ ,需要用 pip 将 matplotlib 3.0.0卸载,安装 matplotlib 2.2.0(可能会有别的包冲突) -
undefined reference to `for_write_seq_fmt’
添加编译选项 -lifcore -
lapack 提示错误 undefined reference to `dcopy_’ 等等
在 -llapack 后添加编译选项 -lblas -
运行软件时提示 /lib64/libc.so.6: version GLIBC_2.14’ not found ,原因是 libc 版本太低,但是因为是在系统层面不方便升级,以下操作
强烈建议在 conda 虚拟环境中使用
patchelf --set-interpreter /new/path/to/glibc.so.6 /path/to/execute/file
或者
patchelf --set-rpath /new/path/to/glibc.so.6 /path/to/library/file -
Fortran 编译错误
Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/REAL(8)).
其实该错误并不影响程序的运行,在编译选项中添加 -fallow-argument-mismatch 即可跳过(亲测有些无法跳过) -
Fortran 编译器 mpif90 错误,版本 gcc 10.0.2
Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
原因:编译器版本太高
解决办法:https://gcc.gnu.org/gcc-10/porting_to.html
添加编译选项 -fallow-argument-mismatch -
C 编译器 mpicc 错误
error: Could not compile a test program with AVX512, adjust the C compiler or CFLAGS
解决办法:添加编译选项 CFLAGS=-march=sandybridge 或者 -march=haswell ,march=knl -
安装 libint 时遇到 gmpxx.h 缺失,明明安装 gcc 的时候已经安装了 gmp 为什么不行呢?
原因:安装 gmp 时没有支持 cxx
解决办法:安装 gmp 时,./configure --enable-cxx --prefix…
如果你是非 root 用户,在自己账号下安装一份也是可以用的 -
X11 库缺失
建议使用 conda 安装
conda install -c conda-forge xorg-libx11
- X11 库在调用时提示缺少 XauGetBestAuthByAddr 等函数,或者是提示找不到 libxau.so
依然使用 conda 安装
conda install -c conda-forge xorg-libxau
-
编译 lapack 时如果使用 mpiifort ,可能会出现错误 :second_INT_ETIME.f(53): error #6407: This symbolic name is not an intrinsic function name or an intrinsic subroutine name.
解决办法:在 make.inc 中设置 TIMER = INT_CPU_TIME -
perl “bsd_glob” is not defined in %File::Glob::EXPORT_TAGS
原因:bsd_glob 是 perl 5.10几以后的语法,需要升级
解决办法: 安装更高版本的perl,例如 perl 5.28 -
Perl 出错 Can’t locate XML/LibXML.pm in @INC
原因:新安装的 perl 没有 xml 模块
解决办法:cpan -i XML::LibXML -
无法识别的命令行选项“-fstack-protector-strong”
原因:gcc 版本过低
解决办法:需要更高版本的 gcc ,例如 gcc 5.4.0 -
编译时 error #6580: Name in only-list does not exist. [MPI_INFO_NULL] use mpi, only : MPI_COMM_NULL, MPI_INFO_NULL ! _EXTERNAL
原因: icc 编译器版本过低
解决办法:使用高版本的 icc ,例如 intel 2017 编译器 -
python GLIBC 2.14 缺少
patchelf --set-interpreter /path/to/glibc-2.14/lib/ld-linux-x86-64.so.2 /path/to/python
-
gcc、g++ 在编译时出现 cannot find ‘ld’
原因:系统里的 binutils 版本太低了
解决办法:1)如果是远程服务器,确保你的系统里的有 conda 环境 ,然后直接 conda install binutils 即可
2)如果是你的个人电脑,可以使用 yum 或者 apt-get 安装 -
使用 gcc 10 + openmpi 进行编译时出现:Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
原因:gcc 版本太高
解决办法:不需要更换编译器,而是在编译选项 FFLAGS 和 FCFLAGES 中添加 “-w -fallow-argument-mismatch -O2” 即可 -
Error: no such instruction: `vpbroadcastw %xmm2,%xmm2’
原因:avx2 的问题,有两种解决办法
解决办法:1. 在编译选择中添加 -march=native (具体看你自己的机器配置),这种办法在编译软件时可能没有作用 2.软件编译中一般在 configure 时有 avx2 的选项,关闭即可 (-no-avx2 / --disable-avx2) -
python 实用 mpi4py 提交到 slurm 上出现下述错误
python: error: Invalid user for SlurmUser slurmadmin, ignored
python: error: Invalid user for SlurmUser slurmadmin, ignored
python: error: plugin_load_from_file: dlopen(/xxxx/slurm-16.05.3/lib/slurm/auth_munge.so): libmunge.so.2: cannot open shared object file: No such file or directory
python: error: Couldn't load specified plugin name for auth/munge: Dlopen of plugin file failed
原因:使用上述的 patchelf 给 python 添加 glibc 后出现,可能导致了依赖库加载出现错误
解决方法:conda 重新安装 python,如果其他用 pip 安装的库提示确实 GLIBC_2.14 可以尝试使用conda 安装
(conda 会自动解决依赖问题)
- 未完待续。。。。