Revert "Fix heterogeneous support"
Per the discussion at http://www.open-mpi.org/community/lists/devel/2014/10/16050.php This reverts commit c9c5d4011bf6ea1ade1a5bd9b6a77f02157dc774.
Этот коммит содержится в:
родитель
8acadb279f
Коммит
b5aea782ce
@ -107,7 +107,6 @@ int ompi_proc_init(void)
|
|||||||
OMPI_CAST_RTE_NAME(&proc->super.proc_name)->vpid = i;
|
OMPI_CAST_RTE_NAME(&proc->super.proc_name)->vpid = i;
|
||||||
|
|
||||||
if (i == OMPI_PROC_MY_NAME->vpid) {
|
if (i == OMPI_PROC_MY_NAME->vpid) {
|
||||||
opal_value_t kv;
|
|
||||||
ompi_proc_local_proc = proc;
|
ompi_proc_local_proc = proc;
|
||||||
proc->super.proc_flags = OPAL_PROC_ALL_LOCAL;
|
proc->super.proc_flags = OPAL_PROC_ALL_LOCAL;
|
||||||
proc->super.proc_hostname = strdup(ompi_process_info.nodename);
|
proc->super.proc_hostname = strdup(ompi_process_info.nodename);
|
||||||
@ -116,13 +115,8 @@ int ompi_proc_init(void)
|
|||||||
opal_proc_local_set(&proc->super);
|
opal_proc_local_set(&proc->super);
|
||||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
||||||
/* add our arch to the modex */
|
/* add our arch to the modex */
|
||||||
OBJ_CONSTRUCT(&kv, opal_value_t);
|
OPAL_MODEX_SEND_STRING(ret, PMIX_SYNC_REQD, PMIX_REMOTE, OPAL_DSTORE_ARCH,
|
||||||
kv.key = strdup(OPAL_DSTORE_ARCH);
|
&proc->super.proc_arch, OPAL_UINT32);
|
||||||
kv.type = OPAL_UINT32;
|
|
||||||
kv.data.uint32 = opal_local_arch;
|
|
||||||
ret = opal_pmix.put(PMIX_REMOTE, &kv);
|
|
||||||
OBJ_DESTRUCT(&kv);
|
|
||||||
|
|
||||||
if (OPAL_SUCCESS != ret) {
|
if (OPAL_SUCCESS != ret) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "opal/dss/dss.h"
|
#include "opal/dss/dss.h"
|
||||||
|
|
||||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
||||||
#include "opal/types.h"
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,11 +37,22 @@
|
|||||||
typedef opal_identifier_t opal_process_name_t;
|
typedef opal_identifier_t opal_process_name_t;
|
||||||
|
|
||||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && !defined(WORDS_BIGENDIAN)
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && !defined(WORDS_BIGENDIAN)
|
||||||
#define OPAL_PROCESS_NAME_NTOH(guid) \
|
#define OPAL_PROCESS_NAME_NTOH(guid) opal_process_name_ntoh_intr(&(guid))
|
||||||
guid = ntoh64(guid)
|
static inline __opal_attribute_always_inline__ void
|
||||||
|
opal_process_name_ntoh_intr(opal_process_name_t *name)
|
||||||
#define OPAL_PROCESS_NAME_HTON(guid) \
|
{
|
||||||
guid = hton64(guid)
|
uint32_t * w = (uint32_t *)name;
|
||||||
|
w[0] = ntohl(w[0]);
|
||||||
|
w[1] = ntohl(w[1]);
|
||||||
|
}
|
||||||
|
#define OPAL_PROCESS_NAME_HTON(guid) opal_process_name_hton_intr(&(guid))
|
||||||
|
static inline __opal_attribute_always_inline__ void
|
||||||
|
opal_process_name_hton_intr(opal_process_name_t *name)
|
||||||
|
{
|
||||||
|
uint32_t * w = (uint32_t *)name;
|
||||||
|
w[0] = htonl(w[0]);
|
||||||
|
w[1] = htonl(w[1]);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#define OPAL_PROCESS_NAME_NTOH(guid)
|
#define OPAL_PROCESS_NAME_NTOH(guid)
|
||||||
#define OPAL_PROCESS_NAME_HTON(guid)
|
#define OPAL_PROCESS_NAME_HTON(guid)
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
* Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2014 Research Organization for Information Science
|
|
||||||
* and Technology (RIST). All rights reserved.
|
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -85,17 +83,17 @@ typedef uint32_t orte_vpid_t;
|
|||||||
#define ORTE_VPID_MAX UINT32_MAX-2
|
#define ORTE_VPID_MAX UINT32_MAX-2
|
||||||
#define ORTE_VPID_MIN 0
|
#define ORTE_VPID_MIN 0
|
||||||
|
|
||||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && !defined(WORDS_BIGENDIAN)
|
#define ORTE_PROCESS_NAME_HTON(n) \
|
||||||
#define ORTE_PROCESS_NAME_HTON(n) \
|
do { \
|
||||||
OPAL_PROCESS_NAME_HTON(*(opal_process_name_t *)&(n))
|
n.jobid = htonl(n.jobid); \
|
||||||
|
n.vpid = htonl(n.vpid); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#define ORTE_PROCESS_NAME_NTOH(n) \
|
#define ORTE_PROCESS_NAME_NTOH(n) \
|
||||||
OPAL_PROCESS_NAME_NTOH(*(opal_process_name_t *)&(n))
|
do { \
|
||||||
#else
|
n.jobid = ntohl(n.jobid); \
|
||||||
#define ORTE_PROCESS_NAME_HTON(n)
|
n.vpid = ntohl(n.vpid); \
|
||||||
|
} while (0)
|
||||||
#define ORTE_PROCESS_NAME_NTOH(n)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ORTE_NAME_ARGS(n) \
|
#define ORTE_NAME_ARGS(n) \
|
||||||
(unsigned long) ((NULL == n) ? (unsigned long)ORTE_JOBID_INVALID : (unsigned long)(n)->jobid), \
|
(unsigned long) ((NULL == n) ? (unsigned long)ORTE_JOBID_INVALID : (unsigned long)(n)->jobid), \
|
||||||
@ -117,23 +115,11 @@ typedef uint32_t orte_vpid_t;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* define the process name structure
|
* define the process name structure
|
||||||
* the OPAL layer sees an orte_process_name_t as an opal_process_name_t aka uint64_t
|
|
||||||
* if heterogeneous is supported, when converting this uint64_t to
|
|
||||||
* an endian neutral format, vpid and jobid will be swapped.
|
|
||||||
* consequently, the orte_process_name_t struct must have different definitions
|
|
||||||
* (swap jobid and vpid) on little and big endian arch.
|
|
||||||
*/
|
*/
|
||||||
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && !defined(WORDS_BIGENDIAN)
|
|
||||||
struct orte_process_name_t {
|
|
||||||
orte_vpid_t vpid; /**< Process id - equivalent to rank */
|
|
||||||
orte_jobid_t jobid; /**< Job number */
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
struct orte_process_name_t {
|
struct orte_process_name_t {
|
||||||
orte_jobid_t jobid; /**< Job number */
|
orte_jobid_t jobid; /**< Job number */
|
||||||
orte_vpid_t vpid; /**< Process id - equivalent to rank */
|
orte_vpid_t vpid; /**< Process id - equivalent to rank */
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
typedef struct orte_process_name_t orte_process_name_t;
|
typedef struct orte_process_name_t orte_process_name_t;
|
||||||
|
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user