2017-09-15 89 views
0

我想用icc编译器和MAGMAmic库编译源文件。但是,我收到以下错误:用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文件如下,以获得英特尔编译器和库ENVIROMENTAL变量:

#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 

任何想法可能会导致国际刑事法院不能包括‘复杂’文件?

文件复杂真的存在 “/opt/intel/compilers_and_libraries_2017.2.174/linux/compiler/include/complex”

ICC vesrion是:

[[email protected] results]$ icc -v 
icc version 17.0.2 (gcc version 4.4.7 compatibility) 

magmamic版本magmamic-1.4。 0

编辑:删除不必要的代码注释 编辑2:添加版本信息。

+0

#include_next 与英特尔C++编译器17.0 Update 2一起提供的复杂头文件正在寻找下一个可用的复杂头文件(寻找GNU提供的头文件)。你使用的是哪个版本的GCC? –

+0

我使用icc(英特尔编译器)17.0.2版本 –

+0

以及您正在运行ICC的GCC兼容模式。您可以通过运行以下命令获得此信息: icc -v –

回答

0

MAGMAmic是一个C++库,它不能直接与C代码一起使用。

当icc检测到您要编译.C++文件时,它会自动切换到icpc(Intel C++编译器),从而导致上述错误。

解决方法:更换为ICPC或重命名文件为.C++

这个问题是在MAGMA论坛上回答了标记。链接: http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=1587&p=4442#p4442