1 /* 2 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 3 * University Research and Technology 4 * Corporation. All rights reserved. 5 * Copyright (c) 2004-2013 The University of Tennessee and The University 6 * of Tennessee Research Foundation. All rights 7 * reserved. 8 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 9 * University of Stuttgart. All rights reserved. 10 * Copyright (c) 2004-2005 The Regents of the University of California. 11 * All rights reserved. 12 * Copyright (c) 2012-2013 Inria. All rights reserved. 13 * Copyright (c) 2015 Research Organization for Information Science 14 * and Technology (RIST). All rights reserved. 15 * $COPYRIGHT$ 16 * 17 * Additional copyrights may follow 18 * 19 * $HEADER$ 20 */ 21 22 #include "ompi_config.h" 23 #include "ompi/mca/topo/base/base.h" 24 #include "ompi/communicator/communicator.h" 25 26 /* 27 * function - mca_topo_base_graph_map 28 * 29 * @param comm input communicator (handle) 30 * @param nnodes number of graph nodes (integer) 31 * @param index integer array specifying the graph structure 32 * @param edges integer array specifying the graph structure 33 * @param newrank reordered rank of the calling process; 'MPI_UNDEFINED' 34 * if the calling process does not belong to 35 * graph (integer) 36 * 37 * @retval MPI_SUCCESS 38 * @retval MPI_UNDEFINED 39 */ 40 41 int mca_topo_base_graph_map(ompi_communicator_t * comm, 42 int nnodes, 43 const int *index, const int *edges, int *newrank) 44 { 45 int myrank; 46 47 myrank = ompi_comm_rank(comm); 48 *newrank = 49 ((0 > myrank) || (myrank >= nnodes)) ? MPI_UNDEFINED : myrank; 50 51 return OMPI_SUCCESS; 52 } 53