-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
C-enhancementCategory: an enhancement or bug fixCategory: an enhancement or bug fix
Description
It must enforce a correct calling order for MPI_Init and Kokkos::initialize.
It should also handle special Kokkos arguments:
Another pretty annoying thing that we have to do is to avoid passing
--helpto non-zero ranks, as otherwise Kokkos would print help on all ranks. We do it like this:
// Strip "--help" and "--kokkos-help" from the flags passed to Kokkos if we
// are not on MPI rank 0 to prevent Kokkos from printing the help message
// multiply.
if (comm_rank != 0)
{
auto *help_it = std::find_if(argv, argv + argc, [](std::string const &x) {
return x == "--help" || x == "--kokkos-help";
});
if (help_it != argv + argc)
{
std::swap(*help_it, *(argv + argc - 1));
--argc;
}
}
Kokkos::initialize(argc, argv);Originally posted by @aprokop in #53 (comment)
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: an enhancement or bug fixCategory: an enhancement or bug fix