aec5cd08bd
WHAT: Merge the PMIx branch into the devel repo, creating a new OPAL “lmix” framework to abstract PMI support for all RTEs. Replace the ORTE daemon-level collectives with a new PMIx server and update the ORTE grpcomm framework to support server-to-server collectives WHY: We’ve had problems dealing with variations in PMI implementations, and need to extend the existing PMI definitions to meet exascale requirements. WHEN: Mon, Aug 25 WHERE: https://github.com/rhc54/ompi-svn-mirror.git Several community members have been working on a refactoring of the current PMI support within OMPI. Although the APIs are common, Slurm and Cray implement a different range of capabilities, and package them differently. For example, Cray provides an integrated PMI-1/2 library, while Slurm separates the two and requires the user to specify the one to be used at runtime. In addition, several bugs in the Slurm implementations have caused problems requiring extra coding. All this has led to a slew of #if’s in the PMI code and bugs when the corner-case logic for one implementation accidentally traps the other. Extending this support to other implementations would have increased this complexity to an unacceptable level. Accordingly, we have: * created a new OPAL “pmix” framework to abstract the PMI support, with separate components for Cray, Slurm PMI-1, and Slurm PMI-2 implementations. * Replaced the current ORTE grpcomm daemon-based collective operation with an integrated PMIx server, and updated the grpcomm APIs to provide more flexible, multi-algorithm support for collective operations. At this time, only the xcast and allgather operations are supported. * Replaced the current global collective id with a signature based on the names of the participating procs. The allows an unlimited number of collectives to be executed by any group of processes, subject to the requirement that only one collective can be active at a time for a unique combination of procs. Note that a proc can be involved in any number of simultaneous collectives - it is the specific combination of procs that is subject to the constraint * removed the prior OMPI/OPAL modex code * added new macros for executing modex send/recv to simplify use of the new APIs. The send macros allow the caller to specify whether or not the BTL supports async modex operations - if so, then the non-blocking “fence” operation is used, if the active PMIx component supports it. Otherwise, the default is a full blocking modex exchange as we currently perform. * retained the current flag that directs us to use a blocking fence operation, but only to retrieve data upon demand This commit was SVN r32570.
112 строки
4.2 KiB
C
112 строки
4.2 KiB
C
/*
|
|
* Copyright (c) 2013 The University of Tennessee and The University
|
|
* of Tennessee Research Foundation. All rights
|
|
* reserved.
|
|
* Copyright (c) 2013 Inria. 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$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#ifndef OPAL_PROC_H
|
|
#define OPAL_PROC_H
|
|
|
|
#include "opal_config.h"
|
|
#include "opal/class/opal_list.h"
|
|
#include "opal/mca/hwloc/hwloc.h"
|
|
#include "opal/types.h"
|
|
#include "opal/dss/dss.h"
|
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
|
#include <arpa/inet.h>
|
|
#endif
|
|
|
|
/**
|
|
* This is a transparent handle proposed to the upper layer as a mean
|
|
* to store whatever information it needs in order to efficiently
|
|
* retrieve the RTE process naming scheme, and get access to the RTE
|
|
* information associated with it. The only direct usage of this type
|
|
* is to be copied from one structure to another, otherwise it should
|
|
* only be used via the accessors defined below.
|
|
*/
|
|
typedef opal_identifier_t opal_process_name_t;
|
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && !defined(WORDS_BIGENDIAN)
|
|
#define OPAL_PROCESS_NAME_NTOH(guid) opal_process_name_ntoh_intr(&(guid))
|
|
static inline __opal_attribute_always_inline__ void
|
|
opal_process_name_ntoh_intr(opal_process_name_t *name)
|
|
{
|
|
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
|
|
#define OPAL_PROCESS_NAME_NTOH(guid)
|
|
#define OPAL_PROCESS_NAME_HTON(guid)
|
|
#endif
|
|
|
|
typedef struct opal_proc_t {
|
|
/** allow proc to be placed on a list */
|
|
opal_list_item_t super;
|
|
/** this process' name */
|
|
opal_process_name_t proc_name;
|
|
/** architecture of this process */
|
|
uint32_t proc_arch;
|
|
/** flags for this proc */
|
|
opal_hwloc_locality_t proc_flags;
|
|
/** Base convertor for the proc described by this process */
|
|
struct opal_convertor_t* proc_convertor;
|
|
/** A pointer to the name of this host - data is
|
|
* actually stored outside of this framework. */
|
|
char* proc_hostname;
|
|
} opal_proc_t;
|
|
OBJ_CLASS_DECLARATION(opal_proc_t);
|
|
|
|
typedef struct opal_process_info_t {
|
|
char *nodename; /**< string name for this node */
|
|
char *job_session_dir; /**< Session directory for job */
|
|
char *proc_session_dir; /**< Session directory for the process */
|
|
int32_t num_local_peers; /**< number of procs from my job that share my node with me */
|
|
int32_t my_local_rank; /**< local rank */
|
|
#if OPAL_HAVE_HWLOC
|
|
char *cpuset; /**< String-representation of bitmap where we are bound */
|
|
#endif
|
|
} opal_process_info_t;
|
|
OPAL_DECLSPEC extern opal_process_info_t opal_process_info;
|
|
|
|
OPAL_DECLSPEC extern opal_proc_t* opal_proc_local_get(void);
|
|
OPAL_DECLSPEC extern int opal_proc_local_set(opal_proc_t* proc);
|
|
OPAL_DECLSPEC extern void opal_proc_set_name(opal_process_name_t *name);
|
|
|
|
/**
|
|
* Compare two processor name and return an integer greater than,
|
|
* equal to, or less than 0, according as the proc_name of proc1
|
|
* is greater than, equal to, or less than the proc_name of proc2.
|
|
*/
|
|
typedef int (*opal_compare_proc_fct_t)(const opal_process_name_t, const opal_process_name_t);
|
|
OPAL_DECLSPEC extern opal_compare_proc_fct_t opal_compare_proc;
|
|
|
|
OPAL_DECLSPEC extern char* (*opal_process_name_print)(const opal_process_name_t);
|
|
OPAL_DECLSPEC extern uint32_t (*opal_process_name_vpid)(const opal_process_name_t);
|
|
OPAL_DECLSPEC extern uint32_t (*opal_process_name_jobid)(const opal_process_name_t);
|
|
|
|
#define OPAL_NAME_PRINT(OPAL_PN) opal_process_name_print(OPAL_PN)
|
|
#define OPAL_PROC_MY_NAME (opal_proc_local_get()->proc_name)
|
|
#define OPAL_PROC_MY_HOSTNAME (opal_proc_local_get()->proc_hostname)
|
|
#define OPAL_NAME_INVALID 0xffffffffffffffff
|
|
|
|
#endif /* OPAL_PROC_H */
|