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 building tester, issues with undefined reference #94

Open
pelahi opened this issue Aug 21, 2023 · 0 comments
Open

Issue building tester, issues with undefined reference #94

pelahi opened this issue Aug 21, 2023 · 0 comments

Comments

@pelahi
Copy link

pelahi commented Aug 21, 2023

Description
I am building slate with HIP/ROCM 5.0.2 and am encountering errors building the tester executables. I configured using cmake and was able build all the libraries but get the following set of undefined references when building tester

/usr/bin/ld: CMakeFiles/tester.dir/matrix_generator.cc.o: in function `slate::BaseMatrix<float>::tileCopyDataLayout(slate::Tile<float>*, slate::Tile<float>*, blas::Layout, bool)':
matrix_generator.cc:(.text._ZN5slate10BaseMatrixIfE18tileCopyDataLayoutEPNS_4TileIfEES4_N4blas6LayoutEb[_ZN5slate10BaseMatrixIfE18tileCopyDataLayoutEPNS_4TileIfEES4_N4blas6LayoutEb]+0x786): undefined reference to `void slate::device::transpose<float>(bool, long, long, float*, long, float*, long, blas::Queue&)'
/usr/bin/ld: matrix_generator.cc:(.text._ZN5slate10BaseMatrixIfE18tileCopyDataLayoutEPNS_4TileIfEES4_N4blas6LayoutEb[_ZN5slate10BaseMatrixIfE18tileCopyDataLayoutEPNS_4TileIfEES4_N4blas6LayoutEb]+0x8a7): undefined reference to `void slate::device::transpose<float>(bool, long, long, float*, long, float*, long, blas::Queue&)'
/usr/bin/ld: CMakeFiles/tester.dir/matrix_generator.cc.o: in function `slate::BaseMatrix<float>::tileLayoutConvert(std::set<std::tuple<long, long>, std::less<std::tuple<long, long> >, std::allocator<std::tuple<long, long> > >&, int, blas::Layout, bool)':
matrix_generator.cc:(.text._ZN5slate10BaseMatrixIfE17tileLayoutConvertERSt3setISt5tupleIJllEESt4lessIS4_ESaIS4_EEiN4blas6LayoutEb[_ZN5slate10BaseMatrixIfE17tileLayoutConvertERSt3setISt5tupleIJllEESt4lessIS4_ESaIS4_EEiN4blas6LayoutEb]+0x831): undefined reference to `void slate::device::transpose_batch<float>(bool, long, float**, long, long, blas::Queue&)'
/usr/bin/ld: matrix_generator.cc:(.text._ZN5slate10BaseMatrixIfE17tileLayoutConvertERSt3setISt5tupleIJllEESt4lessIS4_ESaIS4_EEiN4blas6LayoutEb[_ZN5slate10BaseMatrixIfE17tileLayoutConvertERSt3setISt5tupleIJllEESt4lessIS4_ESaIS4_EEiN4blas6LayoutEb]+0x8c9): undefined reference to `void slate::device::transpose_batch<float>(bool, long, long, float**, long, float**, long, long, blas::Queue&)'
/usr/bin/ld: matrix_generator.cc:(.text._ZN5slate10BaseMatrixIfE17tileLayoutConvertERSt3setISt5tupleIJllEESt4lessIS4_ESaIS4_EEiN4blas6LayoutEb[_ZN5slate10BaseMatrixIfE17tileLayoutConvertERSt3setISt5tupleIJllEESt4lessIS4_ESaIS4_EEiN4blas6LayoutEb]+0x923): undefined reference to `void slate::device::gecopy<float, float>(long, long, float const* const*, long, float**, long, long, blas::Queue&)'
/usr/bin/ld: CMakeFiles/tester.dir/matrix_generator.cc.o: in function `slate::BaseMatrix<double>::tileCopyDataLayout(slate::Tile<double>*, slate::Tile<double>*, blas::Layout, bool)':
matrix_generator.cc:(.text._ZN5slate10BaseMatrixIdE18tileCopyDataLayoutEPNS_4TileIdEES4_N4blas6LayoutEb[_ZN5slate10BaseMatrixIdE18tileCopyDataLayoutEPNS_4TileIdEES4_N4blas6LayoutEb]+0x786): undefined reference to `void slate::device::transpose<double>(bool, long, long, double*, long, double*, long, blas::Queue&)'

This is just a sample of the error messages.

Steps To Reproduce
I am just loading a few modules to provide the dependences, ensure that cmake searchs for them and then just build using make.

Environment

  • d9e94b9

  • How installed:

    • git clone
  • How compiled:

    • CMake: cmake -Dc_api=1 -Dfortran_api=1 -Duse_cmake_find_blas=ON -Duse_cmake_find_lapack=ON -DCMAKE_CXX_COMPILER=CC -DCMAKE_Fortran_COMPILER=ftn -DCMAKE_CXX_FLAGS=-DLAPACK_FORTRAN_ADD_
  • Compiler: g++ (GCC) 12.1.0 20220506 (HPE)

  • BLAS library (e.g., MKL, ESSL, OpenBLAS) & version: openblas/0.3.15

  • LAPACK: netlib-lapack/3.9.1

  • SCALAPACK: netlib-scalapack/2.1.0

  • CUDA / ROCm / oneMKL version (e.g., nvcc --version): hipcc, HIP version: 5.4.22804-474e8620

  • MPI library & version (MPICH, Open MPI, Intel MPI, IBM Spectrum, Cray MPI, etc. Sometimes mpicxx -v gives info.): MPICH Version: 3.4a2 (cray-mpich)

  • OS: cray, sles15sp4

  • Hardware (CPUs, GPUs, nodes): NA as issue is compilation.

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

1 participant