Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit c49a60d

Browse files
committed
Merge pull request #470 from rolfv/pr/fix-mpiext-cuda-2.x
Minor fixes to CUDA extensions
2 parents ce69868 + cbbdd30 commit c49a60d

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

ompi/mpiext/cuda/c/mpiext_cuda.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
#include "opal/constants.h"
2424
#include "ompi/mpiext/cuda/c/mpiext_cuda_c.h"
2525

26-
/* The fact that this code is configured and compiled means that we have CUDA aware
27-
support. We may expand on this API to return more features in the future. */
26+
/* If CUDA-aware support is configured in, return 1. Otherwise, return 0.
27+
* This API may be extended to return more features in the future. */
2828
int MPIX_Query_cuda_support(void)
2929
{
30-
return OPAL_SUCCESS;
30+
return OPAL_CUDA_SUPPORT;
3131
}

ompi/mpiext/cuda/configure.m4

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,10 @@ AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[
1818
AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile])
1919
AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile])
2020

21-
OPAL_VAR_SCOPE_PUSH([ompi_mpi_ext_cuda_happy])
22-
23-
# If we don't want CUDA, don't compile this extention
21+
# We compile this whether CUDA support was requested or not. It allows
22+
# us to to detect if we have CUDA support.
2423
AS_IF([test "$ENABLE_cuda" = "1" || \
2524
test "$ENABLE_EXT_ALL" = "1"],
26-
[ompi_mpi_ext_cuda_happy=1],
27-
[ompi_mpi_ext_cuda_happy=0])
28-
29-
AS_IF([test "$ompi_mpi_ext_cuda_happy" = "1" && \
30-
test "$CUDA_SUPPORT" = "1"],
3125
[$1],
32-
[ # Error if the user specifically asked for this extension,
33-
# but we can't build it.
34-
AS_IF([test "$ENABLE_cuda" = "1"],
35-
[AC_MSG_WARN([Requested "cuda" MPI extension, but cannot build it])
36-
AC_MSG_WARN([because cuda support is not enabled.])
37-
AC_MSG_WARN([Try again with --with-cuda])
38-
AC_MSG_ERROR([Cannot continue])])
39-
$2])
40-
41-
OPAL_VAR_SCOPE_POP
26+
[$2])
4227
])

0 commit comments

Comments
 (0)