2005-03-14 20:57:21 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00:00
|
|
|
* 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.
|
2005-03-14 20:57:21 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2005-03-14 20:57:21 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
* rmaps framework base functionality.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_MCA_RMAPS_BASE_H
|
|
|
|
#define ORTE_MCA_RMAPS_BASE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
#include "orte_config.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/orte_constants.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2005-07-03 16:22:16 +00:00
|
|
|
#include "opal/class/opal_list.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "orte/mca/ns/ns_types.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "orte/mca/rmaps/rmaps.h"
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global functions for MCA overall collective open and close
|
|
|
|
*/
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Struct to hold data global to the rmaps framework
|
|
|
|
*/
|
|
|
|
typedef struct orte_rmaps_base_t {
|
|
|
|
/** Verbose/debug output stream */
|
|
|
|
int rmaps_output;
|
2006-09-14 21:29:51 +00:00
|
|
|
/** Whether or not the NO_OP module is in use */
|
|
|
|
bool no_op_selected;
|
2005-03-14 20:57:21 +00:00
|
|
|
/** List of opened components */
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_t rmaps_opened;
|
2005-03-14 20:57:21 +00:00
|
|
|
/** Sorted list of available components (highest priority first) */
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_t rmaps_available;
|
2006-10-07 19:50:12 +00:00
|
|
|
/* map by node or not */
|
|
|
|
bool bynode;
|
2006-07-10 14:10:21 +00:00
|
|
|
/** whether or not we allow oversubscription of nodes */
|
|
|
|
bool oversubscribe;
|
2006-10-07 19:50:12 +00:00
|
|
|
/** do we want one ppn if num_procs not specified */
|
|
|
|
bool per_node;
|
2006-10-18 14:01:44 +00:00
|
|
|
/* do we not allow use of the localhost */
|
|
|
|
bool no_use_local;
|
2006-11-17 19:06:10 +00:00
|
|
|
/* display the map after it is computed */
|
|
|
|
bool display_map;
|
2005-03-14 20:57:21 +00:00
|
|
|
} orte_rmaps_base_t;
|
2006-10-05 05:22:22 +00:00
|
|
|
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_rmaps_base_t);
|
2005-03-14 20:57:21 +00:00
|
|
|
/**
|
|
|
|
* Global instance of rmaps-wide framework data
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC extern orte_rmaps_base_t orte_rmaps_base;
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Open the rmaps framework
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_rmaps_base_open(void);
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Select an rmaps component / module
|
|
|
|
*/
|
2006-09-14 21:29:51 +00:00
|
|
|
ORTE_DECLSPEC int orte_rmaps_base_find_available(void);
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Utility routines to get/set vpid mapping for the job
|
|
|
|
*/
|
|
|
|
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_rmaps_base_get_vpid_range(orte_jobid_t jobid,
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_vpid_t *start, orte_vpid_t *range);
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_rmaps_base_set_vpid_range(orte_jobid_t jobid,
|
2005-03-14 20:57:21 +00:00
|
|
|
orte_vpid_t start, orte_vpid_t range);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Close down the rmaps framework
|
|
|
|
*/
|
2006-08-20 15:54:04 +00:00
|
|
|
ORTE_DECLSPEC int orte_rmaps_base_finalize(void);
|
|
|
|
ORTE_DECLSPEC int orte_rmaps_base_close(void);
|
2005-03-14 20:57:21 +00:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|