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

Commit 0c29de9

Browse files
author
Rolf vandeVaart
committed
This is a combination of 2 commits.
Fix macro return value when not CUDA-aware (cherry picked from commit open-mpi/ompi@0e87478) ompi_ext.m4: allow extensions to have config.h.in Previously, extensions were required to have a config.h for their C bindings. This commit allows them to have a config.h.in, in case their C bindings header file is generated. (cherry picked from commit open-mpi/ompi@6a7d527)
1 parent 9674a0c commit 0c29de9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

config/ompi_ext.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ AC_DEFUN([EXT_PROCESS_COMPONENT],[
456456

457457
AC_MSG_CHECKING([if MPI Extension $component has C bindings])
458458

459-
AS_IF([test ! -e "$test_header"],
459+
AS_IF([test ! -e "$test_header" && test ! -e "$test_header.in"],
460460
[ # There *must* be C bindings
461461
AC_MSG_RESULT([no])
462462
AC_MSG_WARN([C bindings for MPI extensions are required])

ompi/mpiext/cuda/c/mpiext_cuda_c.h renamed to ompi/mpiext/cuda/c/mpiext_cuda_c.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
*
1313
*/
1414

15-
#define MPIX_CUDA_AWARE_SUPPORT 1
15+
#define MPIX_CUDA_AWARE_SUPPORT @MPIX_CUDA_AWARE_SUPPORT@
1616
OMPI_DECLSPEC int MPIX_Query_cuda_support(void);

ompi/mpiext/cuda/configure.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
AC_DEFUN([OMPI_MPIEXT_cuda_CONFIG],[
1818
AC_CONFIG_FILES([ompi/mpiext/cuda/Makefile])
1919
AC_CONFIG_FILES([ompi/mpiext/cuda/c/Makefile])
20+
AC_CONFIG_HEADER([ompi/mpiext/cuda/c/mpiext_cuda_c.h])
21+
22+
AC_DEFINE_UNQUOTED([MPIX_CUDA_AWARE_SUPPORT],[$CUDA_SUPPORT],
23+
[Macro that is set to 1 when CUDA-aware support is configured in and 0 when it is not])
2024

2125
# We compile this whether CUDA support was requested or not. It allows
2226
# us to to detect if we have CUDA support.

0 commit comments

Comments
 (0)