Коммит
538d2de860
@ -24,7 +24,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
AC_DEFUN([OMPI_SETUP_PRRTE],[
|
AC_DEFUN([OMPI_SETUP_PRRTE],[
|
||||||
OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static])
|
OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static opal_prrte_extra_libs opal_prrte_extra_ltlibs opal_prrte_extra_ldflags])
|
||||||
|
|
||||||
opal_prrte_save_CFLAGS=$CFLAGS
|
opal_prrte_save_CFLAGS=$CFLAGS
|
||||||
opal_prrte_save_CPPFLAGS=$CPPFLAGS
|
opal_prrte_save_CPPFLAGS=$CPPFLAGS
|
||||||
@ -59,29 +59,29 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
|
|||||||
if test "$enable_internal_rte" != "no"; then
|
if test "$enable_internal_rte" != "no"; then
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
ompi_want_prrte=yes
|
ompi_want_prrte=yes
|
||||||
if test -z $with_libevent || test "$with_libevent" = "internal" || test "$with_libevent" = "yes"; then
|
opal_prrte_extra_libs=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la
|
||||||
opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h"
|
opal_prrte_extra_ltlibs=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la
|
||||||
elif test "$with_libevent" = "external"; then
|
|
||||||
opal_prrte_libevent_arg=""
|
|
||||||
else
|
|
||||||
opal_prrte_libevent_arg="--with-libevent=$with_libevent"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z $with_hwloc || test "$with_hwloc" = "internal" || test "$with_hwloc" = "yes"; then
|
if test "$opal_event_external_support" = "yes"; then
|
||||||
opal_prrte_hwloc_arg="--with-hwloc-header=$OMPI_TOP_SRCDIR/opal/mca/hwloc/hwloc-internal.h"
|
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_event_external_LIBS"
|
||||||
elif test "$with_hwloc" = "external"; then
|
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_event_external_LIBS"
|
||||||
opal_prrte_hwloc_arg=""
|
|
||||||
else
|
|
||||||
opal_prrte_hwloc_arg="--with-hwloc=$with_hwloc"
|
|
||||||
fi
|
fi
|
||||||
|
# specifying --with-libevent-header causes prrte to ignore the with_libevent and with_libevent_libdir options
|
||||||
|
opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h"
|
||||||
|
|
||||||
if test -z $with_pmix || test "$with_pmix" = "internal" || test "$with_pmix" = "yes"; then
|
if test "$opal_hwloc_external_support" = "yes"; then
|
||||||
opal_prrte_pmix_arg="--with-pmix-header=$OMPI_TOP_SRCDIR/opal/mca/pmix/pmix-internal.h"
|
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_hwloc_external_LIBS"
|
||||||
elif test "$with_pmix" = "external"; then
|
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_hwloc_external_LIBS"
|
||||||
opal_prrte_pmix_arg=""
|
|
||||||
else
|
|
||||||
opal_prrte_pmix_arg="--with-pmix=$with_pmix"
|
|
||||||
fi
|
fi
|
||||||
|
# specifying --with-hwloc-header causes prrte to ignore the with_hwloc and with_hwloc_libdir options
|
||||||
|
opal_prrte_hwloc_arg="--with-hwloc-header=$OMPI_TOP_SRCDIR/opal/mca/hwloc/hwloc-internal.h"
|
||||||
|
|
||||||
|
if test "$opal_external_pmix_happy" = "yes"; then
|
||||||
|
opal_prrte_extra_libs="$opal_prrte_extra_libs $opal_pmix_external_LIBS"
|
||||||
|
opal_prrte_extra_ltlibs="$opal_prrte_extra_ltlibs $opal_pmix_external_LIBS"
|
||||||
|
fi
|
||||||
|
# specifying --with-pmix-header causes prrte to ignore the with_pmix and with_pmix_libdir options
|
||||||
|
opal_prrte_pmix_arg="--with-pmix-header=$OMPI_TOP_SRCDIR/opal/mca/pmix/pmix-internal.h"
|
||||||
|
|
||||||
if test -z $enable_prte_prefix_by_default || test "$enable_prte_prefix_by_default" = "yes" ||
|
if test -z $enable_prte_prefix_by_default || test "$enable_prte_prefix_by_default" = "yes" ||
|
||||||
test "$enable_orterun_prefix_given" = "yes"; then
|
test "$enable_orterun_prefix_given" = "yes"; then
|
||||||
@ -102,7 +102,7 @@ AC_DEFUN([OMPI_SETUP_PRRTE],[
|
|||||||
opal_prrte_args="$opal_prrte_args --with-platform=$with_prrte_platform"
|
opal_prrte_args="$opal_prrte_args --with-platform=$with_prrte_platform"
|
||||||
fi
|
fi
|
||||||
# add the extra libs
|
# add the extra libs
|
||||||
opal_prrte_args="$opal_prrte_args --with-prrte-extra-lib=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la --with-prrte-extra-ltlib=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la"
|
opal_prrte_args="$opal_prrte_args --with-prrte-extra-lib=\"$opal_prrte_extra_libs\" --with-prrte-extra-ltlib=\"$opal_prrte_extra_ltlibs\""
|
||||||
|
|
||||||
AC_MSG_CHECKING([final prrte configure args])
|
AC_MSG_CHECKING([final prrte configure args])
|
||||||
AC_MSG_RESULT([$opal_prrte_args])
|
AC_MSG_RESULT([$opal_prrte_args])
|
||||||
|
@ -110,18 +110,14 @@ int opal_pmix_convert_jobid(pmix_nspace_t nspace, opal_jobid_t jobid)
|
|||||||
/* zero out the nspace */
|
/* zero out the nspace */
|
||||||
PMIX_LOAD_NSPACE(nspace, NULL);
|
PMIX_LOAD_NSPACE(nspace, NULL);
|
||||||
|
|
||||||
if (opal_process_info.nativelaunch) {
|
/* cycle across our list of known jobids */
|
||||||
opal_snprintf_jobid(nspace, PMIX_MAX_NSLEN, jobid);
|
OPAL_LIST_FOREACH(nptr, &localnspaces, opal_nptr_t) {
|
||||||
return OPAL_SUCCESS;
|
if (jobid == nptr->jobid) {
|
||||||
} else {
|
PMIX_LOAD_NSPACE(nspace, nptr->nspace);
|
||||||
/* cycle across our list of known jobids */
|
return OPAL_SUCCESS;
|
||||||
OPAL_LIST_FOREACH(nptr, &localnspaces, opal_nptr_t) {
|
|
||||||
if (jobid == nptr->jobid) {
|
|
||||||
PMIX_LOAD_NSPACE(nspace, nptr->nspace);
|
|
||||||
return OPAL_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return OPAL_ERR_NOT_FOUND;
|
return OPAL_ERR_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,29 +125,55 @@ int opal_pmix_convert_nspace(opal_jobid_t *jobid, pmix_nspace_t nspace)
|
|||||||
{
|
{
|
||||||
opal_nptr_t *nptr;
|
opal_nptr_t *nptr;
|
||||||
opal_jobid_t jid;
|
opal_jobid_t jid;
|
||||||
|
uint16_t jobfam;
|
||||||
|
uint32_t hash32, localjob = 0;
|
||||||
|
char *p = NULL;
|
||||||
|
|
||||||
/* set a default */
|
/* set a default */
|
||||||
*jobid = OPAL_JOBID_INVALID;
|
*jobid = OPAL_JOBID_INVALID;
|
||||||
|
|
||||||
if (opal_process_info.nativelaunch) {
|
/* if the nspace is empty, there is nothing more to do */
|
||||||
return opal_convert_string_to_jobid(jobid, nspace);
|
if (0 == strlen(nspace)) {
|
||||||
} else {
|
return OPAL_SUCCESS;
|
||||||
/* cycle across our list of known jobids */
|
|
||||||
OPAL_LIST_FOREACH(nptr, &localnspaces, opal_nptr_t) {
|
|
||||||
if (PMIX_CHECK_NSPACE(nspace, nptr->nspace)) {
|
|
||||||
*jobid = nptr->jobid;
|
|
||||||
return OPAL_SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* if we get here, we don't know this nspace */
|
|
||||||
OPAL_HASH_STR(nspace, jid);
|
|
||||||
jid &= ~(0x8000);
|
|
||||||
*jobid = jid;
|
|
||||||
nptr = OBJ_NEW(opal_nptr_t);
|
|
||||||
nptr->jobid = jid;
|
|
||||||
PMIX_LOAD_NSPACE(nptr->nspace, nspace);
|
|
||||||
opal_list_append(&localnspaces, &nptr->super);
|
|
||||||
}
|
}
|
||||||
|
if (NULL != strstr(nspace, "JOBID_WILDCARD")) {
|
||||||
|
*jobid = OPAL_JOBID_WILDCARD;
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
if (NULL != strstr(nspace, "JOBID_INVALID")) {
|
||||||
|
*jobid = OPAL_JOBID_INVALID;
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* cycle across our list of known jobids */
|
||||||
|
OPAL_LIST_FOREACH(nptr, &localnspaces, opal_nptr_t) {
|
||||||
|
if (PMIX_CHECK_NSPACE(nspace, nptr->nspace)) {
|
||||||
|
*jobid = nptr->jobid;
|
||||||
|
return OPAL_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* if we get here, we don't know this nspace */
|
||||||
|
/* find the "." at the end that indicates the child job */
|
||||||
|
if (NULL != (p = strrchr(nspace, '.'))) {
|
||||||
|
*p = '\0';
|
||||||
|
}
|
||||||
|
OPAL_HASH_STR(nspace, hash32);
|
||||||
|
if (NULL != p) {
|
||||||
|
*p = '.';
|
||||||
|
++p;
|
||||||
|
localjob = strtoul(p, NULL, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* now compress to 16-bits */
|
||||||
|
jobfam = (uint16_t)(((0x0000ffff & (0xffff0000 & hash32) >> 16)) ^ (0x0000ffff & hash32));
|
||||||
|
jid = (0xffff0000 & ((uint32_t)jobfam << 16)) | (0x0000ffff & localjob);
|
||||||
|
*jobid = jid;
|
||||||
|
/* save this jobid/nspace pair */
|
||||||
|
nptr = OBJ_NEW(opal_nptr_t);
|
||||||
|
nptr->jobid = jid;
|
||||||
|
PMIX_LOAD_NSPACE(nptr->nspace, nspace);
|
||||||
|
opal_list_append(&localnspaces, &nptr->super);
|
||||||
|
|
||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,9 +599,11 @@ OPAL_DECLSPEC int opal_pmix_convert_nspace(opal_jobid_t *jobid, pmix_nspace_t ns
|
|||||||
OPAL_DECLSPEC void opal_pmix_setup_nspace_tracker(void);
|
OPAL_DECLSPEC void opal_pmix_setup_nspace_tracker(void);
|
||||||
OPAL_DECLSPEC void opal_pmix_finalize_nspace_tracker(void);
|
OPAL_DECLSPEC void opal_pmix_finalize_nspace_tracker(void);
|
||||||
|
|
||||||
|
/* convert jobid to nspace */
|
||||||
#define OPAL_PMIX_CONVERT_JOBID(n, j) \
|
#define OPAL_PMIX_CONVERT_JOBID(n, j) \
|
||||||
opal_pmix_convert_jobid((n), (j))
|
opal_pmix_convert_jobid((n), (j))
|
||||||
|
|
||||||
|
/* convert vpid to rank */
|
||||||
#define OPAL_PMIX_CONVERT_VPID(r, v) \
|
#define OPAL_PMIX_CONVERT_VPID(r, v) \
|
||||||
do { \
|
do { \
|
||||||
if (OPAL_VPID_WILDCARD == (v)) { \
|
if (OPAL_VPID_WILDCARD == (v)) { \
|
||||||
@ -611,6 +613,7 @@ OPAL_DECLSPEC void opal_pmix_finalize_nspace_tracker(void);
|
|||||||
} \
|
} \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
/* convert opal_process_name_t to pmix_proc_t */
|
||||||
#define OPAL_PMIX_CONVERT_NAME(p, n) \
|
#define OPAL_PMIX_CONVERT_NAME(p, n) \
|
||||||
do { \
|
do { \
|
||||||
OPAL_PMIX_CONVERT_JOBID((p)->nspace, (n)->jobid); \
|
OPAL_PMIX_CONVERT_JOBID((p)->nspace, (n)->jobid); \
|
||||||
@ -618,9 +621,11 @@ OPAL_DECLSPEC void opal_pmix_finalize_nspace_tracker(void);
|
|||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
||||||
|
/* convert nspace to jobid */
|
||||||
#define OPAL_PMIX_CONVERT_NSPACE(r, j, n) \
|
#define OPAL_PMIX_CONVERT_NSPACE(r, j, n) \
|
||||||
(r) = opal_pmix_convert_nspace((j), (n))
|
(r) = opal_pmix_convert_nspace((j), (n))
|
||||||
|
|
||||||
|
/* convert pmix rank to opal vpid */
|
||||||
#define OPAL_PMIX_CONVERT_RANK(v, r) \
|
#define OPAL_PMIX_CONVERT_RANK(v, r) \
|
||||||
do { \
|
do { \
|
||||||
if (PMIX_RANK_WILDCARD == (r)) { \
|
if (PMIX_RANK_WILDCARD == (r)) { \
|
||||||
@ -632,6 +637,7 @@ OPAL_DECLSPEC void opal_pmix_finalize_nspace_tracker(void);
|
|||||||
} \
|
} \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
/* convert pmix_proc_t to opal_process_name_t */
|
||||||
#define OPAL_PMIX_CONVERT_PROCT(r, n, p) \
|
#define OPAL_PMIX_CONVERT_PROCT(r, n, p) \
|
||||||
do { \
|
do { \
|
||||||
OPAL_PMIX_CONVERT_NSPACE((r), &(n)->jobid, (p)->nspace); \
|
OPAL_PMIX_CONVERT_NSPACE((r), &(n)->jobid, (p)->nspace); \
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a18e53138298d61a01fec4471518140304539e8c
|
Subproject commit 8c565209c21f93d11e2156c0d53d73c3f6f9aaab
|
2
prrte
2
prrte
@ -1 +1 @@
|
|||||||
Subproject commit cdea5231171b2fdea11269033de9e265fc7f3a63
|
Subproject commit d879d5669379ffbe093d60b76b46cc9b2aae20e1
|
Загрузка…
x
Ссылка в новой задаче
Block a user