Skip to content

Commit 0be6865

Browse files
opal/mca/threads/argobots: detect Argobots 1.1 at configure time
Signed-off-by: Shintaro Iwasaki <[email protected]>
1 parent f26eb9b commit 0be6865

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

opal/mca/threads/argobots/configure.m4

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# Copyright (c) 2019 Sandia National Laboratories. All rights reserved.
1717
# Copyright (c) 2019 Triad National Security, LLC. All rights
1818
# Reserved.
19+
# Copyright (c) 2021 Argonne National Laboratory. All rights reserved.
1920
# $COPYRIGHT$
2021
#
2122
# Additional copyrights may follow
@@ -38,6 +39,7 @@ AC_DEFUN([OPAL_CONFIG_ARGOBOTS_THREADS],[
3839
opal_check_argo_save_LIBS=$LIBS
3940

4041
opal_argo_happy=yes
42+
opal_argo11_happy=yes
4143
AS_IF([test "$with_argo" = "no"],
4244
[opal_argo_happy=no])
4345

@@ -63,7 +65,15 @@ AC_DEFUN([OPAL_CONFIG_ARGOBOTS_THREADS],[
6365
[],
6466
[opal_argo_happy=no])])
6567

66-
AS_IF([test $opal_argo_happy = yes && test -n "$opal_argo_dir"],
68+
69+
# ABT_unit_get_thread() is a new Argobots 1.1 API.
70+
# It was introduced after static mutex/cond initializers.
71+
AS_IF([test $opal_argo_happy = yes],
72+
[AC_CHECK_FUNCS([ABT_unit_get_thread], [], [opal_argo11_happy="yes"])])
73+
74+
AS_IF([test $opal_argo_happy = yes && test $opal_argo11_happy = no],
75+
[AC_MSG_ERROR([Open MPI requires Argobots 1.1 or newer.])])
76+
AS_IF([test $opal_argo_happy = yes && test $opal_argo11_happy = yes && test -n "$opal_argo_dir"],
6777
[OPAL_ARGO_INCLUDE_PATH="$opal_argo_dir/include/"],
6878
[OPAL_ARGO_INCLUDE_PATH=""])
6979

0 commit comments

Comments
 (0)