1
1
Ralph Castain 6310361532 At long last, the fabled revision to the affinity system has arrived. A more detailed explanation of how this all works will be presented here:
https://svn.open-mpi.org/trac/ompi/wiki/ProcessPlacement

The wiki page is incomplete at the moment, but I hope to complete it over the next few days. I will provide updates on the devel list. As the wiki page states, the default and most commonly used options remain unchanged (except as noted below). New, esoteric and complex options have been added, but unless you are a true masochist, you are unlikely to use many of them beyond perhaps an initial curiosity-motivated experimentation.

In a nutshell, this commit revamps the map/rank/bind procedure to take into account topology info on the compute nodes. I have, for the most part, preserved the default behaviors, with three notable exceptions:

1. I have at long last bowed my head in submission to the system admin's of managed clusters. For years, they have complained about our default of allowing users to oversubscribe nodes - i.e., to run more processes on a node than allocated slots. Accordingly, I have modified the default behavior: if you are running off of hostfile/dash-host allocated nodes, then the default is to allow oversubscription. If you are running off of RM-allocated nodes, then the default is to NOT allow oversubscription. Flags to override these behaviors are provided, so this only affects the default behavior.

2. both cpus/rank and stride have been removed. The latter was demanded by those who didn't understand the purpose behind it - and I agreed as the users who requested it are no longer using it. The former was removed temporarily pending implementation.

3. vm launch is now the sole method for starting OMPI. It was just too darned hard to maintain multiple launch procedures - maybe someday, provided someone can demonstrate a reason to do so.

As Jeff stated, it is impossible to fully test a change of this size. I have tested it on Linux and Mac, covering all the default and simple options, singletons, and comm_spawn. That said, I'm sure others will find problems, so I'll be watching MTT results until this stabilizes.

This commit was SVN r25476.
2011-11-15 03:40:11 +00:00

131 строка
5.4 KiB
C

/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file:
*/
#ifndef MCA_GRPCOMM_BASE_H
#define MCA_GRPCOMM_BASE_H
/*
* includes
*/
#include "orte_config.h"
#include "opal/class/opal_list.h"
#include "opal/mca/mca.h"
#include "opal/threads/mutex.h"
#include "opal/threads/condition.h"
#include "opal/mca/hwloc/hwloc.h"
#include "orte/mca/odls/odls_types.h"
#include "orte/mca/grpcomm/grpcomm.h"
/*
* Global functions for MCA overall collective open and close
*/
BEGIN_C_DECLS
/*
* function definitions
*/
ORTE_DECLSPEC int orte_grpcomm_base_open(void);
ORTE_DECLSPEC int orte_grpcomm_base_select(void);
ORTE_DECLSPEC int orte_grpcomm_base_close(void);
/* daemon collective function */
typedef void (*orte_grpcomm_daemon_collective_fn_t)(orte_process_name_t *sender,
opal_buffer_t *data);
/*
* globals that might be needed
*/
typedef struct {
int output;
bool selected;
opal_list_t components_available;
orte_grpcomm_base_component_t selected_component;
orte_grpcomm_daemon_collective_fn_t daemon_coll;
#if OPAL_HAVE_HWLOC
hwloc_cpuset_t working_cpuset;
#endif
} orte_grpcomm_base_t;
ORTE_DECLSPEC extern orte_grpcomm_base_t orte_grpcomm_base;
/* structure for tracking collective operations */
typedef struct {
opal_object_t super;
opal_mutex_t lock;
opal_condition_t cond;
orte_vpid_t recvd;
opal_buffer_t results;
} orte_grpcomm_collective_t;
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_grpcomm_collective_t);
/*
* Base functions
*/
ORTE_DECLSPEC int orte_grpcomm_base_allgather_list(opal_list_t *names,
opal_buffer_t *sbuf,
opal_buffer_t *rbuf);
ORTE_DECLSPEC int orte_grpcomm_base_set_proc_attr(const char *attr_name,
const void *data,
size_t size);
ORTE_DECLSPEC int orte_grpcomm_base_get_proc_attr(const orte_process_name_t proc,
const char * attribute_name, void **val,
size_t *size);
ORTE_DECLSPEC int orte_grpcomm_base_modex_unpack( opal_buffer_t* rbuf);
ORTE_DECLSPEC int orte_grpcomm_base_full_modex(opal_list_t *procs);
ORTE_DECLSPEC int orte_grpcomm_base_purge_proc_attrs(void);
ORTE_DECLSPEC int orte_grpcomm_base_modex_init(void);
ORTE_DECLSPEC void orte_grpcomm_base_modex_finalize(void);
ORTE_DECLSPEC int orte_grpcomm_base_pack_modex_entries(opal_buffer_t *buf);
ORTE_DECLSPEC int orte_grpcomm_base_update_modex_entries(orte_process_name_t *proc_name,
opal_buffer_t *rbuf);
ORTE_DECLSPEC int orte_grpcomm_base_load_modex_data(orte_process_name_t *proc, char *attribute_name,
void *data, int num_bytes);
/* app functions */
ORTE_DECLSPEC int orte_grpcomm_base_app_barrier(orte_process_name_t *recipient,
orte_grpcomm_collective_t *coll);
ORTE_DECLSPEC int orte_grpcomm_base_app_allgather(orte_process_name_t *recipient,
orte_grpcomm_collective_t *coll,
opal_buffer_t *sbuf,
opal_buffer_t *rbuf);
ORTE_DECLSPEC int orte_grpcomm_base_app_pack_xcast(orte_daemon_cmd_flag_t cmd,
orte_jobid_t job,
opal_buffer_t *buffer,
opal_buffer_t *message,
orte_rml_tag_t tag);
/* Tuned collectives */
ORTE_DECLSPEC void orte_grpcomm_base_coll_recv(int status, orte_process_name_t* sender,
opal_buffer_t* buffer, orte_rml_tag_t tag,
void* cbdata);
ORTE_DECLSPEC int orte_grpcomm_base_allgather(opal_buffer_t *sendbuf, opal_buffer_t *recvbuf, int32_t num_entries,
orte_jobid_t jobid, orte_vpid_t np, orte_vpid_t *vpids);
ORTE_DECLSPEC void orte_grpcomm_base_daemon_coll_recv(int status, orte_process_name_t* sender,
opal_buffer_t* buffer, orte_rml_tag_t tag,
void* cbdata);
ORTE_DECLSPEC void orte_grpcomm_base_daemon_collective(orte_process_name_t *sender,
opal_buffer_t *data);
END_C_DECLS
#endif