~ubuntu-branches/ubuntu/vivid/mpich/vivid-proposed

« back to all changes in this revision

Viewing changes to src/mpi/comm/comm_split.c

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2014-04-01 20:24:20 UTC
  • mfrom: (5.2.4 sid)
  • Revision ID: package-import@ubuntu.com-20140401202420-t5ey1ia2klt5dkq3
Tags: 3.1-4
* [c3e3398] Disable test_primitives, which is unreliable on some platforms.
            (Closes: #743047)
* [265a699] Add minimal autotest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
#include "mpiimpl.h"
9
9
#include "mpicomm.h"
10
10
 
 
11
/*
 
12
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
 
13
 
 
14
categories:
 
15
    - name        : COMMUNICATOR
 
16
      description : cvars that control communicator construction and operation
 
17
 
 
18
cvars:
 
19
    - name        : MPIR_CVAR_COMM_SPLIT_USE_QSORT
 
20
      category    : COMMUNICATOR
 
21
      type        : boolean
 
22
      default     : true
 
23
      class       : device
 
24
      verbosity   : MPI_T_VERBOSITY_USER_BASIC
 
25
      scope       : MPI_T_SCOPE_ALL_EQ
 
26
      description : >-
 
27
        Use qsort(3) in the implementation of MPI_Comm_split instead of bubble sort.
 
28
 
 
29
=== END_MPI_T_CVAR_INFO_BLOCK ===
 
30
*/
 
31
 
11
32
/* -- Begin Profiling Symbol Block for routine MPI_Comm_split */
12
33
#if defined(HAVE_PRAGMA_WEAK)
13
34
#pragma weak MPI_Comm_split = PMPI_Comm_split
67
88
 
68
89
#if defined(HAVE_QSORT)
69
90
    /* temporary switch for profiling performance differences */
70
 
    if (MPIR_PARAM_COMM_SPLIT_USE_QSORT)
 
91
    if (MPIR_CVAR_COMM_SPLIT_USE_QSORT)
71
92
    {
72
93
        /* qsort isn't a stable sort, so we have to enforce stability by keeping
73
94
         * track of the original indices */
233
254
        if (comm_ptr->rank == 0) {
234
255
            mpi_errno = MPIC_Sendrecv( &new_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, 0,
235
256
                                       &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 
236
 
                                       0, 0, comm_ptr->handle, MPI_STATUS_IGNORE );
 
257
                                       0, 0, comm_ptr->handle, MPI_STATUS_IGNORE, &errflag );
237
258
            if (mpi_errno) { MPIU_ERR_POP( mpi_errno ); }
238
259
            mpi_errno = MPIR_Bcast_impl( &remote_context_id, 1, MPIR_CONTEXT_ID_T_DATATYPE, 0, local_comm_ptr, &errflag );
239
260
            if (mpi_errno) MPIU_ERR_POP(mpi_errno);