2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2008-05-06 22:08:45 +04:00
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* 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.
|
2005-03-14 23:57:21 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
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 07:40:11 +04:00
|
|
|
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* The Open RTE Resource MAPping Subsystem (RMAPS)
|
|
|
|
*
|
|
|
|
* The resource mapping subsystem is responsible for mapping processes
|
|
|
|
* to specific nodes/cpus within a given job. In many systems, this
|
|
|
|
* functionality will not be supported - the system will map processes
|
|
|
|
* wherever it chooses and does not allow the user to specify the
|
|
|
|
* mapping. RMAPS components, therefore, provide services for those
|
|
|
|
* systems that do permit such mappings.
|
|
|
|
*
|
|
|
|
* RMAPS checks the MCA parameters to see if a mapping algorithm has
|
|
|
|
* been specified. If the user selected a mapping algorithm, the
|
|
|
|
* indicated RMAPS component will take information from the registry
|
|
|
|
* to determine the number of applications/processes to be run, and
|
|
|
|
* the identified resources that have been allocated to this job. The
|
|
|
|
* selected RMAP component will then assign processes to resources
|
|
|
|
* according to its algorithm, with the results stored on the
|
|
|
|
* appropriate job segment - the assigned nodename for each process is
|
|
|
|
* stored in that respective process' container on the segment.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_MCA_RMAPS_H
|
|
|
|
#define ORTE_MCA_RMAPS_H
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "orte/types.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
#include "orte/runtime/orte_globals.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
#include "orte/mca/rmaps/rmaps_types.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2007-10-26 17:40:38 +04:00
|
|
|
BEGIN_C_DECLS
|
2007-10-26 13:54:42 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/*
|
|
|
|
* rmaps module functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2008-02-28 04:57:57 +03:00
|
|
|
* Public API
|
2005-03-14 23:57:21 +03:00
|
|
|
*/
|
2008-02-28 04:57:57 +03:00
|
|
|
typedef int (*orte_rmaps_base_API_map_fn_t)(orte_job_t *jdata);
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
/* global structure for accessing RMAPS API's */
|
|
|
|
typedef struct {
|
|
|
|
orte_rmaps_base_API_map_fn_t map_job;
|
|
|
|
} orte_rmaps_t;
|
|
|
|
|
|
|
|
ORTE_DECLSPEC extern orte_rmaps_t orte_rmaps;
|
2006-10-07 19:45:24 +04:00
|
|
|
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/**
|
2008-02-28 04:57:57 +03:00
|
|
|
* RMAPS module functions - these are not accessible to the outside world,
|
|
|
|
* but are defined here by convention
|
|
|
|
*/
|
|
|
|
typedef int (*orte_rmaps_base_module_map_fn_t)(orte_job_t *jdata);
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
/*
|
2006-09-15 01:29:51 +04:00
|
|
|
* rmaps module version 1.3.0
|
2005-03-14 23:57:21 +03:00
|
|
|
*/
|
2006-09-15 01:29:51 +04:00
|
|
|
struct orte_rmaps_base_module_1_3_0_t {
|
2006-10-07 19:45:24 +04:00
|
|
|
/** Mapping function pointer */
|
|
|
|
orte_rmaps_base_module_map_fn_t map_job;
|
2005-03-14 23:57:21 +03:00
|
|
|
};
|
|
|
|
/** Convenience typedef */
|
2006-09-15 01:29:51 +04:00
|
|
|
typedef struct orte_rmaps_base_module_1_3_0_t orte_rmaps_base_module_1_3_0_t;
|
2005-03-14 23:57:21 +03:00
|
|
|
/** Convenience typedef */
|
2006-09-15 01:29:51 +04:00
|
|
|
typedef orte_rmaps_base_module_1_3_0_t orte_rmaps_base_module_t;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* rmaps component
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2006-09-15 01:29:51 +04:00
|
|
|
* rmaps component version 1.3.0
|
2005-03-14 23:57:21 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
struct orte_rmaps_base_component_2_0_0_t {
|
2005-03-14 23:57:21 +03:00
|
|
|
/** Base MCA structure */
|
2008-05-06 22:08:45 +04:00
|
|
|
mca_base_component_t base_version;
|
2005-03-14 23:57:21 +03:00
|
|
|
/** Base MCA data */
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_base_component_data_t base_data;
|
2005-03-14 23:57:21 +03:00
|
|
|
};
|
|
|
|
/** Convenience typedef */
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct orte_rmaps_base_component_2_0_0_t orte_rmaps_base_component_2_0_0_t;
|
2005-03-14 23:57:21 +03:00
|
|
|
/** Convenience typedef */
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef orte_rmaps_base_component_2_0_0_t orte_rmaps_base_component_t;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
|
2007-10-26 17:40:38 +04:00
|
|
|
END_C_DECLS
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2007-10-26 17:40:38 +04:00
|
|
|
#endif
|