Intel oneAPI compilers worked across several beta versions as well as several CMake versions. I simply use icc/icl + ifort so I think this is unrelated to the IntelClang and DPC++ currently in CMake GitLab MRs.
However, the Intel oneAPI Gold release (December 8, 2020) is broken for me with CMake on Linux and Windows. I was afraid to try MacOS since Linux and Windows worked with oneAPI beta, but broke with Gold oneAPI.
So while the real issue may rest with the compiler, at least others can know that they may wish to keep using beta oneAPI for now.
Linux
cmake_minimum_required(VERSION 3.14)
project(oops C)
find_package(MPI)
results in
$ cd /scratch/foo
$ cmake -B build
-- The C compiler identification is Intel 20.2.1.20201112
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /intel/oneapi/compiler/2021.1.1/linux/bin/intel64/icc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error in /scratch/foo/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path
"/scratch/foo/'/intel/oneapi/mpi/2021.1.1/include'"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error at /share/cmake-3.19/Modules/FindMPI.cmake:1213 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/share/cmake-3.19/Modules/FindMPI.cmake:1264 (_MPI_try_staged_settings)
/share/cmake-3.19/Modules/FindMPI.cmake:1529 (_MPI_check_lang_works)
CMakeLists.txt:4 (find_package)
Windows
The symptoms here are more complex. I frequently link statically build libraries together, as linking dynamic libraries between C and Fortran is more complicated on Windows with Intel compilers. Let’s say I build Zlib, then link it into another C program. Suddenly on running the compiled executable, I get error 135 and popup saying zlib.dll is missing, while as before I was using zlib.lib.
My first speculation would be that maybe the way the linker or linker flags works has changed? As for Linux, this may actually be a compiler instead of CMake issue, not sure.
cmake -DDISTRIBUTED=ON -DOUTPUT_EXE=random_bin -DUSER_SOURCE=/home/root/running_quest/ASC_QuEST/random_recordingQASM_vincent.c /home/root/QUEST/QuEST-2.1.0/
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- GPU acceleration is OFF
-- OMP acceleration is ON
-- MPI distribution is ON
CMake Error in /home/root/running_quest/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path
"/home/root/QUEST/QuEST-2.1.0/QuEST/'/share/apps/intel/oneapi/mpi/2021.1.1/include'"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error in /home/root/running_quest/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
Imported target "MPI::MPI_C" includes non-existent path
"/home/root/QUEST/QuEST-2.1.0/QuEST/'/share/apps/intel/oneapi/mpi/2021.1.1/include'"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
CMake Error at /usr/share/cmake/Modules/FindMPI.cmake:1179 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindMPI.cmake:1220 (_MPI_try_staged_settings)
/usr/share/cmake/Modules/FindMPI.cmake:1480 (_MPI_check_lang_works)
QuEST/CMakeLists.txt:102 (find_package)
-- Configuring incomplete, errors occurred!
Intel installation is in /share/apps/intel/oneapi. Can anyone give any hint on how debug this issue? It would be greatly appreciated.