'KOKKOS in Trilinos

I am trying to build the Trilinos library with Epetra, AztecOO,Belos and ML. I'm using cmake-gui 3.23.1 and I downloaded trilinos from here, https://github.com/trilinos/Trilinos. I build the CLAPACK library and added the required path of CLAPACK as entry to the cmake when configuration. After generating the solution I tried to compile it and that's where I got problem. I have lots of errors while all of them refer to KOKKOS and to the same point. I turned of all KOKKOS packages when configuration with cmake and everything was fine. but I want to leave this matter to logic to decide whether any of KOKKOS packages should be built or not. I am attaching one of the errors and I would be grateful if you could help me with this.

Error   C2953   'Kokkos::Impl::FunctorAnalysis<PatternInterface,Policy,Functor>::DeduceTeamShmem<F,
std::enable_if<0<,void>::type>': class template has already been defined    kokkoskernels

and the last line of below code is where all errors refer to.

  template <class F>
  struct DeduceTeamShmem<
      F, typename std::enable_if<0 < sizeof(&F::team_shmem_size)>::type> {
    enum : bool { value = true };

    static size_t team_shmem_size(F const* const f, int team_size) {
      return f->team_shmem_size(team_size);
    }
  };

  template <class F>
  struct DeduceTeamShmem<
      F, typename std::enable_if<0 < sizeof(&F::shmem_size)>::type> {
    enum : bool { value = true };

    static size_t team_shmem_size(F const* const f, int team_size) {
      return f->shmem_size(team_size);
    }
  };


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source