如何为 Xeon Phi 编译 C 代码 (Windows 10)
How to compile C code for Xeon Phi (Windows 10)
我开始使用 Xeon Phi,但一直试图将一个简单的 C 程序编译为 运行 它在协处理器上。我试过使用 icl 和 icc 命令,但我没有任何运气。
1.- 带 icl
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\bin\intel64>icl test.c -o test.mic
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.2.185 Build 20180210
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
test.c
Microsoft (R) Incremental Linker Version 14.15.26726.0
Copyright (C) Microsoft Corporation. All rights reserved.
-out:test.mic
test.obj
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\bin\intel64>
然后我尝试在 Xeon Phi
上 运行 test.mic
[xeon@mic0 ~]$ ./test.mic
-sh: ./test.mic: cannot execute binary file
[xeon@mic0 ~]$
2.- 带 icc
C:\Intel\cc_android_2018.2.185\bin\intel64>icc test.c -o test.mic
Error: A license for (Comp-CL) could not be found.
License file(s) used were (in this order):
1. C:\Program Files (x86)\Common Files\Intel\Licenses\NCOM_W___XXXX-XXXXXXXX.lic
2. C:\Intel\cc_android_2018.2.185\bin\intel64\..\..\Licenses
3. C:\Program Files\Common Files\Intel\Licenses\NCOM_W___XXXX-XXXXXXXX.lic
4. C:\Intel\cc_android_2018.2.185\bin\intel64\NCOM_W___XXXX-XXXXXXXX.lic
Please refer https://software.intel.com/en-us/faq/licensing#invalid-license-error for more information..
icc: error #10052: could not checkout FLEXlm license
我不确定这个错误,因为我有许可证。
问题是我使用的英特尔 Parallel Studio 版本 (Intel Parallel Studio 2018)。我下载了 Intel Parallel Studio 2017 Update 7,编译成功了。我使用的命令:
icl /Qmic test.c -o test.out
我收到了这个错误:
icl: command line remark #10148: option '/Qmic' not supported
我开始使用 Xeon Phi,但一直试图将一个简单的 C 程序编译为 运行 它在协处理器上。我试过使用 icl 和 icc 命令,但我没有任何运气。
1.- 带 icl
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\bin\intel64>icl test.c -o test.mic
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.2.185 Build 20180210
Copyright (C) 1985-2018 Intel Corporation. All rights reserved.
test.c
Microsoft (R) Incremental Linker Version 14.15.26726.0
Copyright (C) Microsoft Corporation. All rights reserved.
-out:test.mic
test.obj
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\bin\intel64>
然后我尝试在 Xeon Phi
上 运行 test.mic[xeon@mic0 ~]$ ./test.mic
-sh: ./test.mic: cannot execute binary file
[xeon@mic0 ~]$
2.- 带 icc
C:\Intel\cc_android_2018.2.185\bin\intel64>icc test.c -o test.mic
Error: A license for (Comp-CL) could not be found.
License file(s) used were (in this order):
1. C:\Program Files (x86)\Common Files\Intel\Licenses\NCOM_W___XXXX-XXXXXXXX.lic
2. C:\Intel\cc_android_2018.2.185\bin\intel64\..\..\Licenses
3. C:\Program Files\Common Files\Intel\Licenses\NCOM_W___XXXX-XXXXXXXX.lic
4. C:\Intel\cc_android_2018.2.185\bin\intel64\NCOM_W___XXXX-XXXXXXXX.lic
Please refer https://software.intel.com/en-us/faq/licensing#invalid-license-error for more information..
icc: error #10052: could not checkout FLEXlm license
我不确定这个错误,因为我有许可证。
问题是我使用的英特尔 Parallel Studio 版本 (Intel Parallel Studio 2018)。我下载了 Intel Parallel Studio 2017 Update 7,编译成功了。我使用的命令:
icl /Qmic test.c -o test.out
我收到了这个错误:
icl: command line remark #10148: option '/Qmic' not supported