1
1
openmpi/src/mpi/c/comm_set_name.c
Brian Barrett 79a2d8b0a1 * remove a whole bunch of unnecessary #include "runtime/runtime.h"s. I
am sure that some will have to be added back in as functionality is
  added (like for comm_spawn.c), but for now might as well compile
  faster :)

This commit was SVN r2780.
2004-09-20 18:42:01 +00:00

57 строки
1.3 KiB
C

/*
* $HEADER$
*/
#include "ompi_config.h"
#include <string.h>
#include "util/strncpy.h"
#include "include/totalview.h"
#include "mpi.h"
#include "mpi/c/bindings.h"
#include "communicator/communicator.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
#pragma weak MPI_Comm_set_name = PMPI_Comm_set_name
#endif
#if OMPI_PROFILING_DEFINES
#include "mpi/c/profile/defines.h"
#endif
static const char FUNC_NAME[] = "MPI_Comm_set_name";
int MPI_Comm_set_name(MPI_Comm comm, char *name)
{
int rc;
if ( MPI_PARAM_CHECK ) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
if ( MPI_COMM_NULL == comm || ompi_comm_invalid ( comm ) ) {
return OMPI_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_COMM,
FUNC_NAME);
}
if ( NULL == name ) {
return OMPI_ERRHANDLER_INVOKE ( comm, MPI_ERR_ARG,
FUNC_NAME);
}
}
rc = ompi_comm_set_name (comm, name );
/* -- Tracing information for new communicator name -- */
#if 0
/* Force TotalView DLL to take note of this name setting */
++ompi_tv_comm_sequence_number;
#endif
#if OMPI_PROFILING_DEFINES
#include "mpi/c/profile/defines.h"
#endif
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
}