2004-03-07 01:40:26 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03: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.
|
2004-11-28 23:09:25 +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.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-03-07 01:40:26 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_TOPO_BASE_H
|
|
|
|
#define MCA_TOPO_BASE_H
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "ompi_config.h"
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-04-17 00:54:48 +04:00
|
|
|
#include "mpi.h"
|
2005-07-03 20:22:16 +04:00
|
|
|
#include "opal/class/opal_list.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "mca/topo/topo.h"
|
2004-07-21 02:32:45 +04:00
|
|
|
#include "proc/proc.h"
|
2004-03-08 09:48:24 +03:00
|
|
|
|
2004-03-07 01:40:26 +03:00
|
|
|
/*
|
|
|
|
* All stuff goes in here
|
|
|
|
*/
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_open(void);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_close(void);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_comm_select(struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
struct mca_base_component_t *preferred);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_comm_unselect(struct ompi_communicator_t *comm);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2005-03-27 17:05:23 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_find_available (bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_init_comm (struct ompi_communicator_t *comm);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_get_param (struct ompi_communicator_t *comm, int keyval);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
|
|
|
/*
|
2004-08-02 04:24:22 +04:00
|
|
|
* All the glue functions which we will provide to the users by
|
|
|
|
* default. The component authors need to only write back-end
|
|
|
|
* functions for graph_map() and cart_map() for their topology
|
|
|
|
* components. But they can implement these glue functions if
|
|
|
|
* they want.
|
2004-03-07 01:40:26 +03:00
|
|
|
*/
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_cart_coords (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int rank,
|
|
|
|
int maxdims,
|
|
|
|
int *coords);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_cart_create (mca_topo_base_comm_t *topo_data,
|
2004-08-02 04:24:22 +04:00
|
|
|
int *proc_count,
|
|
|
|
ompi_proc_t **proc_pointers,
|
|
|
|
int *new_rank,
|
|
|
|
int ndims,
|
|
|
|
int *dims,
|
|
|
|
int *periods,
|
|
|
|
bool reorder);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_cartdim_get (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int *ndims);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_cart_get (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int maxdims,
|
|
|
|
int *dims,
|
|
|
|
int *periods,
|
|
|
|
int *coords);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_cart_rank (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int *coords,
|
|
|
|
int *rank);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_cart_shift (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int direction,
|
|
|
|
int disp,
|
|
|
|
int *rank_source,
|
|
|
|
int *rank_dest);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_cart_sub (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int *remain_dims,
|
|
|
|
struct ompi_communicator_t **new_comm);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_graph_create (mca_topo_base_comm_t *topo_data,
|
2004-08-02 04:24:22 +04:00
|
|
|
int *proc_count,
|
|
|
|
ompi_proc_t **proc_pointers,
|
|
|
|
int *new_rank,
|
|
|
|
int nnodes,
|
|
|
|
int *index,
|
|
|
|
int *edges,
|
|
|
|
bool reorder);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_graphdims_get (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int *nodes,
|
|
|
|
int *nedges);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_graph_get (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int maxindex,
|
|
|
|
int maxedges,
|
|
|
|
int *index,
|
|
|
|
int *edges);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_graph_neighbors (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int rank,
|
|
|
|
int maxneighbors,
|
|
|
|
int *neighbors);
|
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC int mca_topo_base_graph_neighbors_count (struct ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
int rank,
|
|
|
|
int *nneighbors);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Globals
|
|
|
|
*/
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC extern int mca_topo_base_output;
|
|
|
|
OMPI_DECLSPEC extern int mca_topo_base_param;
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
OMPI_DECLSPEC extern opal_list_t mca_topo_base_components_available;
|
|
|
|
OMPI_DECLSPEC extern opal_list_t mca_topo_base_components_opened;
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2004-10-22 20:06:05 +04:00
|
|
|
OMPI_DECLSPEC extern bool mca_topo_base_components_opened_valid;
|
|
|
|
OMPI_DECLSPEC extern bool mca_topo_base_components_available_valid;
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-03-07 01:40:26 +03:00
|
|
|
#endif /* MCA_BASE_TOPO_H */
|