我正在编译一个代码,该代码在Cray XC30系统上使用Cray LibSci数字库进行BLAS和LAPACK,使用英特尔编译器和" -ipo"标志并包括" -openmp"编译支持OpenMP的代码。
对于我尝试编译的任何代码,我看到以下错误:
** segmentation violation signal raised **
Access violation or stack overflow. Please contact Support.
ifort: error #10106: Fatal error in /opt/intel/composer_xe_2013_sp1.4.211/bin/intel64/fortcom, terminated by segmentation violation
ifort: error #10014: problem during multi-file optimization compilation (code 1)
这可以通过一个非常简单的例子来说明:
user@eslogin008:~> cat blas1F.f
program blas1F
implicit none
real*4 x(4), y(4)
external sswap
data x/2, 3, 4, 5/
data y/5, 4, 9, 2/
call sswap(4, x, 1, y, 1)
write (*,*) 'After Swap..'
end
编译:
user@eslogin008:~> ftn -ipo -openmp blas1F.f
** segmentation violation signal raised **
Access violation or stack overflow. Please contact Support.
ifort: error #10106: Fatal error in /opt/intel/composer_xe_2013_sp1.4.211/bin/intel64/fortcom, terminated by segmentation violation
ifort: error #10014: problem during multi-file optimization compilation (code 1)
排除其中一个" -ipo"或" -openmp" flags会导致代码编译并运行正常。
答案 0 :(得分:0)
这是Cray LibSci库的线程化(OpenMP)版本导致问题。一种解决方法是通过添加“-lsci_intel”来链接库的非线程版本:
user@eslogin008:~> ftn -ipo -openmp -lsci_intel blas1F.f
ipo: remark #11001: performing single-file optimizations
ipo: remark #11006: generating object file /tmp/ipo_ifortcBBetG.o