Changeset 5675

Show
Ignore:
Timestamp:
11/03/09 13:26:50 (3 weeks ago)
Author:
goodell
Message:

Fixes for MPI_Reduce_local and the reduce_local test.

Anthony noticed multiple serious problems in the reduce_local test. The
most important was that it wasn't even being built and run!

No reviewer.

Location:
mpich2/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/src/mpi/coll/reduce_local.c

    r5253 r5675  
    138138        (*uop)(inbuf, inoutbuf, &count, &datatype); 
    139139    } 
     140 
     141    /* --BEGIN ERROR HANDLING-- */ 
     142    if (MPIU_THREADPRIV_FIELD(op_errno)) 
     143        mpi_errno = MPIU_THREADPRIV_FIELD(op_errno); 
     144    /* --END ERROR HANDLING-- */ 
     145 
    140146    /* ... end of body of routine ... */ 
    141147 
    142148  fn_exit: 
    143     if (MPIU_THREADPRIV_FIELD(op_errno)) 
    144         mpi_errno = MPIU_THREADPRIV_FIELD(op_errno); 
    145  
    146149    MPID_MPI_COLL_FUNC_EXIT(MPID_STATE_MPI_REDUCE_LOCAL); 
    147150    MPIU_THREAD_CS_EXIT(ALLFUNC,); 
  • mpich2/trunk/test/mpi/coll/reduce_local.c

    r5253 r5675  
    5353 
    5454 
    55     for (count = 0; count < MAX_BUF_ELEMENTS; count *= 2) { 
     55    for (count = 0; count < MAX_BUF_ELEMENTS; count = (count*2)+1) { 
    5656        for (i = 0; i < count; ++i) { 
    57             inbuf = i; 
     57            inbuf[i] = i; 
    5858            inoutbuf[i] = i; 
    5959        } 
    60         MPI_Reduce_local(inbuf, inoutbuf, count, MPI_INT, MPI_OP_SUM); 
     60        MPI_Reduce_local(inbuf, inoutbuf, count, MPI_INT, MPI_SUM); 
    6161        for (i = 0; i < count; ++i) 
    6262            if (inbuf[i] != i) { 
     
    6969    /* make sure that user-define ops work too */ 
    7070    MPI_Op_create(&user_op, 0/*!commute*/, &uop); 
    71     for (count = 0; count < MAX_BUF_ELEMENTS; count *= 2) { 
     71    for (count = 0; count < MAX_BUF_ELEMENTS; count = (count*2)+1) { 
    7272        for (i = 0; i < count; ++i) { 
    73             inbuf = i; 
     73            inbuf[i] = i; 
    7474            inoutbuf[i] = i; 
    7575        } 
     
    8383        } 
    8484    } 
    85     MPI_Op_free(&user_op); 
     85    MPI_Op_free(&uop); 
    8686 
    8787    free(inbuf); 
  • mpich2/trunk/test/mpi/coll/testlist

    r5362 r5675  
    88red3 10 
    99red4 10 
     10reduce_local 1 
    1011alltoall1 8 
    1112alltoallv 10