A routine may receive a communicator for which it is unknown what type of topology is associated with it. MPI_TOPO_TEST allows one to answer this question. This is a local call.
MPI_TOPO_TEST(comm, status) IN comm communicator OUT status topology type of comunicator commMPI_Topo_test(MPI_Comm comm, int *status)
MPI_TOPO_TEST(COMM, STATUS, IERROR)INTEGER COMM, STATUS, IERROR
The function MPI_TOPO_TEST returns the type of topology that is assigned to a communicator.
The output value status is one of the following:
MPI_GRAPH graph topology MPI_CART Cartesian topology MPI_UNDEFINED no topology