1
1

Build always and fix return value

Этот коммит содержится в:
Rolf vandeVaart 2015-08-05 14:09:22 -04:00
родитель ae0de54f6c
Коммит cb84a85d17
2 изменённых файлов: 6 добавлений и 21 удалений

Просмотреть файл

@ -23,9 +23,9 @@
#include "opal/constants.h"
#include "ompi/mpiext/cuda/c/mpiext_cuda_c.h"
/* The fact that this code is configured and compiled means that we have CUDA aware
support. We may expand on this API to return more features in the future. */
/* If CUDA-aware support is configured in, return 1. Otherwise, return 0.
* This API may be extended to return more features in the future. */
int MPIX_Query_cuda_support(void)
{
return OPAL_SUCCESS;
return OPAL_CUDA_SUPPORT;
}

Просмотреть файл

@ -18,25 +18,10 @@ AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[
AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile])
AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile])
OPAL_VAR_SCOPE_PUSH([ompi_mpi_ext_cuda_happy])
# If we don't want CUDA, don't compile this extention
# We compile this whether CUDA support was requested or not. It allows
# us to to detect if we have CUDA support.
AS_IF([test "$ENABLE_cuda" = "1" || \
test "$ENABLE_EXT_ALL" = "1"],
[ompi_mpi_ext_cuda_happy=1],
[ompi_mpi_ext_cuda_happy=0])
AS_IF([test "$ompi_mpi_ext_cuda_happy" = "1" && \
test "$CUDA_SUPPORT" = "1"],
[$1],
[ # Error if the user specifically asked for this extension,
# but we can't build it.
AS_IF([test "$ENABLE_cuda" = "1"],
[AC_MSG_WARN([Requested "cuda" MPI extension, but cannot build it])
AC_MSG_WARN([because cuda support is not enabled.])
AC_MSG_WARN([Try again with --with-cuda])
AC_MSG_ERROR([Cannot continue])])
$2])
OPAL_VAR_SCOPE_POP
[$2])
])