Skip to content
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

Issue compiling dgemm #3

Open
ashesh2512 opened this issue Dec 27, 2023 · 1 comment
Open

Issue compiling dgemm #3

ashesh2512 opened this issue Dec 27, 2023 · 1 comment

Comments

@ashesh2512
Copy link

ashesh2512 commented Dec 27, 2023

Hello, I have recently been exploring the tutorial to dive into HIP, and ran into the following issue when trying to compile the dgemm example.

make[2]: *** No rule to make target '/opt/rocm-5.3.0/hip/hipblas/lib/libhipblas.so', needed by 'dgemm'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:126: src/CMakeFiles/dgemm.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

I have the following modules loaded -

$ module list

Currently Loaded Modules:
  1) craype/2.7.19      3) libfabric/1.15.2.0   5) cray-libsci/22.12.1.1   7) hsi/default       9) amd/5.3.0          11) cmake/3.23.2
  2) cray-dsmml/0.2.2   4) craype-network-ofi   6) PrgEnv-amd/8.3.3        8) DefApps/default  10) cray-mpich/8.1.23

After some debugging, HIP_PATH is picking up the wrong path, in my case /opt/rocm-5.3.0/hip

After setting HIP_PATH to ROCM_PATH, I now run into an error in the linking stage -

[100%] Linking HIP executable ../dgemm
ld.lld: error: undefined symbol: pthread_create
>>> referenced by thread:126 (/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/thread:126)
>>>               CMakeFiles/dgemm.dir/main.cpp.o:(std::__future_base::_Async_state_impl<std::thread::_Invoker<std::tuple<dgemm_results (*)(matrix<double> const&, matrix<double> const&, int, int, int), matrix<double>, matrix<double>, int, int, int>>, dgemm_results>::_Async_state_impl(std::thread::_Invoker<std::tuple<dgemm_results (*)(matrix<double> const&, matrix<double> const&, int, int, int), matrix<double>, matrix<double>, int, int, int>>&&))
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/dgemm.dir/build.make:144: dgemm] Error 1
make[1]: *** [CMakeFiles/Makefile2:126: src/CMakeFiles/dgemm.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

What could I be still missing? Was it wrong to set the HIP_PATH to ROCM_PATH?

@ashesh2512 ashesh2512 changed the title Issue with linking dgemm hipBLAS issue in dgemm Dec 27, 2023
@ashesh2512 ashesh2512 changed the title hipBLAS issue in dgemm Issue compiling dgemm Dec 27, 2023
@tom-papatheodore
Copy link

I don't have access to any Cray systems, but I can at least comment on the environment variables. HIP_PATH should not be set to ROCM_PATH. ROCM_PATH should point to the main ROCm directory (e.g., /opt/rocm-x.x.x) and HIP_PATH should point to the hip directory within the ROCm directory (e.g., /opt/rocm-x.x.x/hip).

Things might be different when using the amd module on the specific Cray system you're running on. Which system is this out of curiosity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants