Skip to content

[Build] Build with Intel MKL fails with "invalid conversion" in solve.cpp #3180

@anates

Description

@anates

When compiling ArrayFire with only the CPU-Backend and Intel MKL the compilation fails with

[ 25%] Building CXX object src/backend/cpu/CMakeFiles/afcpu.dir/solve.cpp.o
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp: In function 'void (* cpu::getrs_batch_strided_func())(const char*, const int*, const int*, T*, const int*, const int*, int*, const int*, T*, const int*, const int*, const int*, int*) [with T = float; cpu::getrs_batch_strided_func_def = void ()(const char, const int*, const int*, float*, const int*, const int*, int*, const int*, float*, const int*, const int*, const int*, int*)]':
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp:124:12: error: invalid conversion from 'void ()(const char, const int*, const int*, const float*, const int*, const int*, const int*, const int*, float*, const int*, const int*, const int*, int*) noexcept' {aka 'void ()(const char, const int*, const int*, const float*, const int*, const int*, const int*, const int*, float*, const int*, const int*, const int*, int*)'} to 'cpu::getrs_batch_strided_func_def' {aka 'void ()(const char, const int*, const int*, float*, const int*, const int*, int*, const int*, float*, const int*, const int*, const int*, int*)'} [-fpermissive]
124 | return &sgetrs_batch_strided;
| ^~~~~~~~~~~~~~~~~~~~~
| |
| void ()(const char, const int*, const int*, const float*, const int*, const int*, const int*, const int*, float*, const int*, const int*, const int*, int*) noexcept {aka void ()(const char, const int*, const int*, const float*, const int*, const int*, const int*, const int*, float*, const int*, const int*, const int*, int*)}
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp: In function 'void (* cpu::getrs_batch_strided_func())(const char*, const int*, const int*, T*, const int*, const int*, int*, const int*, T*, const int*, const int*, const int*, int*) [with T = double; cpu::getrs_batch_strided_func_def = void ()(const char, const int*, const int*, double*, const int*, const int*, int*, const int*, double*, const int*, const int*, const int*, int*)]':
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp:128:12: error: invalid conversion from 'void ()(const char, const int*, const int*, const double*, const int*, const int*, const int*, const int*, double*, const int*, const int*, const int*, int*) noexcept' {aka 'void ()(const char, const int*, const int*, const double*, const int*, const int*, const int*, const int*, double*, const int*, const int*, const int*, int*)'} to 'cpu::getrs_batch_strided_func_def' {aka 'void ()(const char, const int*, const int*, double*, const int*, const int*, int*, const int*, double*, const int*, const int*, const int*, int*)'} [-fpermissive]
128 | return &dgetrs_batch_strided;
| ^~~~~~~~~~~~~~~~~~~~~
| |
| void ()(const char, const int*, const int*, const double*, const int*, const int*, const int*, const int*, double*, const int*, const int*, const int*, int*) noexcept {aka void ()(const char, const int*, const int*, const double*, const int*, const int*, const int*, const int*, double*, const int*, const int*, const int*, int*)}
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp: In function 'void (* cpu::getrs_batch_strided_func())(const char*, const int*, const int*, T*, const int*, const int*, int*, const int*, T*, const int*, const int*, const int*, int*) [with T = _MKL_Complex8; cpu::getrs_batch_strided_func_def = void ()(const char, const int*, const int*, _MKL_Complex8*, const int*, const int*, int*, const int*, _MKL_Complex8*, const int*, const int*, const int*, int*)]':
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp:133:12: error: invalid conversion from 'void ()(const char, const int*, const int*, const MKL_Complex8*, const int*, const int*, const int*, const int*, MKL_Complex8*, const int*, const int*, const int*, int*) noexcept' {aka 'void ()(const char, const int*, const int*, const MKL_Complex8*, const int*, const int*, const int*, const int*, MKL_Complex8*, const int*, const int*, const int*, int*)'} to 'cpu::getrs_batch_strided_func_def<_MKL_Complex8>' {aka 'void ()(const char, const int*, const int*, _MKL_Complex8*, const int*, const int*, int*, const int*, _MKL_Complex8*, const int*, const int*, const int*, int*)'} [-fpermissive]
133 | return &cgetrs_batch_strided;
| ^~~~~~~~~~~~~~~~~~~~~
| |
| void ()(const char, const int*, const int*, const MKL_Complex8*, const int*, const int*, const int*, const int*, MKL_Complex8*, const int*, const int*, const int*, int*) noexcept {aka void ()(const char, const int*, const int*, const MKL_Complex8*, const int*, const int*, const int*, const int*, MKL_Complex8*, const int*, const int*, const int*, int*)}
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp: In function 'void (* cpu::getrs_batch_strided_func())(const char*, const int*, const int*, T*, const int*, const int*, int*, const int*, T*, const int*, const int*, const int*, int*) [with T = _MKL_Complex16; cpu::getrs_batch_strided_func_def = void ()(const char, const int*, const int*, _MKL_Complex16*, const int*, const int*, int*, const int*, _MKL_Complex16*, const int*, const int*, const int*, int*)]':
~/Downloads/git-files/arrayfire/src/backend/cpu/solve.cpp:138:12: error: invalid conversion from 'void ()(const char, const int*, const int*, const MKL_Complex16*, const int*, const int*, const int*, const int*, MKL_Complex16*, const int*, const int*, const int*, int*) noexcept' {aka 'void ()(const char, const int*, const int*, const MKL_Complex16*, const int*, const int*, const int*, const int*, MKL_Complex16*, const int*, const int*, const int*, int*)'} to 'cpu::getrs_batch_strided_func_def<_MKL_Complex16>' {aka 'void ()(const char, const int*, const int*, _MKL_Complex16*, const int*, const int*, int*, const int*, _MKL_Complex16*, const int*, const int*, const int*, int*)'} [-fpermissive]
138 | return &zgetrs_batch_strided;
| ^~~~~~~~~~~~~~~~~~~~~
| |
| void ()(const char, const int*, const int*, const MKL_Complex16*, const int*, const int*, const int*, const int*, MKL_Complex16*, const int*, const int*, const int*, int*) noexcept {aka void ()(const char, const int*, const int*, const MKL_Complex16*, const int*, const int*, const int*, const int*, MKL_Complex16*, const int*, const int*, const int*, int*)}
make[2]: *** [src/backend/cpu/CMakeFiles/afcpu.dir/build.make:958: src/backend/cpu/CMakeFiles/afcpu.dir/solve.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:833: src/backend/cpu/CMakeFiles/afcpu.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Build Environment

Compiler version: GCC 11.2
Operating system: OpenSUSE TW

CMake variables: -- Could NOT find cuDNN (missing: cuDNN_LINK_LIBRARY cuDNN_INCLUDE_DIRS) (Required is at least version "4.0")
-- Checking for module 'cblas'
-- Package 'cblas', required by 'virtual:world', not found
-- Checking for [Accelerate]
-- Checking for [vecLib]
-- Checking for [cblas - atlas]
-- Includes found
-- Checking for [openblas]
-- Includes found
-- CBLAS Symbols FOUND
-- CBLAS library found
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (LAPACK)
does not match the name of the calling package (LAPACKE). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
CMakeModules/FindLAPACKE.cmake:153 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:55 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Could NOT find LAPACK (missing: LAPACK_INCLUDE_DIR)
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (OpenMP_C)
does not match the name of the calling package (OpenMP). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
CMakeModules/FindOpenMP.cmake:402 (find_package_handle_standard_args)
CMakeModules/FindMKL.cmake:76 (find_package)
CMakeLists.txt:57 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (OpenMP_CXX)
does not match the name of the calling package (OpenMP). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
CMakeModules/FindOpenMP.cmake:402 (find_package_handle_standard_args)
CMakeModules/FindMKL.cmake:76 (find_package)
CMakeLists.txt:57 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

-- MKL: Thread Layer(GNU OpenMP) Interface(4-byte Integer)
CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (OpenMP_C)
does not match the name of the calling package (OpenMP). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
CMakeModules/FindOpenMP.cmake:402 (find_package_handle_standard_args)
CMakeModules/FindMKL.cmake:330 (find_package)
CMakeLists.txt:57 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to find_package_handle_standard_args (OpenMP_CXX)
does not match the name of the calling package (OpenMP). This can lead to
problems in calling code that expects find_package result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
CMakeModules/FindOpenMP.cmake:402 (find_package_handle_standard_args)
CMakeModules/FindMKL.cmake:330 (find_package)
CMakeLists.txt:57 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Deprecation Warning at CMakeLists.txt:118 (message):
Variables USE_CPU_MKL/USE_OPENCL_MKL are deprecated. Use
AF_COMPUTE_LIBRARY instead.

CMake Warning at CMakeLists.txt:120 (message):
USE_CPU_MKL/USE_OPENCL_MKL defined. These values take precendence over the
value of

  AF_COMPUTE_LIBRARY until they are removed to preserve existing build behavior.

-- Configuring done
-- Generating done
-- Build files have been written to: ~/Downloads/git-files/arrayfire/build
-- Cache values

AF_BUILD_CPU:BOOL=ON
AF_BUILD_CUDA:BOOL=OFF
AF_BUILD_DOCS:BOOL=OFF
AF_BUILD_EXAMPLES:BOOL=ON
AF_BUILD_FORGE:BOOL=OFF
AF_BUILD_OPENCL:BOOL=OFF
AF_BUILD_UNIFIED:BOOL=ON
AF_COMPUTE_LIBRARY:STRING=Intel-MKL
AF_STACKTRACE_TYPE:STRING=Basic
AF_WITH_CUDNN:BOOL=OFF
BUILD_TESTING:BOOL=OFF
CMAKE_BUILD_TYPE:STRING=Release
CMAKE_Fortran_COMPILER:FILEPATH=/opt/intel/oneapi/mpi/latest/bin/mpifc
CMAKE_INSTALL_PREFIX:PATH=/opt/arrayfire
CUDA_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-11.3
MKL_THREAD_LAYER:STRING=GNU OpenMP
USE_CPU_MKL:BOOL=ON
USE_MKL:BOOL=ON

--

CMakeCache

CMakeCache.txt

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions