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

Examples do not compile due to template deduction error (multi_fem) #1928

Closed
jjwilke opened this issue Dec 5, 2018 · 3 comments
Closed

Examples do not compile due to template deduction error (multi_fem) #1928

jjwilke opened this issue Dec 5, 2018 · 3 comments
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)

Comments

@jjwilke
Copy link

jjwilke commented Dec 5, 2018

The multi_fem examples are broken

/Users/jjwilke/Programs/kokkos/cmake-1924/example/multi_fem/Nonlinear.hpp:349:9: 
error: no matching function for call to 'fill(size_t, int, Kokkos::CrsMatrix<double, Kokkos::OpenMP>::coefficients_type&)'
/Users/jjwilke/Programs/kokkos/cmake-1924/example/multi_fem/LinAlgBLAS.hpp:225:6: 
note:   template argument deduction/substitution failed:
@jjwilke
Copy link
Author

jjwilke commented Dec 5, 2018

The fill function assumes:

template< typename ScalarA ,
          typename ScalarX ,
          class L ,
          class D ,
          class MX >
void fill( const size_t n ,
           const ScalarA & alpha ,
           const View< ScalarX * , L , D , MX > & x )
{
  Impl::Fill< ScalarA , ScalarX , L , D >( n , alpha , x );
}

But the type of x passed in is sometimes

KokkosView<double,exec_space>

which only has 2 template parameters and does not specify layout, etc.

Functions should be updated to (or templated on the view type itself)

template< typename ScalarA ,
          typename ScalarX ,
          typename... Args
         >
void fill( const size_t n ,
           const ScalarA & alpha ,
           const View< ScalarX * , Args...> & x )
{
  Impl::Fill< ScalarA , ScalarX , Args...>( n , alpha , x );
}

to handle views with varying numbers of template parameters.

@jjwilke
Copy link
Author

jjwilke commented Dec 5, 2018

I can't self-assign, apparently? I think perhaps I am not in the kokkos group. This can get assigned to me.

@ndellingwood ndellingwood added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Dec 5, 2018
@ndellingwood ndellingwood added this to the 2019 April milestone Feb 7, 2019
@ndellingwood
Copy link
Contributor

@ibaned I think you fixed this in PR #2181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

3 participants