2004-04-21 21:08:11 +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.
|
2014-05-16 22:23:52 +00:00
|
|
|
* Copyright (c) 2004-2013 The University of Tennessee and The University
|
2005-11-05 19:57:48 +00:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-11-28 20:09:25 +00:00
|
|
|
* 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.
|
2014-05-16 22:23:52 +00:00
|
|
|
* Copyright (c) 2012-2013 Inria. All rights reserved.
|
2014-05-13 04:49:23 +00:00
|
|
|
* Copyright (c) 2014 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2004-04-21 21:08:11 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-10-20 01:03:09 +00:00
|
|
|
#include "ompi_config.h"
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "ompi/mca/topo/base/base.h"
|
|
|
|
#include "ompi/communicator/communicator.h"
|
2004-04-21 21:08:11 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* function - Retrieves graph topology information associated with a
|
|
|
|
* communicator
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2004-04-21 21:08:11 +00:00
|
|
|
* @param comm - communicator for group with graph structure (handle)
|
|
|
|
* @param nodes - number of nodes in graph (integer)
|
|
|
|
* @param nedges - number of edges in graph (integer)
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2004-04-21 21:08:11 +00:00
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
* @retval MPI_ERR_TOPOLOGY
|
|
|
|
* @retval MPI_ERR_COMM
|
|
|
|
* @retval MPI_ERR_ARG
|
|
|
|
*/
|
2009-03-12 22:38:14 +00:00
|
|
|
int mca_topo_base_graphdims_get (ompi_communicator_t* comm,
|
2013-07-01 12:40:08 +00:00
|
|
|
int *nodes,
|
|
|
|
int *nedges)
|
|
|
|
{
|
2014-05-13 04:49:23 +00:00
|
|
|
mca_topo_base_comm_graph_2_2_0_t* graph = comm->c_topo->mtc.graph;
|
2004-07-20 22:32:45 +00:00
|
|
|
*nodes = ompi_comm_size(comm);
|
2015-06-23 20:59:57 -07:00
|
|
|
*nedges = graph->index[*nodes -1];
|
2004-04-21 21:08:11 +00:00
|
|
|
|
|
|
|
return MPI_SUCCESS;
|
|
|
|
}
|