Skip to content

Commit 7968862

Browse files
authored
Merge pull request #7406 from rhc54/topic/p2
Enable build against PMIx v2.2 without internal PRRTE
2 parents 8eebeee + edaf916 commit 7968862

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

config/ompi_setup_prrte.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
4545
AC_MSG_CHECKING([if RTE support is enabled])
4646
if test "$enable_internal_rte" != "no"; then
4747
AC_MSG_RESULT([yes])
48+
ompi_want_prrte=yes
4849
if test -z $with_libevent || test "$with_libevent" = "internal" || test "$with_libevent" = "yes"; then
4950
opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h"
5051
elif test "$with_libevent" = "external"; then
@@ -96,6 +97,7 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
9697
else
9798
OPAL_SUMMARY_ADD([[Miscellaneous]],[[PRRTE]],[prrte],[no (disabled)])
9899
AC_MSG_RESULT([no (disabled)])
100+
ompi_want_prrte=no
99101
fi
100102

101103
CFLAGS=$opal_prrte_save_CFLAGS

configure.ac

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
2020
# Copyright (c) 2013 Mellanox Technologies, Inc.
2121
# All rights reserved.
22-
# Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
22+
# Copyright (c) 2013-2020 Intel, Inc. All rights reserved.
2323
# Copyright (c) 2014-2017 Research Organization for Information Science
2424
# and Technology (RIST). All rights reserved.
2525
# Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
@@ -1463,8 +1463,7 @@ OPAL_CHECK_LIBNL_SUMMARY
14631463
opal_show_title "Setup PRRTE support"
14641464
14651465
m4_ifdef([project_prrte],
1466-
[OMPI_SETUP_PRRTE
1467-
ompi_want_prrte=yes],
1466+
[OMPI_SETUP_PRRTE],
14681467
[ompi_want_prrte=no])
14691468
AM_CONDITIONAL(OMPI_WANT_PRRTE, test "$ompi_want_prrte" = "yes")
14701469

opal/mca/pmix/base/pmix_base_fns.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
44
* reserved.
5-
* Copyright (c) 2014-2019 Intel, Inc. All rights reserved.
5+
* Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
66
* Copyright (c) 2014-2017 Research Organization for Information Science
77
* and Technology (RIST). All rights reserved.
88
* Copyright (c) 2016 Mellanox Technologies, Inc.
@@ -526,6 +526,7 @@ void opal_pmix_value_load(pmix_value_t *v,
526526
v->data.pinfo->exit_code = kv->data.pinfo.exit_code;
527527
v->data.pinfo->state = opal_pmix_convert_state(kv->data.pinfo.state);
528528
break;
529+
#if PMIX_NUMERIC_VERSION >= 0x00030000
529530
case OPAL_ENVAR:
530531
v->type = PMIX_ENVAR;
531532
PMIX_ENVAR_CONSTRUCT(&v->data.envar);
@@ -537,6 +538,7 @@ void opal_pmix_value_load(pmix_value_t *v,
537538
}
538539
v->data.envar.separator = kv->data.envar.separator;
539540
break;
541+
#endif
540542
default:
541543
/* silence warnings */
542544
break;
@@ -722,6 +724,7 @@ int opal_pmix_value_unload(opal_value_t *kv,
722724
kv->data.pinfo.exit_code = v->data.pinfo->exit_code;
723725
kv->data.pinfo.state = opal_pmix_convert_pstate(v->data.pinfo->state);
724726
break;
727+
#if PMIX_NUMERIC_VERSION >= 0x00030000
725728
case PMIX_ENVAR:
726729
kv->type = OPAL_ENVAR;
727730
OBJ_CONSTRUCT(&kv->data.envar, opal_envar_t);
@@ -733,6 +736,7 @@ int opal_pmix_value_unload(opal_value_t *kv,
733736
}
734737
kv->data.envar.separator = v->data.envar.separator;
735738
break;
739+
#endif
736740
default:
737741
/* silence warnings */
738742
rc = OPAL_ERROR;
@@ -741,6 +745,8 @@ int opal_pmix_value_unload(opal_value_t *kv,
741745
return rc;
742746
}
743747

748+
#if PMIX_NUMERIC_VERSION >= 0x00030000
749+
744750
static void cleanup_cbfunc(pmix_status_t status,
745751
pmix_info_t *info, size_t ninfo,
746752
void *cbdata,
@@ -761,9 +767,11 @@ static void cleanup_cbfunc(pmix_status_t status,
761767
lk->status = status;
762768
OPAL_PMIX_WAKEUP_THREAD(lk);
763769
}
770+
#endif
764771

765772
int opal_pmix_register_cleanup(char *path, bool directory, bool ignore, bool jobscope)
766773
{
774+
#if PMIX_NUMERIC_VERSION >= 0x00030000
767775
opal_pmix_lock_t lk;
768776
pmix_info_t pinfo[3];
769777
size_t n, ninfo=0;
@@ -816,6 +824,9 @@ int opal_pmix_register_cleanup(char *path, bool directory, bool ignore, bool job
816824
PMIX_INFO_DESTRUCT(&pinfo[n]);
817825
}
818826
return ret;
827+
#else
828+
return OPAL_SUCCESS;
829+
#endif
819830
}
820831

821832

@@ -824,7 +835,11 @@ static void dsicon(opal_ds_info_t *p)
824835
{
825836
PMIX_PROC_CONSTRUCT(&p->source);
826837
p->info = NULL;
838+
#if PMIX_NUMERIC_VERSION >= 0x00030000
827839
p->persistence = PMIX_PERSIST_INVALID;
840+
#else
841+
p->persistence = PMIX_PERSIST_INDEF;
842+
#endif
828843
}
829844
OBJ_CLASS_INSTANCE(opal_ds_info_t,
830845
opal_list_item_t,

0 commit comments

Comments
 (0)