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$
14 *
15 * Additional copyrights may follow
16 *
17 * $HEADER$
18 */
19
20 #include "ompi_config.h"
21 #include "ompi/mca/topo/base/base.h"
22 #include "ompi/communicator/communicator.h"
23
24 /*
25 * function - retrieves Cartesian topology information associated with a
26 * communicator
27 *
28 * @param comm communicator with cartesian structure (handle)
29 * @param ndims number of dimensions of the cartesian structure (integer)
30 *
31 * @retval MPI_SUCCESS
32 * @retval MPI_ERR_COMM
33 */
34 int mca_topo_base_cartdim_get(ompi_communicator_t* comm, int *ndims)
35 {
36 *ndims = comm->c_topo->mtc.cart->ndims;
37 return MPI_SUCCESS;
38 }
39
40