Skip to content

Possible missing includes, for openblas and Intel's MKL libs #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
advancedwebdeveloper opened this issue Aug 30, 2020 · 0 comments
Open
Labels
bug Something isn't working

Comments

@advancedwebdeveloper
Copy link

Hi. Performed my build attempt on Ubuntu 20 x86_64, with Clang 11.0 RC2 + Ninja 1.10.0 + CMake 3.18.2:
$ cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DMKL_CORE_LIB="/media/ubuntu/4d5fa4ce-dc9b-4cb0-934c-72533ffc1586/intel_mkl_install/mkl/lib" -DMKL_INCLUDE_DIR="/media/ubuntu/4d5fa4ce-dc9b-4cb0-934c-72533ffc1586/intel_mkl_install/mkl/include" -DMKL_SEQUENTIAL_LIB="/media/ubuntu/4d5fa4ce-dc9b-4cb0-934c-72533ffc1586/intel_mkl_install/mkl/lib" -DMKL_INTEL_LIB="/media/ubuntu/4d5fa4ce-dc9b-4cb0-934c-72533ffc1586/intel_mkl_install/mkl/lib" ../NeoML
-- The CXX compiler identification is Clang 11.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOTFOUND
-- No CUDA support.
-- Found OpenMP_CXX: -fopenmp=libomp (found version "5.0")
-- Found OpenMP: TRUE (found version "5.0")
-- Found MKL: /media/ubuntu/4d5fa4ce-dc9b-4cb0-934c-72533ffc1586/intel_mkl_install/mkl/include
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.a;-pthread (found version "3.6.1")
-- Found protoc compiler: /usr/bin/protoc
-- Configuring done
WARNING: Target "NeoMathEngine" requests linking to directory "/media/ubuntu/4d5fa4ce-dc9b-4cb0-934c-72533ffc1586/intel_mkl_install/mkl/lib". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
-- Build files have been written to: /media/ubuntu/4d5fa4ce-dc9b-4cb0-934c-72533ffc1586/neoml-master/build1

$ninja

