kokkos
kokkos copied to clipboard
Possible infinite loop with MDRangePolicy when upper bound is smaller than lower bound
Describe the bug
Currently, when using this (e.g. with Kokkos::Serial backend):
Kokkos::parallel_for(
"test_mdrange",
Kokkos::MDRangePolicy<Kokkos::Rank<2>>({ 100, 100 }, { 95, 105 }),
KOKKOS_LAMBDA(const int i, const int j)
{
printf("i,j=%d,%d\n", i, j);
});
it leads to an infinite loop. Probably that MDRangePolicy::init_helper should do a Kokkos::Abort if there is a rank i such that m_upper[i] < m_lower[i]
Please include the following for a minimal reproducer
- Compilers (with versions)
- Kokkos release or commit used (i.e., the sha1 number)
- Platform, architecture and backend
- CMake configure command
- Output from CMake configure command
- Minimum, complete code needed to reproduce the bug
- Command line needed to reproduce the bug
KokkosCore_config.hheader file (generated during the build)- Please provide any additional relevant error logs