我正在尝试使用 icc 编译器和 MAGMAmic 库编译源文件。但是我收到以下错误:
icc -c -o direct.o direct.c -O3 -openmp -DADD_ -Wall -DHAVE_MIC -I/opt/intel/mic/coi/include -I/usr/include/intel-coi -I/opt/intel/compilers_and_libraries_2017.2.174/linux/mkl/include:/opt/intel/compilers_and_libraries_2017.2.174/linux/ipp/include:/opt/intel/compilers_and_libraries_2017.2.174/linux/mkl/include:/opt/intel/compilers_and_libraries_2017.2.174/linux/tbb/include:/opt/intel/compilers_and_libraries_2017.2.174/linux/daal/include -I/home/dslavchev/install/magmamic-1.4.0/include -I/home/dslavchev/install/magmamic-1.4.0/contol
icc: command line remark #10411: option '-openmp' is deprecated and will be removed in a future release. Please use the replacement option '-qopenmp'
In file included from /home/dslavchev/install/magmamic-1.4.0/include/magma_types.h(134),
from /home/dslavchev/install/magmamic-1.4.0/include/magmablas_z.h(17),
from /home/dslavchev/install/magmamic-1.4.0/include/magmablas.h(12),
from /home/dslavchev/install/magmamic-1.4.0/include/magma.h(17),
from direct.c(21):
/opt/intel/compilers_and_libraries_2017.2.174/linux/compiler/include/complex(30): catastrophic error: cannot open source file "complex"
#include_next <complex>
^
MAGMAmic 库已正确编译,我可以运行它进行测试。我查看了 testing_dgesv_mic.cpp 示例的编译方式并使用了相同的包含和链接,但是在我的情况下,我得到了上述错误。
为了获取英特尔编译器和库的环境变量,我在 .bashrc 文件中添加了以下内容:
#for MAGMA mic
export MAGMA_PATH=/home/dslavchev/install/magmamic-1.4.0
source /opt/intel/bin/compilervars.sh intel64
source /opt/intel/mkl/bin/mklvars.sh intel64
有什么想法可能导致 icc 无法包含“复杂”文件?
文件复合体确实存在于“/opt/intel/compilers_and_libraries_2017.2.174/linux/compiler/include/complex”中
ICC版本是:
[dslavchev@sl051 results]$ icc -v
icc version 17.0.2 (gcc version 4.4.7 compatibility)
magmamic 版本是 magmamic-1.4.0
编辑:删除了不必要的代码注释 EDIT2:添加了版本信息。