| 62 | |
| 63 | |
| 64 | bool comm_isMpiGpuAware() { |
| 65 | |
| 66 | /// @todo these checks may be OpenMPI specific, so that |
| 67 | /// non-OpenMPI MPI compilers are always dismissed as |
| 68 | /// not being CUDA-aware. Check e.g. MPICH method! |
| 69 | |
| 70 | // definitely not GPU-aware if compiler declares it is not |
| 71 | #if defined(MPIX_CUDA_AWARE_SUPPORT) && ! MPIX_CUDA_AWARE_SUPPORT |
| 72 | return false; |
| 73 | #endif |
| 74 | |
| 75 | // check CUDA-awareness at run-time if we know it's principally supported |
| 76 | #if defined(MPIX_CUDA_AWARE_SUPPORT) |
| 77 | return (bool) MPIX_Query_cuda_support(); |
| 78 | #endif |
| 79 | |
| 80 | // if we can't ascertain CUDA-awareness, just assume no to avoid seg-fault |
| 81 | return false; |
| 82 | } |
| 83 | |
| 84 | |
| 85 | bool comm_isInit() { |
no outgoing calls
no test coverage detected