Comments (6)
Hello,
I thnk it i sok to close it. I will try again to compile it and test it and we will how it goes.
from onemkl.
Hello, @csccva, I see that you are trying to build Rocrand backend with Intel oneAPI compiler (icpx), but it works only with open source compiler oneAPI DPC++ Compiler or
AdaptiveCpp Compiler (formerly known as hipSYCL). Could you, please, try to take intel/llvm compiler with hip amd support and build with -DCMAKE_CXX_COMPILER=clang++ (or as alternative use AdaptiveCPP compiler)?
Thank you for pointing out on outdated rocm build info, we will check and update it.
from onemkl.
Hello, @csccva, I see that you are trying to build Rocrand backend with Intel oneAPI compiler (icpx), but it works only with open source compiler oneAPI DPC++ Compiler or AdaptiveCpp Compiler (formerly known as hipSYCL). Could you, please, try to take intel/llvm compiler with hip amd support and build with -DCMAKE_CXX_COMPILER=clang++ (or as alternative use AdaptiveCPP compiler)?
Thank you for pointing out on outdated rocm build info, we will check and update it.
Hello,
Thank you for your reply.
I just tried the same with the clang from the intel llvm project and get similar error (related to pthreads)
cmake .. -DCMAKE_CXX_COMPILER=/scratch/project_462000007/cristian/NEW/apps/sycl_workspace/llvm/build/bin/clang++ -DCMAKE_C_COMPILER=/scratch/project_462000007/cristian/NEW/apps/sycl_workspace/llvm/build/bin/clang -DENABLE_ROCRAND_BACKEND=True -DENABLE_MKLCPU_BACKEND=False -DENABLE_MKLGPU_BACKEND=False -DHIP_TARGETS=gfx90a
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/cmTC_6d7b1.dir/src.cxx.o: in function `main':
src.cxx:(.text+0x25): undefined reference to `pthread_create'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: src.cxx:(.text+0x2e): undefined reference to `pthread_detach'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: src.cxx:(.text+0x37): undefined reference to `pthread_cancel'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: src.cxx:(.text+0x44): undefined reference to `pthread_join'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
....
Building CXX object CMakeFiles/cmTC_371cc.dir/CheckFunctionExists.cxx.o
/scratch/project_462000007/cristian/NEW/apps/sycl_workspace/llvm/build/bin/clang++ -DCHECK_FUNCTION_EXISTS=pthread_create -MD -MT CMakeFiles/cmTC_371cc.dir/CheckFunctionExists.cxx.o -MF CMakeFiles/cmTC_371cc.dir/CheckFunctionExists.cxx.o.d -o CMakeFiles/cmTC_371cc.dir/CheckFunctionExists.cxx.o -c /scratch/project_462000007/cristian/NEW/oneMKL/build/CMakeFiles/CheckLibraryExists/CheckFunctionExists.cxx
Linking CXX executable cmTC_371cc
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_371cc.dir/link.txt --verbose=1
/scratch/project_462000007/cristian/NEW/apps/sycl_workspace/llvm/build/bin/clang++ -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_371cc.dir/CheckFunctionExists.cxx.o -o cmTC_371cc -lpthreads
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lpthreads: No such file or directory
from onemkl.
Though it isn't strictly supported by oneMKL Interface Library, the oneAPI base toolkit with Codeplay's plugins for AMD seems to be able to build the rocRAND backend fine for me.
The CMake for rocRAND does import the threads package as find_package(Threads REQUIRED)
. To me it looks as if you're having the issue at configure time, not when actually trying to build oneMKL Interface library, and that this issue occurs in find_package(Threads REQUIRED)
. Is that right? In which case, this isn't an issue with the rocRAND backend. To confirm this, it might be worth using the --debug-output and --trace cmake flags. Its also worth noting that the linking error appears to come from /usr/x86_64-suse-linux/bin/ld
, not part of the oneAPI base toolkit.
The stupid questions can be worth asking: is pthreads installed? Is it installed somewhere that the compiler would be looking for it? On Ubuntu I think it is at /lib/x86_64-linux-gnu/libpthread.so - I don't know about SUSE.
We're aware that the build documentation could do with improvement. There is an issue for it here. I've started rewriting some of the documentation, although it isn't ready for a PR yet.
from onemkl.
Though it isn't strictly supported by oneMKL Interface Library, the oneAPI base toolkit with Codeplay's plugins for AMD seems to be able to build the rocRAND backend fine for me.
The CMake for rocRAND does import the threads package as
find_package(Threads REQUIRED)
. To me it looks as if you're having the issue at configure time, not when actually trying to build oneMKL Interface library, and that this issue occurs infind_package(Threads REQUIRED)
. Is that right? In which case, this isn't an issue with the rocRAND backend. To confirm this, it might be worth using the --debug-output and --trace cmake flags. Its also worth noting that the linking error appears to come from/usr/x86_64-suse-linux/bin/ld
, not part of the oneAPI base toolkit.The stupid questions can be worth asking: is pthreads installed? Is it installed somewhere that the compiler would be looking for it? On Ubuntu I think it is at /lib/x86_64-linux-gnu/libpthread.so - I don't know about SUSE.
We're aware that the build documentation could do with improvement. There is an issue for it here. I've started rewriting some of the documentation, although it isn't ready for a PR yet.
Hello,
Thank you for your reply. And thank you for trying to improve the documentation. I am trying to compile it on a supercomputer and in general the system libraries are not suitable for hpc, so I have to figure out what modules are needed to be loaded
from onemkl.
Hey @csccva, do you need more help with this issue?
We have updated the build documentation if that helps.
from onemkl.
Related Issues (20)
- mklcpu backend is broken with adaptiveCPP
- [BLAS] Netlib backend fails to compile with AdaptiveCpp HOT 1
- [BLAS] rocBLAS backend test can fail with HSA_STATUS_ERROR_INVALID_PACKET_FORMAT
- [DFT][MKLGPU] Use FWD_ and BWD_STRIDES for MKLGPU 2024.1
- [DFT] Use FWD_ and BWD_STRIDE API
- [BLAS] Wrong namespace usage in BLAS Documentation HOT 5
- [DFT] compute_forward (forward_ip_rr) function template in forward.hpp overrides compute_forward (forward_op_cc) if in and out types are the same HOT 10
- How to setup CMakeLists to use OneMKL on a GPU (Intel Arc/Nvidia sm_89) HOT 9
- Implement CuBlas/MKL int8, float mixed precision gemm_batch
- Examples fail to build with AdaptiveCpp HOT 1
- [DFT][Unit Tests] External Unit test set fails if either USM or Buffer memory is not supported HOT 4
- MKL FP16 GEMM crash on MTL iGPU HOT 4
- [CMake] Project version does not match release tag
- [CMake] oneMKL version macros HOT 1
- PR workflow for selective testing doesn't work as expected
- When trying to use oneMKL with the portBLAS backend there is a check for Intel, AMD or Nvidia GPU. HOT 3
- v0.5 release notes HOT 9
- [Feature Request] Support value_or_pointer arguments for oneMKL functions
- Add prefixes to macros in in config.hpp.in
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onemkl.