This is an English translation of an article that appeared in 2020 below.
Translation was performed with the help of ChatGPT.
tpcbtw.hatenablog.com
Overview
CUDA 10.2 is compatible with ICC (Intel Compiler) version 19.0, but not with version 19.1. However, since it's a minor update, it should work fine.
Version check
$ 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
Error message
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!
As mentioned in the overview, ICC version 19.1 is not supported and results in an error.
Action taken
$ 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__)
For the time being, the error was fixed.
Current status
It is now working without any issues.
(Update on 2021/02/28)
It also worked with ICC 2021.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 &&