Tpetra's Node ctor needs to strip "--kokkos-*" command-line args from Teuchos::GlobalMPISession if it initializes Kokkos
Created by: jjellio
The kokkos programming guide specifies that arguments intended for Kokkos that are prefixed with kokkos, e.g., --kokkos-ndevices, will be removed from the argument list before returning from Kokkos::initialize(argc,argv).
Calling Teuchos::GlobalMPISession(argc,argv) with kokkos prefixed arguments in argv does not preserve this behavior. This seems acceptable, because GlobalMPISession has no knowledge of kokkos and does not promise to initialize Kokkos immediately. But leaving the arguments in argv can break commandline parsing (resulting in std::invalid_argument exceptions)
Perhaps a work around would be a Kokkos static function eat_kokkos_args(argc,argv) that would purge kokkos arguments without performing an initialize. This could work, since Trilinos will initialize Kokkos at some point, but Teuchos::GlobalMPISession should not have Kokkos arguments hard coded into it for removal.... Or, the behavior could change and with no promise of Kokkos arguments being removed. This complicates using Teuchos command line parsing as stated above.
@mhoemmen @crtrott @hcedwar @kokkos @Trilinos/Teuchos