Add a CMake option & test for whether MPI is CUDA aware
Created by: mhoemmen
Add a CMake option, and a configure-time test, for whether MPI is CUDA aware (edited 13 Aug 2017 from "MPI supports CUDA"). "MPI is CUDA aware" (edited 13 Aug 2017 from "MPI supports CUDA") means that the MPI implementation knows how to read from and write to CUDA buffers, that is, memory allocated using
cudaMalloc (in Kokkos, a View with memory space
Kokkos::CudaSpace). See #1088 (closed) for justification and discussion.
OpenMPI provides a command-line test as of 1.7.3:
$ ompi_info --parsable --all | grep mpi_built_with_cuda_support:value mca:mpi:base:param:mpi_built_with_cuda_support:value:true
and an API as of 2.0.0: https://www.open-mpi.org/faq/?category=runcuda#mpi-cuda-aware-support
We need a CMake option as well as a test, in order to support cross-compilation. Otherwise, users building on a different platform than where they plan to run would have no way to tell Trilinos that the MPI implementation on which they plan to run is CUDA aware (edited 13 Aug 2017: "supports CUDA").