sorry, deactivating the comm-mutex to avoid problems.
This commit was SVN r1878.
Этот коммит содержится в:
родитель
efcf7d9464
Коммит
167e046ee0
@ -515,12 +515,16 @@ int ompi_comm_split ( ompi_communicator_t* comm, int color, int key,
|
||||
int ompi_comm_set_name (ompi_communicator_t *comm, char *name )
|
||||
{
|
||||
|
||||
#ifdef USE_MUTEX_FOR_COMMS
|
||||
OMPI_THREAD_LOCK(&(comm->c_lock));
|
||||
#endif
|
||||
memset(comm->c_name, 0, MPI_MAX_OBJECT_NAME);
|
||||
strncpy(comm->c_name, name, MPI_MAX_OBJECT_NAME);
|
||||
comm->c_name[MPI_MAX_OBJECT_NAME - 1] = 0;
|
||||
comm->c_flags |= OMPI_COMM_NAMEISSET;
|
||||
#ifdef USE_MUTEX_FOR_COMMS
|
||||
OMPI_THREAD_UNLOCK(&(comm->c_lock));
|
||||
#endif
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -50,7 +50,9 @@ extern ompi_pointer_array_t ompi_mpi_communicators;
|
||||
|
||||
struct ompi_communicator_t {
|
||||
ompi_object_t c_base;
|
||||
#ifdef USE_MUTEX_FOR_COMMS
|
||||
ompi_mutex_t c_lock; /* mutex for name and attributes */
|
||||
#endif
|
||||
char c_name[MPI_MAX_OBJECT_NAME];
|
||||
uint32_t c_contextid;
|
||||
int c_my_rank;
|
||||
|
@ -39,8 +39,9 @@ int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length)
|
||||
return OMPI_ERRHANDLER_INVOKE ( comm, MPI_ERR_ARG,
|
||||
FUNC_NAME);
|
||||
}
|
||||
|
||||
#ifdef USE_MUTEX_FOR_COMMS
|
||||
OMPI_THREAD_LOCK(&(comm->c_lock));
|
||||
#endif
|
||||
if ( comm->c_flags & OMPI_COMM_NAMEISSET ) {
|
||||
strncpy ( name, comm->c_name, MPI_MAX_OBJECT_NAME );
|
||||
*length = strlen ( comm->c_name );
|
||||
@ -49,7 +50,9 @@ int MPI_Comm_get_name(MPI_Comm comm, char *name, int *length)
|
||||
memset ( name, 0, MPI_MAX_OBJECT_NAME );
|
||||
*length = 0;
|
||||
}
|
||||
#ifdef USE_MUTEX_FOR_COMMS
|
||||
OMPI_THREAD_UNLOCK(&(comm->c_lock));
|
||||
#endif
|
||||
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user