GithubHelp home page GithubHelp logo

pthreads not found about onemkl HOT 6 CLOSED

csccva avatar csccva commented on August 19, 2024
pthreads not found

from onemkl.

Comments (6)

csccva avatar csccva commented on August 19, 2024 1

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.

aelizaro avatar aelizaro commented on August 19, 2024

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.

csccva avatar csccva commented on August 19, 2024

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.

hjabird avatar hjabird commented on August 19, 2024

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.

csccva avatar csccva commented on August 19, 2024

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.

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.

Rbiessy avatar Rbiessy commented on August 19, 2024

Hey @csccva, do you need more help with this issue?
We have updated the build documentation if that helps.

from onemkl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.