Tpetra: Add wrapper for MPI_Comm_test_inter
Created by: mhoemmen
@trilinos/tpetra Story: #748 (closed) Related to: #752 (closed)
Intercommunicators do not allow aliasing send and receive buffers in MPI collectives. The usual communicators are intracommunicators (in_tra_ not in_ter_), which do allow such aliasing (via MPI_IN_PLACE). Thus, it's important to tell whether a given communicator is an intercommunicator, because that lets us skip allocation of temporary buffers and do collectives in place. Thankfully, MPI has a local function that can tell whether a given communicator is an intercommunicator, namely MPI_Comm_test_inter.
Wrap MPI_Comm_test_inter for Tpetra use.