You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ticket: Regarding issue posted on Kokkos-developers
view.dimiension_0() returning unsigned int, when using long type to index.
Email
Ok that said. It actually does do something incorrect. It seems that somewhere internally an unsigned int is used. 4294967296 gives a view with dimension_0() being reported as 0 while 4294967295 gives back the correct length. Can you open a ticket on github for us?
Thanks
Christian
Test Code:
include
//Kokkos
include <Kokkos_Core.hpp>
include <impl/Kokkos_Timer.hpp>
int main(int argc, char* argv[])
{
typedef long long Int;
typedef double Entry;
typedef Kokkos::OpenMP Node;
typedef Kokkos::View<Entry*, Node> View;
typedef Kokkos::ViewAllocateWithoutInitializing NO_INIT;
Kokkos::initialize(argc, argv);
Node::print_configuration(std::cout, true);
Int size = 67449499257;
View a = View(NO_INIT("a"), size);
std::cout << "Size: " << size << " View.size: " << a.dimension_0() << std::en
dl;
for(Int i = 0; i < size-1; i++)
{
a(i) = 0.0;
}
}//end main()
The text was updated successfully, but these errors were encountered:
crtrott
added
the
Bug
Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
label
Jun 10, 2015
Ticket: Regarding issue posted on Kokkos-developers
view.dimiension_0() returning unsigned int, when using long type to index.
Email
Ok that said. It actually does do something incorrect. It seems that somewhere internally an unsigned int is used. 4294967296 gives a view with dimension_0() being reported as 0 while 4294967295 gives back the correct length. Can you open a ticket on github for us?
Thanks
Christian
Test Code:
include
//Kokkos
include <Kokkos_Core.hpp>
include <impl/Kokkos_Timer.hpp>
int main(int argc, char* argv[])
{
typedef long long Int;
typedef double Entry;
typedef Kokkos::OpenMP Node;
typedef Kokkos::View<Entry*, Node> View;
typedef Kokkos::ViewAllocateWithoutInitializing NO_INIT;
Kokkos::initialize(argc, argv);
Node::print_configuration(std::cout, true);
Int size = 67449499257;
View a = View(NO_INIT("a"), size);
std::cout << "Size: " << size << " View.size: " << a.dimension_0() << std::en
dl;
for(Int i = 0; i < size-1; i++)
{
a(i) = 0.0;
}
}//end main()
The text was updated successfully, but these errors were encountered: