Changeset 5695

Show
Ignore:
Timestamp:
11/04/09 17:45:44 (3 weeks ago)
Author:
balaji
Message:

Configure protect the asynchronous progress stuff. This will be
released formally in the mpich2-1.3 series after more testing.

Location:
mpich2/trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/configure.in

    r5681 r5695  
    365365if test $smpcoll = "yes" ; then 
    366366   AC_DEFINE(USE_SMP_COLLECTIVES,1,[define to enable SMP/multi-core aware collectives]) 
     367fi 
     368 
     369AC_ARG_ENABLE(async-progress, 
     370        [--enable-async-progress - Enable support for asynchronous communication progress], 
     371        async_progress=$enableval,async_progress=no) 
     372if test "$async_progress" = "yes" ; then 
     373   AC_DEFINE(USE_ASYNC_PROGRESS,1,[define to enable asynchronous communication progress]) 
    367374fi 
    368375 
  • mpich2/trunk/src/mpi/init/finalize.c

    r5694 r5695  
    116116    static const char FCNAME[] = "MPI_Finalize"; 
    117117    int mpi_errno = MPI_SUCCESS; 
    118     int rc; 
    119118#if defined(HAVE_USLEEP) && defined(USE_COVERAGE) 
    120119    int rank=0; 
     
    132131    /* ... body of routine ... */ 
    133132 
     133#if defined USE_ASYNC_PROGRESS 
    134134    /* If the user requested for asynchronous progress, we need to 
    135135     * shutdown the progress thread */ 
     
    138138        if (mpi_errno) goto fn_fail; 
    139139    } 
     140#endif /* USE_ASYNC_PROGRESS */ 
    140141     
    141142#if defined(HAVE_USLEEP) && defined(USE_COVERAGE) 
  • mpich2/trunk/src/mpi/init/init.c

    r5694 r5695  
    3131#endif 
    3232 
     33#if defined USE_ASYNC_PROGRESS 
    3334int MPIR_async_thread_initialized = 0; 
     35#endif /* USE_ASYNC_PROGRESS */ 
    3436 
    3537#undef FUNCNAME 
     
    144146#endif 
    145147 
     148#if defined USE_ASYNC_PROGRESS 
    146149    /* If the user requested for asynchronous progress, request for 
    147150     * THREAD_MULTIPLE. */ 
     
    150153    if (rc) 
    151154        threadLevel = MPI_THREAD_MULTIPLE; 
     155#endif /* USE_ASYNC_PROGRESS */ 
    152156 
    153157    mpi_errno = MPIR_Init_thread( argc, argv, threadLevel, &provided ); 
    154158    if (mpi_errno != MPI_SUCCESS) goto fn_fail; 
    155159 
    156     if (provided == MPI_THREAD_MULTIPLE) { 
     160#if defined USE_ASYNC_PROGRESS 
     161    if (rc && provided == MPI_THREAD_MULTIPLE) { 
    157162        mpi_errno = MPIR_Init_async_thread(); 
    158163        if (mpi_errno) goto fn_fail; 
     
    160165        MPIR_async_thread_initialized = 1; 
    161166    } 
     167#endif /* USE_ASYNC_PROGRESS */ 
    162168 
    163169    /* ... end of body of routine ... */ 
  • mpich2/trunk/src/mpi/init/initthread.c

    r5694 r5695  
    555555    /* ... body of routine ... */ 
    556556 
     557#if defined USE_ASYNC_PROGRESS 
    557558    /* If the user requested for asynchronous progress, request for 
    558559     * THREAD_MULTIPLE. */ 
     
    561562    if (rc) 
    562563        reqd = MPI_THREAD_MULTIPLE; 
     564#endif /* USE_ASYNC_PROGRESS */ 
    563565 
    564566    mpi_errno = MPIR_Init_thread( argc, argv, reqd, provided ); 
    565567    if (mpi_errno != MPI_SUCCESS) goto fn_fail; 
    566568 
     569#if defined USE_ASYNC_PROGRESS 
    567570    if (rc && *provided == MPI_THREAD_MULTIPLE) { 
    568571        mpi_errno = MPIR_Init_async_thread(); 
     
    571574        MPIR_async_thread_initialized = 1; 
    572575    } 
     576#endif /* USE_ASYNC_PROGRESS */ 
    573577 
    574578    /* ... end of body of routine ... */ 
  • mpich2/trunk/src/mpi/init/mpi_init.h

    r5694 r5695  
    1010int MPIR_Finalize_async_thread(void); 
    1111 
     12#if defined USE_ASYNC_PROGRESS 
    1213extern int MPIR_async_thread_initialized; 
     14#endif /* USE_ASYNC_PROGRESS */