Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

CMake build with MKL_USE_ILP64 throws type mismatch #16471

@dszeto2

Description

@dszeto2

When setting MKL_USE_ILP64 to On in the CMake build, the build fails:

In file included from /home/dszeto2/Desktop/mxnet/src/operator/c_lapack_api.cc:20:0:
/home/dszeto2/Desktop/mxnet/src/operator/c_lapack_api.h: In function `int MXNET_LAPACK_sgetri(int, int, float*, int, int*, float*, int)`:
/home/dszeto2/Desktop/mxnet/src/operator/c_lapack_api.h:249:68: error: cannot convert `int*` to `const long long int*` for argument `5` to `long long int LAPACKE_sgetri(int, long long int, float*, long long int, const long long int*)`
       return LAPACKE_##prefix##getri(matrix_layout, n, a, lda, ipiv); \
                                                                    ^
/home/dszeto2/Desktop/mxnet/src/operator/c_lapack_api.h:254:3: note: in expansion of macro `MXNET_LAPACK_CWRAP_GETRI`
   MXNET_LAPACK_CWRAP_GETRI(s, float)
   ^
/home/dszeto2/Desktop/mxnet/src/operator/c_lapack_api.h: In function`int MXNET_LAPACK_dgetri(int, int, double*, int, int*, double*, int)`:
/home/dszeto2/Desktop/mxnet/src/operator/c_lapack_api.h:249:68: error: cannot convert `int*` to `const long long int*` for argument `5` to `long long int LAPACKE_dgetri(int, long long int, double*, long long int, const long long int*)`
       return LAPACKE_##prefix##getri(matrix_layout, n, a, lda, ipiv); \
                                                                    ^
/home/dszeto2/Desktop/mxnet/src/operator/c_lapack_api.h:255:3: note: in expansion of macro `MXNET_LAPACK_CWRAP_GETRI`
   MXNET_LAPACK_CWRAP_GETRI(d, double)

The rest of my CMake build command is here:

cmake \
-DUSE_CUDA=Off \
-DUSE_CUDNN=Off \
-DUSE_LAPACK=On \
-DUSE_F16C=Off \
-DBLAS=MKL \
-DUSE_OPENCV=Off \
-DUSE_PROFILER=On \
-DUSE_MKLDNN=Off \
-DUSE_OPENMP=On \
-DBUILD_CPP_EXAMPLES=Off \
-DMKL_USE_SINGLE_DYNAMIC_LIBRARY=Off \
-DMKL_USE_STATIC_LIBS=Off \
-DCMAKE_SHARED_LINKER_FLAGS="-lrt" \
-DCMAKE_SKIP_BUILD_RPATH=On \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=On \
-DCMAKE_INSTALL_RPATH="\$ORIGIN" \
-DINTEL_ROOT=/opt/intel \
-DMKL_ROOT=/opt/intel/mkl \
-DMKL_USE_ILP64=On \
-DMKL_USE_CLUSTER=Off \
-DUSE_MKL_IF_AVAILABLE=On \
-DINTEL_RTL_ROOT=/opt/intel/lib/intel64_lin \
-DCMAKE_BUILD_TYPE=Release \
..

I'm using gcc 4.8.2 on CentOS-6 from commit f52ddfd880ad9d0e5a9d26eb41aabdd96fa4ac65. Setting MKL_USE_ILP64 to Off gets mxnet to build and successfully link against libmkl_intel_lp64.so, which is expected. Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions