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

Blas1 swap: build errors when enabling openblas and complex_float #1623

Closed
brian-kelley opened this issue Dec 7, 2022 · 2 comments
Closed
Assignees

Comments

@brian-kelley
Copy link
Contributor

brian-kelley commented Dec 7, 2022

@lucbv

On weaver rhel8, with:

source /etc/profile.d/modules.sh
module purge
module load cmake/3.21.2 clang/13.0.0 openblas/0.3.20/gcc/9.3.0 cuda/10.1.243  git 

and kokkos/kokkos-kernels on today's develop, doing:

../kokkos-kernels/cm_generate_makefile.bash \
  --with-devices=Serial \
  --arch=Power9 \
  --compiler=/home/projects/ppc64le-pwr9-nvidia/spack/opt/spack/linux-rhel7-power9le/gcc-7.4.0/llvm-13.0.0-t6hzufjroylzhs7hg3dvmhrrcsvhygzv/bin/clang++ \
  --cxxflags="-O3 -Wall -Wunused-parameter -Wshadow -pedantic -Werror -Wsign-compare -Wtype-limits -Wuninitialized " \
  --cxxstandard=17 \
  --with-scalars='complex_float,double' \
  --with-tpls=blas \
  --user-blas-path=/home/projects/ppc64le-pwr9/spack/opt/spack/linux-rhel7-power9le/gcc-9.3.0/openblas-0.3.20-wt32he2mqdzpqfzdbyhiwaqibx6j6s3l/lib \
  --user-lapack-path=/home/projects/ppc64le-pwr9/spack/opt/spack/linux-rhel7-power9le/gcc-9.3.0/openblas-0.3.20-wt32he2mqdzpqfzdbyhiwaqibx6j6s3l/lib \
  --user-blas-lib=blas \
  --user-lapack-lib=lapack \
  --extra-linker-flags="-lgfortran,-lm" \
  --no-examples

I get this when building blas unit tests:

In file included from /ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/unit_test/backends/Test_Serial_Blas.cpp:5:
In file included from /ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/unit_test/Test_Blas.hpp:28:
In file included from /ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/unit_test/Test_Blas1_swap.hpp:1:
/ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/src/KokkosBlas1_swap.hpp:122:70: error: no member named 'swap' in 'KokkosBlas::Impl::Swap<Kokkos::Serial, Kokkos::View<Kokkos::complex<float> *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, Kokkos::MemoryTraits<Kokkos::Unmanaged>>, Kokkos::View<Kokkos::complex<float> *, Kokkos::LayoutLeft, Kokkos::Device<Kokkos::Serial, Kokkos::HostSpace>, Kokkos::MemoryTraits<Kokkos::Unmanaged>>, true, true>'
    Impl::Swap<execution_space, XVector_Internal, YVector_Internal>::swap(space,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/src/KokkosBlas1_swap.hpp:145:3: note: in instantiation of function template specialization 'KokkosBlas::swap<Kokkos::Serial, Kokkos::View<Kokkos::complex<float> *, Kokkos::Serial>, Kokkos::View<Kokkos::complex<float> *, Kokkos::Serial>>' requested here
  swap(space, x, y);
  ^
/ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/unit_test/Test_Blas1_swap.hpp:28:15: note: in instantiation of function template specialization 'KokkosBlas::swap<Kokkos::View<Kokkos::complex<float> *, Kokkos::Serial>, Kokkos::View<Kokkos::complex<float> *, Kokkos::Serial>>' requested here
  KokkosBlas::swap(X, Y);
              ^
/ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/unit_test/Test_Blas1_swap.hpp:50:15: note: in instantiation of function template specialization 'Test::Impl::test_swap<Kokkos::View<Kokkos::complex<float> *, Kokkos::Serial>>' requested here
  Test::Impl::test_swap<Vector>(0);
              ^
/ascldap/users/bmkelle/weaverMisc/kokkos-kernels/blas/unit_test/Test_Blas1_swap.hpp:83:3: note: in instantiation of function template specialization 'test_swap<Kokkos::complex<float>, Kokkos::Serial>' requested here
  test_swap<Kokkos::complex<float>, TestExecSpace>();
  ^
1 error generated.

It seems that the key combination to reproduce this is host blas enabled + complex_float enabled. It might also fail with complex_double, but I haven't tried this.

@brian-kelley brian-kelley changed the title Blas1 swap: build errors when enabling openblas with clang Blas1 swap: build errors when enabling openblas and complex_float Dec 7, 2022
@lucbv
Copy link
Contributor

lucbv commented Dec 7, 2022

Okay, I will have a look at this, I am guessing the combination was not tested somehow... should be an easy fix though

@ndellingwood
Copy link
Contributor

PR #1637 merged, marking as InDevelop

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

No branches or pull requests

3 participants