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"
|
2004-06-07 19:33:53 +04:00
|
|
|
#include "class/ompi_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
|
|
|
|
int mca_topo_base_open(void);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2004-03-08 03:34:16 +03:00
|
|
|
int mca_topo_base_close(void);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
|
|
|
int mca_topo_base_comm_select(struct ompi_communicator_t *comm,
|
|
|
|
struct mca_base_module_t *preferred);
|
|
|
|
|
|
|
|
int mca_topo_base_comm_unselect(struct ompi_communicator_t *comm);
|
|
|
|
|
|
|
|
int mca_topo_base_find_available (bool *allow_multi_user_threads,
|
|
|
|
bool *have_hidden_threads);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
|
|
|
|
2004-04-17 00:54:48 +04:00
|
|
|
int mca_topo_base_init_comm (MPI_Comm comm);
|
2004-07-21 02:32:45 +04:00
|
|
|
|
2004-04-17 00:54:48 +04:00
|
|
|
int mca_topo_base_get_param (MPI_Comm comm, int keyval);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* All the glue functions which we will provide to the users
|
|
|
|
* by default. The users need to only write back-end functions
|
|
|
|
* for graph_map() and cart_map() for their topology modules.
|
|
|
|
* But they can implement these glue functions if they want.
|
|
|
|
*/
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_cart_coords (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int rank,
|
|
|
|
int maxdims,
|
2004-03-07 01:40:26 +03:00
|
|
|
int *coords);
|
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_cart_create (mca_topo_comm_t *topo_data,
|
|
|
|
int *proc_count,
|
|
|
|
ompi_proc_t **proc_pointers,
|
|
|
|
int *new_rank,
|
2004-03-08 03:34:16 +03:00
|
|
|
int ndims,
|
|
|
|
int *dims,
|
2004-03-08 09:48:24 +03:00
|
|
|
int *periods,
|
2004-07-21 02:32:45 +04:00
|
|
|
bool reorder);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_cartdim_get (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int *ndims);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_cart_get (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int maxdims,
|
|
|
|
int *dims,
|
|
|
|
int *periods,
|
|
|
|
int *coords);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_cart_rank (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int *coords,
|
|
|
|
int *rank);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_cart_shift (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int direction,
|
|
|
|
int disp,
|
|
|
|
int *rank_source,
|
|
|
|
int *rank_dest);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_cart_sub (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int *remain_dims,
|
2004-04-17 00:54:48 +04:00
|
|
|
MPI_Comm *new_comm);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_graph_create (mca_topo_comm_t *topo_data,
|
|
|
|
int *proc_count,
|
|
|
|
ompi_proc_t **proc_pointers,
|
|
|
|
int *new_rank,
|
2004-03-08 03:34:16 +03:00
|
|
|
int nnodes,
|
|
|
|
int *index,
|
2004-03-08 09:48:24 +03:00
|
|
|
int *edges,
|
2004-07-21 02:32:45 +04:00
|
|
|
bool reorder);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_graphdims_get (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int *nodes,
|
2004-03-07 01:40:26 +03:00
|
|
|
int *nedges);
|
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_graph_get (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int maxindex,
|
|
|
|
int maxedges,
|
|
|
|
int *index,
|
|
|
|
int *edges);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_graph_neighbors (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int rank,
|
|
|
|
int maxneighbors,
|
|
|
|
int *neighbors);
|
2004-03-07 01:40:26 +03:00
|
|
|
|
2004-07-21 02:32:45 +04:00
|
|
|
int mca_topo_base_graph_neighbors_count (MPI_Comm comm,
|
2004-03-08 03:34:16 +03:00
|
|
|
int rank,
|
2004-03-07 01:40:26 +03:00
|
|
|
int *nneighbors);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Globals
|
|
|
|
*/
|
|
|
|
extern int mca_topo_base_output;
|
2004-07-21 02:32:45 +04:00
|
|
|
extern int mca_topo_base_param;
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
extern ompi_list_t mca_topo_base_modules_available;
|
2004-07-21 02:32:45 +04:00
|
|
|
extern ompi_list_t mca_topo_base_modules_opened;
|
|
|
|
|
|
|
|
extern bool mca_topo_base_modules_opened_valid;
|
|
|
|
extern bool mca_topo_base_modules_available_valid;
|
2004-03-07 01:40:26 +03:00
|
|
|
|
|
|
|
#endif /* MCA_BASE_TOPO_H */
|