[1/36] Linking CXX shared library NeoMathEngine/src/libNeoMathEngine.so
FAILED: NeoMathEngine/src/libNeoMathEngine.so
: && /usr/bin/clang++ -fPIC -Wl,--no-undefined -shared -Wl,-soname,libNeoMathEngine.so -o NeoMathEngine/src/libNeoMathEngine.so NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/common.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineBlas.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnn3dConv.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnnConv.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnnChannelwiseConv.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnnDropout.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnn.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnnPooling.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnnRleConv.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineDnnTimeConv.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngine.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngineVectorMath.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CrtAllocatedObject.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/DllLoader.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/MathEngineDeviceStackAllocator.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/MathEngineDnnDropout.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/MathEngine.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/MathEngineHostStackAllocator.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/MemoryPool.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/PerformanceCountersCpuLinux.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlas.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineDnn.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMath.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMathMkl.cpp.o NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineDnn3dConv.cpp.o -Wl,-rpath,:::::::::::::::::::::: /usr/lib/libomp.so /usr/lib/x86_64-linux-gnu/libpthread.so -Wl,--start-group -Wl,--end-group -pthread -ldl && :
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngine.cpp.o: in function .omp_outlined.': CpuMathEngine.cpp:(.text+0x251): undefined reference to MKL_Thread_Free_Buffers'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/CpuMathEngine.cpp.o: in function NeoML::CCpuMathEngine::~CCpuMathEngine()': CpuMathEngine.cpp:(.text+0x11ee): undefined reference to MKL_Free_Buffers'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::multiplyMatrixByMatrix(NeoML::CTypedMemoryHandle<float const> const&, int, int, int, NeoML::CTypedMemoryHandle<float const> const&, int, int, NeoML::CTypedMemoryHandle<float> const&, int, int)': CpuX86MathEngineBlasMkl.cpp:(.text+0x3a6): undefined reference to cblas_sgemm'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::multiplyMatrixByMatrixAndAdd(NeoML::CTypedMemoryHandle<float const> const&, int, int, int, NeoML::CTypedMemoryHandle<float const> const&, int, int, NeoML::CTypedMemoryHandle<float> const&, int, int)': CpuX86MathEngineBlasMkl.cpp:(.text+0x6f7): undefined reference to cblas_sgemm'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::multiplyMatrixByTransposedMatrix(NeoML::CTypedMemoryHandle<float const> const&, int, int, int, NeoML::CTypedMemoryHandle<float const> const&, int, int, NeoML::CTypedMemoryHandle<float> const&, int, int)': CpuX86MathEngineBlasMkl.cpp:(.text+0xa05): undefined reference to cblas_sgemm'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::multiplyMatrixByTransposedMatrixAndAdd(float const*, int, int, int, float const*, int, int, float*, int)': CpuX86MathEngineBlasMkl.cpp:(.text+0xaea): undefined reference to cblas_sgemm'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::MultiplySparseMatrixByTransposedMatrix(int, int, int, NeoML::CSparseMatrixDesc const&, NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float> const&)': CpuX86MathEngineBlasMkl.cpp:(.text+0xfbb): undefined reference to mkl_sparse_s_create_csr'
/usr/bin/ld: CpuX86MathEngineBlasMkl.cpp:(.text+0x1133): undefined reference to mkl_sparse_s_mm' /usr/bin/ld: CpuX86MathEngineBlasMkl.cpp:(.text+0x1219): undefined reference to MKL_Simatcopy'
/usr/bin/ld: CpuX86MathEngineBlasMkl.cpp:(.text+0x1225): undefined reference to mkl_sparse_destroy' /usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::MultiplyTransposedMatrixBySparseMatrixAndAdd(int, int, int, NeoML::CTypedMemoryHandle const&, NeoML::CSparseMatrixDesc const&, NeoML::CTypedMemoryHandle const&)':
CpuX86MathEngineBlasMkl.cpp:(.text+0x1844): undefined reference to MKL_Somatcopy' /usr/bin/ld: CpuX86MathEngineBlasMkl.cpp:(.text+0x1894): undefined reference to mkl_sparse_s_create_csr'
/usr/bin/ld: CpuX86MathEngineBlasMkl.cpp:(.text+0x1a82): undefined reference to mkl_sparse_s_mm' /usr/bin/ld: CpuX86MathEngineBlasMkl.cpp:(.text+0x1b74): undefined reference to mkl_sparse_destroy'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::multiplyTransposedMatrixByMatrix(NeoML::CTypedMemoryHandle<float const> const&, int, int, NeoML::CTypedMemoryHandle<float const> const&, int, NeoML::CTypedMemoryHandle<float> const&, int)': CpuX86MathEngineBlasMkl.cpp:(.text+0x1e07): undefined reference to cblas_sgemm'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineBlasMkl.cpp.o: in function NeoML::CCpuMathEngine::multiplyTransposedMatrixByMatrixAndAdd(NeoML::CTypedMemoryHandle<float const> const&, int, int, int, NeoML::CTypedMemoryHandle<float const> const&, int, int, NeoML::CTypedMemoryHandle<float> const&, int, int)': CpuX86MathEngineBlasMkl.cpp:(.text+0x21ff): undefined reference to cblas_sgemm'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMathMkl.cpp.o: in function NeoML::CCpuMathEngine::VectorExp(NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float> const&, int)': CpuX86MathEngineVectorMathMkl.cpp:(.text+0x31e): undefined reference to vsExp'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMathMkl.cpp.o: in function NeoML::CCpuMathEngine::VectorLog(NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float> const&, int)': CpuX86MathEngineVectorMathMkl.cpp:(.text+0x6be): undefined reference to vsLn'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMathMkl.cpp.o: in function NeoML::CCpuMathEngine::VectorMultiplyAndAdd(NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float> const&, int, NeoML::CTypedMemoryHandle<float const> const&)': CpuX86MathEngineVectorMathMkl.cpp:(.text+0xae1): undefined reference to cblas_saxpy'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMathMkl.cpp.o: in function NeoML::CCpuMathEngine::VectorTanh(NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float> const&, int)': CpuX86MathEngineVectorMathMkl.cpp:(.text+0xcd2): undefined reference to vsTanh'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMathMkl.cpp.o: in function NeoML::CCpuMathEngine::VectorPower(float, NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float> const&, int)': CpuX86MathEngineVectorMathMkl.cpp:(.text+0xeb9): undefined reference to vsPowx'
/usr/bin/ld: NeoMathEngine/src/CMakeFiles/NeoMathEngine.dir/CPU/x86/CpuX86MathEngineVectorMathMkl.cpp.o: in function NeoML::CCpuMathEngine::VectorEltwiseLogSumExp(NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float const> const&, NeoML::CTypedMemoryHandle<float> const&, int)': CpuX86MathEngineVectorMathMkl.cpp:(.text+0x1706): undefined reference to vsLog1p'
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

@favorart favorart added the bug Something isn't working label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants