簡體   English   中英

使用icc和MAGMAmic進行編譯時找不到“復雜”系統文件

[英]Compiling with icc and MAGMAmic cannot find “complex” system file

我正在嘗試使用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文件中添加了以下內容,以獲取Intel編譯器和庫的環境變量:

#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 vesrion是:

[dslavchev@sl051 results]$ icc -v
icc version 17.0.2 (gcc version 4.4.7 compatibility)

magmamic版本是magmamic-1.4.0

編輯:刪除了不必要的代碼注釋編輯2:添加了版本信息。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM