{"action":"created","issue":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/1474","repository_url":"https://api.github.com/repos/arrayfire/arrayfire","labels_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/1474/labels{/name}","comments_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/1474/comments","events_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/1474/events","html_url":"https://github.com/arrayfire/arrayfire/issues/1474","id":161823742,"number":1474,"title":"Building ArrayFire with MKL","user":{"login":"Brainiarc7","id":2356871,"avatar_url":"https://avatars.githubusercontent.com/u/2356871?v=3","gravatar_id":"","url":"https://api.github.com/users/Brainiarc7","html_url":"https://github.com/Brainiarc7","followers_url":"https://api.github.com/users/Brainiarc7/followers","following_url":"https://api.github.com/users/Brainiarc7/following{/other_user}","gists_url":"https://api.github.com/users/Brainiarc7/gists{/gist_id}","starred_url":"https://api.github.com/users/Brainiarc7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brainiarc7/subscriptions","organizations_url":"https://api.github.com/users/Brainiarc7/orgs","repos_url":"https://api.github.com/users/Brainiarc7/repos","events_url":"https://api.github.com/users/Brainiarc7/events{/privacy}","received_events_url":"https://api.github.com/users/Brainiarc7/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/arrayfire/arrayfire/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-06-23T01:51:39Z","updated_at":"2016-06-23T03:49:35Z","closed_at":"2016-06-23T03:33:17Z","body":"Hello guys,\r\n\r\nI have installed Intel's MKL toolkit (Parallel Studio XE 2016 update 1) and I'm using the module system to activate it:\r\n\r\n`module load mkl`\r\n\r\nThe module file is as follows:\r\n\r\n```\r\n#%Module1.0#####################################################################\r\n##\r\n## modules compilers/icc\r\n##\r\n## modulefiles/compilers/icc.  Written by Dennis Mungai\r\n##\r\nproc ModulesHelp { } {\r\n        global version modroot\r\n\r\n        puts stderr \"Intel C Compiler - sets the Environment for ICC's mkl/ in /apps/mkl\"\r\n}\r\n\r\nmodule-whatis   \"Intel(R) compiler suite (icc, icpc, ifort), debugger (idb), IPP and TBB ver 11.3.1.150\"\r\n\r\n\r\nsetenv           MKLROOT /apps/mkl/compilers_and_libraries_2016.1.150/linux/mkl\r\nprepend-path     MANPATH MANPATH=/apps/mkl/man/common:/apps/mkl/compilers_and_libraries_2016.1.150/linux/man/en_US:/apps/mkl/documentation_2016/en/debugger//gdb-ia/man/:/apps/mkl/documentation_2016/en/debugger//gdb-mic/man/:/apps/mkl/documentation_2016/en/debugger//gdb-igfx/man/\r\nsetenv           INTEL_LICENSE_FILE /apps/mkl/compilers_and_libraries_2016.1.150/linux/licenses:/opt/intel/licenses:/home/lin/intel/licenses\r\nsetenv           LIBRARY_PATH /apps/mkl/compilers_and_libraries_2016.1.150/linux/ipp/lib/intel64:/apps/mkl/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64:/apps/mkl/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64:/apps/mkl/compilers_and_libraries_2016.1.150/linux/tbb/lib/intel64/gcc4.4:/apps/mkl/compilers_and_libraries_2016.1.150/linux/daal/lib/intel64_lin:/apps/mkl/compilers_and_libraries_2016.1.150/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/apps/mkl/compilers_and_libraries_2016.1.150/linux/daal/../compiler/lib/intel64_lin\r\nsetenv           MIC_LD_LIBRARY_PATH /apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/compiler/lib/mic:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/mpi/mic/lib:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/tbb/lib/mic:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/compiler/lib/mic:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/mkl/lib/mic\r\nprepend-path     LD_LIBRARY_PATH /apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/ipp/lib/intel64:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/tbb/lib/intel64/gcc4.4:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/daal/lib/intel64_lin:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/apps/mkl/11.3.1.150/compilers_and_libraries_2016.1.150/linux/daal/../compiler/lib/intel64_lin\r\nsetenv           MIC_LIBRARY_PATH /apps/mkl/compilers_and_libraries_2016.1.150/linux/compiler/lib/mic:/apps/mkl/compilers_and_libraries_2016.1.150/linux/mpi/mic/lib:/apps/mkl/compilers_and_libraries_2016.1.150/linux/tbb/lib/mic\r\nsetenv           CPATH /apps/mkl/compilers_and_libraries_2016.1.150/linux/ipp/include:/apps/mkl/compilers_and_libraries_2016.1.150/linux/mkl/include:/apps/mkl/compilers_and_libraries_2016.1.150/linux/tbb/include:/apps/mkl/compilers_and_libraries_2016.1.150/linux/daal/include\r\nprepend-path     PATH /apps/mkl/compilers_and_libraries_2016.1.150/linux/bin/intel64:/apps/mkl/debugger_2016/gdb/intel64_mic/bin\r\nprepend-path     DAALROOT /apps/mkl/compilers_and_libraries_2016.1.150/linux/daal\r\nprepend-path     CLASSPATH /apps/mkl/compilers_and_libraries_2016.1.150/linux/daal/lib/daal.jar\r\nsetenv           TBBROOT /apps/mkl/compilers_and_libraries_2016.1.150/linux/tbb\r\nsetenv\t\t IPPROOT /apps/mkl/compilers_and_libraries_2016.1.150/linux/ipp\r\nsetenv\t\t NLSPATH /apps/mkl/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/locale/%l_%t/%N:/apps/mkl/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64/locale/%l_%t/%N:/apps/mkl/debugger_2016/gdb/intel64_mic/share/locale/%l_%t/%N:/apps/mkl/debugger_2016/gdb/intel64/share/locale/%l_%t/%N\r\nsetenv\t\t GDBCROSS /apps/mkl/debugger_2016/gdb/intel64_mic/bin/gdb-mic\r\nsetenv\t\t MPM_LAUNCHER /apps/mkl/debugger_2016/mpm/mic/bin/start_mpm.sh\r\nsetenv\t\t INTEL_PYTHONHOME /apps/mkl/debugger_2016/python/intel64/\r\nsetenv\t\t INFOPATH /apps/mkl/documentation_2016/en/debugger//gdb-ia/info/:/apps/mkl/documentation_2016/en/debugger//gdb-mic/info/:/apps/mkl/documentation_2016/en/debugger//gdb-igfx/info/\r\nconflict         mkl\r\n\r\n\r\n```\r\nI can confirm that the module loads successfully and that ICC (The Intel C Compiler and extras) are loaded and available on the system path when called upon:\r\n\r\n```\r\nlin@mjanja:~/source.build/GPGPU/arrayfire/build$ module list\r\nCurrently Loaded Modulefiles:\r\n  1) mkl/11.3.1.150\r\nlin@mjanja:~/source.build/GPGPU/arrayfire/build$ which icc\r\n/apps/mkl/compilers_and_libraries_2016.1.150/linux/bin/intel64/icc\r\nlin@mjanja:~/source.build/GPGPU/arrayfire/build$ printenv PATH\r\n/apps/mkl/compilers_and_libraries_2016.1.150/linux/bin/intel64:/apps/mkl/debugger_2016/gdb/intel64_mic/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/cuda-8.0/bin:/snap/bin\r\nlin@mjanja:~/source.build/GPGPU/arrayfire/build$ \r\n```\r\nNow, on building Arrayfire, here's the configuration string I'm using (doing an out-of-tree build):\r\n\r\n`cmake .. -DBUILD_CPU=ON -DBUILD_CUDA=ON -DBUILD_OPENCL=ON -DBUILD_GRAPHICS=OFF  -DBUILD_EXAMPLES=ON -DBUILD_TEST=ON -DBUILD_DOCS=ON -DCMAKE_BUILD_TYPE=Release -DUSE_CPU_MKL=ON -DCBLAS_LIBRARIES=\"/apps/mkl/lib/intel64/libmkl_core.a;/apps/mkl/lib/intel64/libmkl_gnu_thread.a;/apps/mkl/lib/intel64/libmkl_intel_lp64.a\" -DFFTW_LIB=\"/apps/mkl/lib/intel64/libmkl_core.a;/apps/mkl/lib/intel64/libmkl_gnu_thread.a;/apps/mkl/lib/intel64/libmkl_intel_lp64.a\" -DFFTWF_LIB=\"/apps/mkl/lib/intel64/libmkl_core.a;/apps/mkl/lib/intel64/libmkl_gnu_thread.a;/apps/mkl/lib/intel64/libmkl_intel_lp64.a\"  -DLAPACKE_LIB=\"/apps/mkl/lib/intel64/libmkl_core.a;/apps/mkl/lib/intel64/libmkl_gnu_thread.a;/apps/mkl/lib/intel64/libmkl_intel_lp64.a\" -DLAPACK_LIB=\"/apps/mkl/lib/intel64/libmkl_core.a;/apps/mkl/lib/intel64/libmkl_gnu_thread.a;/apps/mkl/lib/intel64/libmkl_intel_lp64.a;/apps/mkl/lib/intel64/libmkl_intel_lp64.a;/usr/lib64/libgomp.so.1;/usr/lib64/libdl.so;/usr/lib64/libpthread.so;/usr/lib/libm.so\" -DFFTW_INCLUDES=/apps/mkl/include/fftw/ -DLAPACKE_INCLUDES=/apps/mkl/include/ -DCMAKE_INSTALL_PREFIX=/apps/arrayfire/devel -DBUILD_CPU_ASYNC=ON -DBUILD_NONFREE=ON -DBUILD_UNIFIED=ON -DUSE_OPENCL_MKL=ON\r\n`\r\nHere's the failure I'm running into on building:\r\n\r\n```\r\n/apps/mkl/include/mmintrin.h:69:22: error: changes meaning of ‘__int64’ from ‘typedef long long int __int64’ [-fpermissive]\r\n    typedef long long __int64;\r\n                      ^\r\nIn file included from /apps/mkl/include/pmmintrin.h:21:0,\r\n                 from /apps/mkl/include/tmmintrin.h:14,\r\n                 from /apps/mkl/include/smmintrin.h:23,\r\n                 from /apps/mkl/include/nmmintrin.h:24,\r\n                 from /apps/mkl/include/wmmintrin.h:23,\r\n                 from /apps/mkl/include/immintrin.h:14,\r\n                 from /apps/mkl/include/x86intrin.h:14,\r\n                 from /usr/include/x86_64-linux-gnu/c++/5/bits/opt_random.h:33,\r\n                 from /usr/include/c++/5/random:50,\r\n                 from /usr/include/c++/5/bits/stl_algo.h:66,\r\n                 from /usr/include/c++/5/algorithm:62,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/Array.hpp:20,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key_impl.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key/sort_by_key_impl.cpp:10:\r\n/apps/mkl/include/emmintrin.h:67:25: error: ‘m128i_u64’ does not name a type\r\n     unsigned __int64    m128i_u64[2];\r\n                         ^\r\nIn file included from /apps/mkl/include/wmmintrin.h:23:0,\r\n                 from /apps/mkl/include/immintrin.h:14,\r\n                 from /apps/mkl/include/x86intrin.h:14,\r\n                 from /usr/include/x86_64-linux-gnu/c++/5/bits/opt_random.h:33,\r\n                 from /usr/include/c++/5/random:50,\r\n                 from /usr/include/c++/5/bits/stl_algo.h:66,\r\n                 from /usr/include/c++/5/algorithm:62,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/Array.hpp:20,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key_impl.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key/sort_by_key_impl.cpp:10:\r\n/apps/mkl/include/nmmintrin.h:133:40: error: expected initializer before ‘_mm_crc32_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _mm_crc32_u64(unsigned __int64,\r\n                                        ^\r\nIn file included from /apps/mkl/include/x86intrin.h:14:0,\r\n                 from /usr/include/x86_64-linux-gnu/c++/5/bits/opt_random.h:33,\r\n                 from /usr/include/c++/5/random:50,\r\n                 from /usr/include/c++/5/bits/stl_algo.h:66,\r\n                 from /usr/include/c++/5/algorithm:62,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/Array.hpp:20,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key_impl.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key/sort_by_key_impl.cpp:10:\r\n/apps/mkl/include/immintrin.h:47:5: error: ‘__int8’ does not name a type\r\n     __int8              m256i_i8[32];\r\n     ^\r\n/apps/mkl/include/immintrin.h:48:5: error: ‘__int16’ does not name a type\r\n     __int16             m256i_i16[16];\r\n     ^\r\n/apps/mkl/include/immintrin.h:49:5: error: ‘__int32’ does not name a type\r\n     __int32             m256i_i32[8];\r\n     ^\r\n/apps/mkl/include/immintrin.h:51:14: error: expected ‘;’ at end of member declaration\r\n     unsigned __int8     m256i_u8[32];\r\n              ^\r\n/apps/mkl/include/immintrin.h:51:25: error: ‘m256i_u8’ does not name a type\r\n     unsigned __int8     m256i_u8[32];\r\n                         ^\r\n/apps/mkl/include/immintrin.h:52:14: error: expected ‘;’ at end of member declaration\r\n     unsigned __int16    m256i_u16[16];\r\n              ^\r\n/apps/mkl/include/immintrin.h:52:25: error: ‘m256i_u16’ does not name a type\r\n     unsigned __int16    m256i_u16[16];\r\n                         ^\r\n/apps/mkl/include/immintrin.h:53:14: error: expected ‘;’ at end of member declaration\r\n     unsigned __int32    m256i_u32[8];\r\n              ^\r\n/apps/mkl/include/immintrin.h:53:25: error: ‘m256i_u32’ does not name a type\r\n     unsigned __int32    m256i_u32[8];\r\n                         ^\r\n/apps/mkl/include/immintrin.h:54:14: error: expected ‘;’ at end of member declaration\r\n     unsigned __int64    m256i_u64[4];\r\n              ^\r\n/apps/mkl/include/immintrin.h:54:25: error: ‘m256i_u64’ does not name a type\r\n     unsigned __int64    m256i_u64[4];\r\n                         ^\r\n/apps/mkl/include/immintrin.h:179:69: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n extern unsigned char __ICL_INTRINCC _BitScanForward(unsigned __int32*,\r\n                                                                     ^\r\n/apps/mkl/include/immintrin.h:181:69: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n extern unsigned char __ICL_INTRINCC _BitScanReverse(unsigned __int32*,\r\n                                                                     ^\r\n/apps/mkl/include/immintrin.h:186:71: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n extern unsigned char __ICL_INTRINCC _BitScanForward64(unsigned __int32*,\r\n                                                                       ^\r\n/apps/mkl/include/immintrin.h:188:71: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n extern unsigned char __ICL_INTRINCC _BitScanReverse64(unsigned __int32*,\r\n                                                                       ^\r\n/apps/mkl/include/immintrin.h:193:46: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittest(__int32 *, __int32);\r\n                                              ^\r\n/apps/mkl/include/immintrin.h:193:55: error: expected primary-expression before ‘,’ token\r\n extern unsigned char __ICL_INTRINCC _bittest(__int32 *, __int32);\r\n                                                       ^\r\n/apps/mkl/include/immintrin.h:193:57: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittest(__int32 *, __int32);\r\n                                                         ^\r\n/apps/mkl/include/immintrin.h:193:64: error: expression list treated as compound expression in initializer [-fpermissive]\r\n extern unsigned char __ICL_INTRINCC _bittest(__int32 *, __int32);\r\n                                                                ^\r\n/apps/mkl/include/immintrin.h:194:59: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittestandcomplement(__int32 *, __int32);\r\n                                                           ^\r\n/apps/mkl/include/immintrin.h:194:68: error: expected primary-expression before ‘,’ token\r\n extern unsigned char __ICL_INTRINCC _bittestandcomplement(__int32 *, __int32);\r\n                                                                    ^\r\n/apps/mkl/include/immintrin.h:194:70: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittestandcomplement(__int32 *, __int32);\r\n                                                                      ^\r\n/apps/mkl/include/immintrin.h:194:77: error: expression list treated as compound expression in initializer [-fpermissive]\r\n extern unsigned char __ICL_INTRINCC _bittestandcomplement(__int32 *, __int32);\r\n                                                                             ^\r\n/apps/mkl/include/immintrin.h:195:54: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittestandreset(__int32 *, __int32);\r\n                                                      ^\r\n/apps/mkl/include/immintrin.h:195:63: error: expected primary-expression before ‘,’ token\r\n extern unsigned char __ICL_INTRINCC _bittestandreset(__int32 *, __int32);\r\n                                                               ^\r\n/apps/mkl/include/immintrin.h:195:65: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittestandreset(__int32 *, __int32);\r\n                                                                 ^\r\n/apps/mkl/include/immintrin.h:195:72: error: expression list treated as compound expression in initializer [-fpermissive]\r\n extern unsigned char __ICL_INTRINCC _bittestandreset(__int32 *, __int32);\r\n                                                                        ^\r\n/apps/mkl/include/immintrin.h:196:52: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittestandset(__int32 *, __int32);\r\n                                                    ^\r\n/apps/mkl/include/immintrin.h:196:61: error: expected primary-expression before ‘,’ token\r\n extern unsigned char __ICL_INTRINCC _bittestandset(__int32 *, __int32);\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:196:63: error: ‘__int32’ was not declared in this scope\r\n extern unsigned char __ICL_INTRINCC _bittestandset(__int32 *, __int32);\r\n                                                               ^\r\n/apps/mkl/include/immintrin.h:196:70: error: expression list treated as compound expression in initializer [-fpermissive]\r\n extern unsigned char __ICL_INTRINCC _bittestandset(__int32 *, __int32);\r\n                                                                      ^\r\n/apps/mkl/include/immintrin.h:222:39: error: expected initializer before ‘_rotl64’\r\n extern unsigned __int64 __ICL_CDECLCC _rotl64(unsigned __int64, int);\r\n                                       ^\r\n/apps/mkl/include/immintrin.h:223:39: error: expected initializer before ‘_rotr64’\r\n extern unsigned __int64 __ICL_CDECLCC _rotr64(unsigned __int64, int);\r\n                                       ^\r\n/apps/mkl/include/immintrin.h:1006:8: error: ‘__int8’ does not name a type\r\n extern __int8  __ICL_INTRINCC _mm256_extract_epi8 (__m256i, const int);\r\n        ^\r\n/apps/mkl/include/immintrin.h:1007:8: error: ‘__int16’ does not name a type\r\n extern __int16 __ICL_INTRINCC _mm256_extract_epi16(__m256i, const int);\r\n        ^\r\n/apps/mkl/include/immintrin.h:1008:8: error: ‘__int32’ does not name a type\r\n extern __int32 __ICL_INTRINCC _mm256_extract_epi32(__m256i, const int);\r\n        ^\r\n/apps/mkl/include/immintrin.h:1124:60: error: ‘__int8’ has not been declared\r\n extern __m256i __ICL_INTRINCC _mm256_insert_epi8 (__m256i, __int8,  const int);\r\n                                                            ^\r\n/apps/mkl/include/immintrin.h:1125:60: error: ‘__int16’ has not been declared\r\n extern __m256i __ICL_INTRINCC _mm256_insert_epi16(__m256i, __int16, const int);\r\n                                                            ^\r\n/apps/mkl/include/immintrin.h:1126:60: error: ‘__int32’ has not been declared\r\n extern __m256i __ICL_INTRINCC _mm256_insert_epi32(__m256i, __int32, const int);\r\n                                                            ^\r\n/apps/mkl/include/immintrin.h:1619:40: error: expected initializer before ‘__rdtscp’\r\n extern unsigned __int64 __ICL_INTRINCC __rdtscp(unsigned int *);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:1639:40: error: expected initializer before ‘_castf32_u32’\r\n extern unsigned __int32 __ICL_INTRINCC _castf32_u32(float);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:1640:40: error: expected initializer before ‘_castf64_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _castf64_u64(double);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:1676:40: error: expected initializer before ‘_xgetbv’\r\n extern unsigned __int64 __ICL_INTRINCC _xgetbv(unsigned int);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:1757:59: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n extern int __ICL_INTRINCC _rdrand64_step(unsigned __int64 *);\r\n                                                           ^\r\n/apps/mkl/include/immintrin.h:1765:40: error: expected initializer before ‘_readfsbase_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _readfsbase_u64();\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:1766:40: error: expected initializer before ‘_readgsbase_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _readgsbase_u64();\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2271:40: error: expected initializer before ‘_bextr_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _bextr_u64(unsigned __int64,\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2274:40: error: expected initializer before ‘_blsi_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _blsi_u64(unsigned __int64);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2275:40: error: expected initializer before ‘_blsmsk_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _blsmsk_u64(unsigned __int64);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2276:40: error: expected initializer before ‘_blsr_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _blsr_u64(unsigned __int64);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2277:40: error: expected initializer before ‘_bzhi_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _bzhi_u64(unsigned __int64,\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2279:40: error: expected initializer before ‘_pext_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _pext_u64(unsigned __int64,\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2281:40: error: expected initializer before ‘_pdep_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _pdep_u64(unsigned __int64,\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2294:40: error: expected initializer before ‘_lzcnt_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _lzcnt_u64(unsigned __int64);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2306:40: error: expected initializer before ‘_tzcnt_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _tzcnt_u64(unsigned __int64);\r\n                                        ^\r\n/apps/mkl/include/immintrin.h:2344:59: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n extern int __ICL_INTRINCC _rdseed64_step(unsigned __int64 *);\r\n                                                           ^\r\n/apps/mkl/include/immintrin.h:2357:60: error: redefinition of ‘unsigned int __int64’\r\n                                                   unsigned __int64 /*src2*/,\r\n                                                            ^\r\n/apps/mkl/include/immintrin.h:2356:60: note: ‘unsigned int __int64’ previously declared here\r\n                                                   unsigned __int64 /*src1*/,\r\n                                                            ^\r\n/apps/mkl/include/immintrin.h:2358:60: error: redefinition of ‘unsigned int __int64’\r\n                                                   unsigned __int64 * /*out*/);\r\n                                                            ^\r\n/apps/mkl/include/immintrin.h:2356:60: note: ‘unsigned int __int64’ previously declared here\r\n                                                   unsigned __int64 /*src1*/,\r\n                                                            ^\r\n/apps/mkl/include/immintrin.h:2358:68: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n                                                   unsigned __int64 * /*out*/);\r\n                                                                    ^\r\n/apps/mkl/include/immintrin.h:2370:61: error: redefinition of ‘unsigned int __int64’\r\n                                                    unsigned __int64 /*src2*/,\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2369:61: note: ‘unsigned int __int64’ previously declared here\r\n                                                    unsigned __int64 /*src1*/,\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2371:61: error: redefinition of ‘unsigned int __int64’\r\n                                                    unsigned __int64 * /*out*/);\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2369:61: note: ‘unsigned int __int64’ previously declared here\r\n                                                    unsigned __int64 /*src1*/,\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2371:69: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n                                                    unsigned __int64 * /*out*/);\r\n                                                                     ^\r\n/apps/mkl/include/immintrin.h:2384:61: error: redefinition of ‘unsigned int __int64’\r\n                                                    unsigned __int64 /*src2*/,\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2383:61: note: ‘unsigned int __int64’ previously declared here\r\n                                                    unsigned __int64 /*src1*/,\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2385:61: error: redefinition of ‘unsigned int __int64’\r\n                                                    unsigned __int64 * /*out*/);\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2383:61: note: ‘unsigned int __int64’ previously declared here\r\n                                                    unsigned __int64 /*src1*/,\r\n                                                             ^\r\n/apps/mkl/include/immintrin.h:2385:69: error: expected ‘,’ or ‘...’ before ‘*’ token\r\n                                                    unsigned __int64 * /*out*/);\r\n                                                                     ^\r\n/apps/mkl/include/immintrin.h:2429:41: error: expected initializer before ‘_mulx_u64’\r\n extern unsigned __int64 __ICL_INTRINCC  _mulx_u64(unsigned __int64,\r\n                                         ^\r\nIn file included from /apps/mkl/include/immintrin.h:2455:0,\r\n                 from /apps/mkl/include/x86intrin.h:14,\r\n                 from /usr/include/x86_64-linux-gnu/c++/5/bits/opt_random.h:33,\r\n                 from /usr/include/c++/5/random:50,\r\n                 from /usr/include/c++/5/bits/stl_algo.h:66,\r\n                 from /usr/include/c++/5/algorithm:62,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/Array.hpp:20,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key_impl.hpp:11,\r\n                 from /home/lin/source.build/GPGPU/arrayfire/src/backend/cpu/kernel/sort_by_key/sort_by_key_impl.cpp:10:\r\n/apps/mkl/include/zmmintrin.h:43:29: error: expected initializer before ‘__mmask64’\r\n typedef unsigned __int64    __mmask64;\r\n                             ^\r\n/apps/mkl/include/zmmintrin.h:2965:41: error: expected initializer before ‘_mm_countbits_64’\r\n extern unsigned __int64  __ICL_INTRINCC _mm_countbits_64(unsigned __int64);\r\n                                         ^\r\n/apps/mkl/include/zmmintrin.h:4330:41: error: expected initializer before ‘_mm_cvt_roundsd_u64’\r\n extern unsigned __int64  __ICL_INTRINCC _mm_cvt_roundsd_u64(__m128d, int);\r\n                                         ^\r\n/apps/mkl/include/zmmintrin.h:4347:40: error: expected initializer before ‘_mm_cvtt_roundsd_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _mm_cvtt_roundsd_u64(__m128d, int);\r\n                                        ^\r\n/apps/mkl/include/zmmintrin.h:4383:41: error: expected initializer before ‘_mm_cvt_roundss_u64’\r\n extern unsigned __int64  __ICL_INTRINCC _mm_cvt_roundss_u64(__m128, int);\r\n                                         ^\r\n/apps/mkl/include/zmmintrin.h:4400:40: error: expected initializer before ‘_mm_cvtt_roundss_u64’\r\n extern unsigned __int64 __ICL_INTRINCC _mm_cvtt_roundss_u64(__m128, int);\r\n                                        ^\r\n/apps/mkl/include/zmmintrin.h:5388:40: error: expected initializer before ‘_mm512_reduce_min_epu64’\r\n extern unsigned __int64 __ICL_INTRINCC _mm512_reduce_min_epu64(__m512i);\r\n                                        ^\r\n/apps/mkl/include/zmmintrin.h:5389:40: error: expected initializer before ‘_mm512_mask_reduce_min_epu64’\r\n extern unsigned __int64 __ICL_INTRINCC _mm512_mask_reduce_min_epu64(__mmask8,\r\n                                        ^\r\n/apps/mkl/include/zmmintrin.h:5393:40: error: expected initializer before ‘_mm512_reduce_max_epu64’\r\n extern unsigned __int64 __ICL_INTRINCC _mm512_reduce_max_epu64(__m512i);\r\n                                        ^\r\n/apps/mkl/include/zmmintrin.h:5394:40: error: expected initializer before ‘_mm512_mask_reduce_max_epu64’\r\n extern unsigned __int64 __ICL_INTRINCC _mm512_mask_reduce_max_epu64(__mmask8,\r\n                                        ^\r\n/apps/mkl/include/zmmintrin.h:5806:63: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_loadu_epi8(__m512i, __mmask64,\r\n                                                               ^\r\n/apps/mkl/include/zmmintrin.h:5808:55: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_loadu_epi8(__mmask64, void const*);\r\n                                                       ^\r\n/apps/mkl/include/zmmintrin.h:5808:66: error: expected primary-expression before ‘void’\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_loadu_epi8(__mmask64, void const*);\r\n                                                                  ^\r\n/apps/mkl/include/zmmintrin.h:5838:59: error: ‘__mmask64’ has not been declared\r\n extern void __ICL_INTRINCC _mm512_mask_storeu_epi8(void*, __mmask64, __m512i);\r\n                                                           ^\r\n/apps/mkl/include/zmmintrin.h:5940:68: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_broadcastb_epi8(__m512i, __mmask64,\r\n                                                                    ^\r\n/apps/mkl/include/zmmintrin.h:5942:60: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_broadcastb_epi8(__mmask64, __m128i);\r\n                                                            ^\r\n/apps/mkl/include/zmmintrin.h:5942:78: error: expected primary-expression before ‘)’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_broadcastb_epi8(__mmask64, __m128i);\r\n                                                                              ^\r\n/apps/mkl/include/zmmintrin.h:5987:61: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_abs_epi8(__m512i, __mmask64,\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:5989:53: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_abs_epi8(__mmask64, __m512i);\r\n                                                     ^\r\n/apps/mkl/include/zmmintrin.h:5989:71: error: expected primary-expression before ‘)’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_abs_epi8(__mmask64, __m512i);\r\n                                                                       ^\r\n/apps/mkl/include/zmmintrin.h:6025:61: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_add_epi8(__m512i, __mmask64,\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:6027:53: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_add_epi8(__mmask64, __m512i,\r\n                                                     ^\r\n/apps/mkl/include/zmmintrin.h:6027:71: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_add_epi8(__mmask64, __m512i,\r\n                                                                       ^\r\n/apps/mkl/include/zmmintrin.h:6028:60: error: expected primary-expression before ‘)’ token\r\n                                                     __m512i);\r\n                                                            ^\r\n/apps/mkl/include/zmmintrin.h:6080:62: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_adds_epi8(__m512i, __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:6082:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_adds_epi8(__mmask64, __m512i,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:6082:72: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_adds_epi8(__mmask64, __m512i,\r\n                                                                        ^\r\n/apps/mkl/include/zmmintrin.h:6083:61: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:6108:62: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_adds_epu8(__m512i, __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:6110:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_adds_epu8(__mmask64, __m512i,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:6110:72: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_adds_epu8(__mmask64, __m512i,\r\n                                                                        ^\r\n/apps/mkl/include/zmmintrin.h:6111:61: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:6141:64: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_alignr_epi8(__m512i, __mmask64,\r\n                                                                ^\r\n/apps/mkl/include/zmmintrin.h:6144:56: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_alignr_epi8(__mmask64, __m512i,\r\n                                                        ^\r\n/apps/mkl/include/zmmintrin.h:6144:74: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_alignr_epi8(__mmask64, __m512i,\r\n                                                                          ^\r\n/apps/mkl/include/zmmintrin.h:6145:63: error: expected primary-expression before ‘,’ token\r\n                                                        __m512i, const int);\r\n                                                               ^\r\n/apps/mkl/include/zmmintrin.h:6145:65: error: expected primary-expression before ‘const’\r\n                                                        __m512i, const int);\r\n                                                                 ^\r\n/apps/mkl/include/zmmintrin.h:6258:61: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_avg_epu8(__m512i, __mmask64, __m512i,\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:6260:53: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_avg_epu8(__mmask64, __m512i,\r\n                                                     ^\r\n/apps/mkl/include/zmmintrin.h:6260:71: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_avg_epu8(__mmask64, __m512i,\r\n                                                                       ^\r\n/apps/mkl/include/zmmintrin.h:6261:60: error: expected primary-expression before ‘)’ token\r\n                                                     __m512i);\r\n                                                            ^\r\n/apps/mkl/include/zmmintrin.h:6280:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_mask_blend_epi8(__mmask64, __m512i,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:6280:72: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_mask_blend_epi8(__mmask64, __m512i,\r\n                                                                        ^\r\n/apps/mkl/include/zmmintrin.h:6281:61: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:6688:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_cmp_epi8_mask(__m512i, __m512i,\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:6690:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_mask_cmp_epi8_mask(__mmask64, __m512i,\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:6783:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_cmp_epu8_mask(__m512i, __m512i,\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:6785:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_mask_cmp_epu8_mask(__mmask64, __m512i,\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:8099:61: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_max_epi8(__m512i, __mmask64,\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:8101:53: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_max_epi8(__mmask64, __m512i,\r\n                                                     ^\r\n/apps/mkl/include/zmmintrin.h:8101:71: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_max_epi8(__mmask64, __m512i,\r\n                                                                       ^\r\n/apps/mkl/include/zmmintrin.h:8102:60: error: expected primary-expression before ‘)’ token\r\n                                                     __m512i);\r\n                                                            ^\r\n/apps/mkl/include/zmmintrin.h:8144:62: error: ‘__mmask64’ has not been declared\r\n extern __m512i  __ICL_INTRINCC _mm512_mask_max_epu8(__m512i, __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:8146:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_max_epu8(__mmask64, __m512i,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:8146:72: error: expected primary-expression before ‘,’ token\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_max_epu8(__mmask64, __m512i,\r\n                                                                        ^\r\n/apps/mkl/include/zmmintrin.h:8147:61: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:8202:62: error: ‘__mmask64’ has not been declared\r\n extern __m512i  __ICL_INTRINCC _mm512_mask_min_epi8(__m512i, __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:8204:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_min_epi8(__mmask64, __m512i,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:8204:72: error: expected primary-expression before ‘,’ token\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_min_epi8(__mmask64, __m512i,\r\n                                                                        ^\r\n/apps/mkl/include/zmmintrin.h:8205:61: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:8247:62: error: ‘__mmask64’ has not been declared\r\n extern __m512i  __ICL_INTRINCC _mm512_mask_min_epu8(__m512i, __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:8249:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_min_epu8(__mmask64, __m512i,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:8249:72: error: expected primary-expression before ‘,’ token\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_min_epu8(__mmask64, __m512i,\r\n                                                                        ^\r\n/apps/mkl/include/zmmintrin.h:8250:61: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:8298:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_movepi8_mask(__m512i);\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:8311:50: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i   __ICL_INTRINCC _mm512_movm_epi8(__mmask64);\r\n                                                  ^\r\n/apps/mkl/include/zmmintrin.h:8327:61: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_mov_epi8(__m512i, __mmask64,\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:8329:53: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_mov_epi8(__mmask64, __m512i);\r\n                                                     ^\r\n/apps/mkl/include/zmmintrin.h:8329:71: error: expected primary-expression before ‘)’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_mov_epi8(__mmask64, __m512i);\r\n                                                                       ^\r\n/apps/mkl/include/zmmintrin.h:8533:64: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_packs_epi16(__m512i, __mmask64,\r\n                                                                ^\r\n/apps/mkl/include/zmmintrin.h:8535:56: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_packs_epi16(__mmask64, __m512i,\r\n                                                        ^\r\n/apps/mkl/include/zmmintrin.h:8535:74: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_packs_epi16(__mmask64, __m512i,\r\n                                                                          ^\r\n/apps/mkl/include/zmmintrin.h:8536:63: error: expected primary-expression before ‘)’ token\r\n                                                        __m512i);\r\n                                                               ^\r\n/apps/mkl/include/zmmintrin.h:8561:65: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_packus_epi16(__m512i, __mmask64,\r\n                                                                 ^\r\n/apps/mkl/include/zmmintrin.h:8563:57: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_packus_epi16(__mmask64, __m512i,\r\n                                                         ^\r\n/apps/mkl/include/zmmintrin.h:8563:75: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_packus_epi16(__mmask64, __m512i,\r\n                                                                           ^\r\n/apps/mkl/include/zmmintrin.h:8564:64: error: expected primary-expression before ‘)’ token\r\n                                                         __m512i);\r\n                                                                ^\r\n/apps/mkl/include/zmmintrin.h:9137:63: error: ‘__mmask64’ has not been declared\r\n extern __m512i  __ICL_INTRINCC _mm512_mask_set1_epi8(__m512i, __mmask64, char);\r\n                                                               ^\r\n/apps/mkl/include/zmmintrin.h:9138:55: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_set1_epi8(__mmask64, char);\r\n                                                       ^\r\n/apps/mkl/include/zmmintrin.h:9138:66: error: expected primary-expression before ‘char’\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_set1_epi8(__mmask64, char);\r\n                                                                  ^\r\n/apps/mkl/include/zmmintrin.h:9189:66: error: ‘__mmask64’ has not been declared\r\n extern __m512i  __ICL_INTRINCC _mm512_mask_shuffle_epi8(__m512i, __mmask64,\r\n                                                                  ^\r\n/apps/mkl/include/zmmintrin.h:9191:58: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i  __ICL_INTRINCC _mm512_maskz_shuffle_epi8(__mmask64,\r\n                                                          ^\r\n/apps/mkl/include/zmmintrin.h:9192:65: error: expected primary-expression before ‘,’ token\r\n                                                          __m512i, __m512i);\r\n                                                                 ^\r\n/apps/mkl/include/zmmintrin.h:9192:74: error: expected primary-expression before ‘)’ token\r\n                                                          __m512i, __m512i);\r\n                                                                          ^\r\n/apps/mkl/include/zmmintrin.h:9565:61: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_sub_epi8(__m512i, __mmask64,\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:9567:53: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_sub_epi8(__mmask64,\r\n                                                     ^\r\n/apps/mkl/include/zmmintrin.h:9568:60: error: expected primary-expression before ‘,’ token\r\n                                                     __m512i, __m512i);\r\n                                                            ^\r\n/apps/mkl/include/zmmintrin.h:9568:69: error: expected primary-expression before ‘)’ token\r\n                                                     __m512i, __m512i);\r\n                                                                     ^\r\n/apps/mkl/include/zmmintrin.h:9593:62: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_subs_epi8(__m512i, __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:9595:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_subs_epi8(__mmask64,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:9596:61: error: expected primary-expression before ‘,’ token\r\n                                                      __m512i, __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:9596:70: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i, __m512i);\r\n                                                                      ^\r\n/apps/mkl/include/zmmintrin.h:9621:62: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_subs_epu8(__m512i, __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:9623:54: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_subs_epu8(__mmask64,\r\n                                                      ^\r\n/apps/mkl/include/zmmintrin.h:9624:61: error: expected primary-expression before ‘,’ token\r\n                                                      __m512i, __m512i);\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:9624:70: error: expected primary-expression before ‘)’ token\r\n                                                      __m512i, __m512i);\r\n                                                                      ^\r\n/apps/mkl/include/zmmintrin.h:9709:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_test_epi8_mask(__m512i, __m512i);\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:9710:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_mask_test_epi8_mask(__mmask64, __m512i,\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:9740:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_testn_epi8_mask(__m512i, __m512i);\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:9741:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_mask_testn_epi8_mask(__mmask64, __m512i,\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:9766:8: error: ‘__mmask64’ does not name a type\r\n extern __mmask64 __ICL_INTRINCC _mm512_kunpackd(__mmask64, __mmask64);\r\n        ^\r\n/apps/mkl/include/zmmintrin.h:9777:66: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_unpackhi_epi8(__m512i, __mmask64,\r\n                                                                  ^\r\n/apps/mkl/include/zmmintrin.h:9779:58: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_unpackhi_epi8(__mmask64, __m512i,\r\n                                                          ^\r\n/apps/mkl/include/zmmintrin.h:9779:76: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_unpackhi_epi8(__mmask64, __m512i,\r\n                                                                            ^\r\n/apps/mkl/include/zmmintrin.h:9780:65: error: expected primary-expression before ‘)’ token\r\n                                                          __m512i);\r\n                                                                 ^\r\n/apps/mkl/include/zmmintrin.h:9841:66: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_unpacklo_epi8(__m512i, __mmask64,\r\n                                                                  ^\r\n/apps/mkl/include/zmmintrin.h:9843:58: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_unpacklo_epi8(__mmask64, __m512i,\r\n                                                          ^\r\n/apps/mkl/include/zmmintrin.h:9843:76: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_unpacklo_epi8(__mmask64, __m512i,\r\n                                                                            ^\r\n/apps/mkl/include/zmmintrin.h:9844:65: error: expected primary-expression before ‘)’ token\r\n                                                          __m512i);\r\n                                                                 ^\r\n/apps/mkl/include/zmmintrin.h:10379:69: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_permutexvar_epi8(__m512i, __mmask64,\r\n                                                                     ^\r\n/apps/mkl/include/zmmintrin.h:10381:61: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_permutexvar_epi8(__mmask64, __m512i,\r\n                                                             ^\r\n/apps/mkl/include/zmmintrin.h:10381:79: error: expected primary-expression before ‘,’ token\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_permutexvar_epi8(__mmask64, __m512i,\r\n                                                                               ^\r\n/apps/mkl/include/zmmintrin.h:10382:68: error: expected primary-expression before ‘)’ token\r\n                                                             __m512i);\r\n                                                                    ^\r\n/apps/mkl/include/zmmintrin.h:10407:70: error: ‘__mmask64’ has not been declared\r\n extern __m512i __ICL_INTRINCC _mm512_mask_permutex2var_epi8(__m512i, __mmask64,\r\n                                                                      ^\r\n/apps/mkl/include/zmmintrin.h:10410:62: error: ‘__mmask64’ has not been declared\r\n                                                              __mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:10412:62: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_permutex2var_epi8(__mmask64,\r\n                                                              ^\r\n/apps/mkl/include/zmmintrin.h:10413:69: error: expected primary-expression before ‘,’ token\r\n                                                              __m512i, __m512i,\r\n                                                                     ^\r\n/apps/mkl/include/zmmintrin.h:10413:78: error: expected primary-expression before ‘,’ token\r\n                                                              __m512i, __m512i,\r\n                                                                              ^\r\n/apps/mkl/include/zmmintrin.h:10414:69: error: expected primary-expression before ‘)’ token\r\n                                                              __m512i);\r\n                                                                     ^\r\n/apps/mkl/include/zmmintrin.h:10433:65: error: ‘__mmask64’ has not been declared\r\n                                                                 __mmask64,\r\n                                                                 ^\r\n/apps/mkl/include/zmmintrin.h:10436:66: error: ‘__mmask64’ was not declared in this scope\r\n extern __m512i __ICL_INTRINCC _mm512_maskz_multishift_epi64_epi8(__mmask64,\r\n                                                                  ^\r\n/apps/mkl/include/zmmintrin.h:10437:73: error: expected primary-expression before ‘,’ token\r\n                                                                  __m512i,\r\n                                                                         ^\r\n/apps/mkl/include/zmmintrin.h:10438:73: error: expected primary-expression before ‘)’ token\r\n                                                                  __m512i);\r\n                                                                         ^\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_uchar.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_uchar.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_uchar.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:521: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_uchar.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_uchar.dir/all] Error 2\r\nmake[1]: *** Waiting for unfinished jobs....\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_double.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_double.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_double.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:225: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_double.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_double.dir/all] Error 2\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_int.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_int.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_int.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:188: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_int.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_int.dir/all] Error 2\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_float.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_float.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_float.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:373: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_float.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_float.dir/all] Error 2\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_uintl.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_uintl.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_uintl.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:262: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_uintl.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_uintl.dir/all] Error 2\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_char.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_char.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_char.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:299: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_char.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_char.dir/all] Error 2\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_uint.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_uint.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_uint.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:336: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_uint.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_uint.dir/all] Error 2\r\nsrc/backend/cpu/CMakeFiles/cpu_sort_by_key_intl.dir/build.make:62: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_intl.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o' failed\r\nmake[2]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_intl.dir/kernel/sort_by_key/sort_by_key_impl.cpp.o] Error 1\r\nCMakeFiles/Makefile2:410: recipe for target 'src/backend/cpu/CMakeFiles/cpu_sort_by_key_intl.dir/all' failed\r\nmake[1]: *** [src/backend/cpu/CMakeFiles/cpu_sort_by_key_intl.dir/all] Error 2\r\nMakefile:160: recipe for target 'all' failed\r\nmake: *** [all] Error 2\r\n\r\nreal\t0m3.410s\r\nuser\t0m18.108s\r\nsys\t0m1.168s\r\n```\r\nI took installation hints from a previous issue raised on a similar [issue ](https://github.com/arrayfire/arrayfire/issues/949) , and the consensus on this is that:\r\n\r\n1. Arrayfire's CMake scripts do not automatically detect MKL.\r\n\r\nSo, is there any progress on that front?\r\n\r\nIt seems I'm also affected by a similar issue.\r\n\r\nThanks and regards,\r\n\r\nBrainiarc7.\r\n"},"comment":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/comments/227942776","html_url":"https://github.com/arrayfire/arrayfire/issues/1474#issuecomment-227942776","issue_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/1474","id":227942776,"user":{"login":"Brainiarc7","id":2356871,"avatar_url":"https://avatars.githubusercontent.com/u/2356871?v=3","gravatar_id":"","url":"https://api.github.com/users/Brainiarc7","html_url":"https://github.com/Brainiarc7","followers_url":"https://api.github.com/users/Brainiarc7/followers","following_url":"https://api.github.com/users/Brainiarc7/following{/other_user}","gists_url":"https://api.github.com/users/Brainiarc7/gists{/gist_id}","starred_url":"https://api.github.com/users/Brainiarc7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brainiarc7/subscriptions","organizations_url":"https://api.github.com/users/Brainiarc7/orgs","repos_url":"https://api.github.com/users/Brainiarc7/repos","events_url":"https://api.github.com/users/Brainiarc7/events{/privacy}","received_events_url":"https://api.github.com/users/Brainiarc7/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T03:49:35Z","updated_at":"2016-06-23T03:49:35Z","body":"Sure, thanks."}}
{"actor":{"display_login":"Brainiarc7"}}