@@ -76,12 +76,15 @@ How do I verify that Open MPI has been built with CUDA support?
7676---------------------------------------------------------------
7777
7878Verify that Open MPI has been built with cuda using ``ompi_info ``
79+ with one of the following commands.
7980
8081.. code-block :: sh
8182
8283 # Use ompi_info to verify cuda support in Open MPI
83- shell$ ./ ompi_info | grep " MPI extensions"
84+ shell$ ompi_info | grep " MPI extensions"
8485 MPI extensions: affinity, cuda, pcollreq
86+ shell$ ompi_info --parsable --all | grep mpi_built_with_cuda_support:value
87+ mca:mpi:base:param:mpi_built_with_cuda_support:value:true
8588
8689 /////////////////////////////////////////////////////////////////////////
8790
@@ -190,19 +193,6 @@ Libfabric's API.
190193
191194/////////////////////////////////////////////////////////////////////////
192195
193-
194- How can I tell if Open MPI was built with CUDA support?
195- -------------------------------------------------------
196-
197- Use the ``ompi_info `` command:
198-
199- .. code-block ::
200-
201- shell$ ompi_info --parsable --all | grep mpi_built_with_cuda_support:value
202- mca:mpi:base:param:mpi_built_with_cuda_support:value:true
203-
204- /////////////////////////////////////////////////////////////////////////
205-
206196Can I get additional CUDA debug-level information at run-time?
207197--------------------------------------------------------------
208198
@@ -580,6 +570,8 @@ example of using the CUDA-aware macro and run-time check.
580570
581571 int main(int argc, char *argv[])
582572 {
573+ MPI_Init(&argc, &argv);
574+
583575 printf("Compile time check:\n");
584576 #if defined(MPIX_CUDA_AWARE_SUPPORT) && MPIX_CUDA_AWARE_SUPPORT
585577 printf("This MPI library has CUDA-aware support.\n", MPIX_CUDA_AWARE_SUPPORT);
@@ -589,7 +581,7 @@ example of using the CUDA-aware macro and run-time check.
589581 printf("This MPI library cannot determine if there is CUDA-aware support.\n");
590582 #endif /* MPIX_CUDA_AWARE_SUPPORT */
591583
592- printf("Run time check:n");
584+ printf("Run time check:\ n");
593585 #if defined(MPIX_CUDA_AWARE_SUPPORT)
594586 if (1 == MPIX_Query_cuda_support()) {
595587 printf("This MPI library has CUDA-aware support.\n");
@@ -600,6 +592,8 @@ example of using the CUDA-aware macro and run-time check.
600592 printf("This MPI library cannot determine if there is CUDA-aware support.\n");
601593 #endif /* MPIX_CUDA_AWARE_SUPPORT */
602594
595+ MPI_Finalize();
596+
603597 return 0;
604598 }
605599
0 commit comments