2004-03-08 07:06:44 +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-08 07:06:44 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
2004-08-28 13:29:06 +04:00
|
|
|
|
2004-10-20 05:03:09 +04:00
|
|
|
#include "ompi_config.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/mca/topo/unity/topo_unity.h"
|
2004-03-08 07:06:44 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/communicator/communicator.h"
|
2004-08-28 13:29:06 +04:00
|
|
|
|
2004-03-08 07:06:44 +03:00
|
|
|
/*
|
|
|
|
* function - mca_topo_unity_graph_map
|
|
|
|
*
|
|
|
|
* @param comm input communicator (handle)
|
|
|
|
* @param nnodes number of graph nodes (integer)
|
|
|
|
* @param index integer array specifying the graph structure
|
|
|
|
* @param edges integer array specifying the graph structure
|
|
|
|
* @param newrank reordered rank of the calling process; 'MPI_UNDEFINED'
|
|
|
|
* if the calling process does not belong to
|
|
|
|
* graph (integer)
|
|
|
|
*
|
|
|
|
* @retval MPI_SUCCESS
|
|
|
|
* @retval MPI_UNDEFINED
|
|
|
|
*/
|
|
|
|
|
2004-04-17 02:01:32 +04:00
|
|
|
int mca_topo_unity_graph_map (MPI_Comm comm,
|
2004-03-08 07:06:44 +03:00
|
|
|
int nnodes,
|
|
|
|
int *index,
|
|
|
|
int *edges,
|
2004-08-28 13:29:06 +04:00
|
|
|
int *newrank)
|
|
|
|
{
|
2004-03-08 07:06:44 +03:00
|
|
|
int myrank;
|
|
|
|
|
2004-08-28 13:29:06 +04:00
|
|
|
myrank = ompi_comm_rank(comm);
|
2004-03-08 07:06:44 +03:00
|
|
|
*newrank =
|
|
|
|
((0 > myrank) || (myrank >= nnodes)) ? MPI_UNDEFINED : myrank;
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
return OMPI_SUCCESS;
|
2004-03-08 07:06:44 +03:00
|
|
|
}
|