Skip to content

Commit a746bca

Browse files
committed
Fix configure check when testing for CUDA support in UCC.
The first argument for AC_LANG_PROGRAM is missing an additional layer of braces, while the second argument defines a main which is automatically added by AC_LANG_PROGRAM. This fails the test with NVHPC and other Clang-based compilers, and might produce unexpected results with other compilers. To fix this, apply proper syntax to the ucc subconfigure. Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
1 parent 7969166 commit a746bca

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

mpich2/src/mpid/common/ucc/subconfigure.m4

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ AS_IF([test -n "${GPU_SUPPORT}" -a "x${GPU_SUPPORT}" = "xCUDA" && test -n "${wit
2424
ucc_info_defs=$(${ucc_info_path} -b)
2525
AC_LANG_PUSH([C])
2626
AC_COMPILE_IFELSE( [AC_LANG_PROGRAM(
27-
[${ucc_info_defs}],
27+
[[${ucc_info_defs}]],
2828
[[
29-
int main() {
30-
#if !defined(HAVE_CUDA) || HAVE_CUDA != 1
31-
#error macro not defined
32-
#endif
33-
return 0;
34-
}
29+
#if !defined(HAVE_CUDA) || HAVE_CUDA != 1
30+
#error macro not defined
31+
#endif
32+
return 0;
3533
]]
3634
)
3735
],[

0 commit comments

Comments
 (0)