こーゆー雑なことをやって、たまに本職にガチトーンで怒られます。
概要
CUDA10.2はICC(IntelCompiler)のバージョン19.0までに対応していますが、バージョン19.1に対応していません。
ですがまぁマイナーアップデートなのできっと大丈夫でしょう。
バージョン確認
$ icc -v
icc バージョン 19.1.0.166 (gcc バージョン 4.8.5 互換)
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89
エラー内容
In file included from /usr/local/cuda-10.2/include/cuda_runtime.h(83),
from potlok.cu(0):
/usr/local/cuda-10.2/include/crt/host_config.h(110): エラー: #error ディレクティブ: -- unsupported ICC configuration! Only ICC 15.0, ICC 16.0, ICC 17.0, ICC 18.0 and ICC 19.0 on Linux x86_64 are supported!
#error -- unsupported ICC configuration! Only ICC 15.0, ICC 16.0, ICC 17.0, ICC 18.0 and ICC 19.0 on Linux x86_64 are supported!
概要にも書いたとおり、対応してないのでエラーが吐かれます。
実施事項
$ cd /usr/local/cuda/include/crt/
$ diff host_config.h host_config.h.org
108c108
< #if (__ICC != 1500 && __ICC != 1600 && __ICC != 1700 && __ICC != 1800 && __ICC != 1900 && __ICC != 1910) || !defined(__GNUC__) || !defined(__LP64__)
---
> #if (__ICC != 1500 && __ICC != 1600 && __ICC != 1700 && __ICC != 1800 && __ICC != 1900) || !defined(__GNUC__) || !defined(__LP64__)
とりあえずエラーを止めてみました。
現状
問題なく動いてるから問題ないです。
(2021/02/28追記)
ICC2021.1 Betaでも動いたよ。
$ diff host_config.h host_config.h.org
108c108
< #if (__ICC != 1500 && __ICC != 1600 && __ICC != 1700 && __ICC != 1800 && __ICC != 1900 && __ICC != 2021) || !defined(__GNUC__) || !defined(__LP64__)
---
> #if (__ICC != 1500 && __ICC != 1600 && __ICC != 1700 &&