This source file includes following definitions.
- MPI_Waitall
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 #include "ompi_config.h"
  24 #include <stdio.h>
  25 
  26 #include "ompi/mpi/c/bindings.h"
  27 #include "ompi/runtime/params.h"
  28 #include "ompi/communicator/communicator.h"
  29 #include "ompi/errhandler/errhandler.h"
  30 #include "ompi/request/request.h"
  31 #include "ompi/memchecker.h"
  32 #include "ompi/runtime/ompi_spc.h"
  33 
  34 #if OMPI_BUILD_MPI_PROFILING
  35 #if OPAL_HAVE_WEAK_SYMBOLS
  36 #pragma weak MPI_Waitall = PMPI_Waitall
  37 #endif
  38 #define MPI_Waitall PMPI_Waitall
  39 #endif
  40 
  41 static const char FUNC_NAME[] = "MPI_Waitall";
  42 
  43 
  44 int MPI_Waitall(int count, MPI_Request requests[], MPI_Status statuses[])
  45 {
  46     SPC_RECORD(OMPI_SPC_WAITALL, 1);
  47 
  48     MEMCHECKER(
  49         int j;
  50         for (j = 0; j < count; j++){
  51             memchecker_request(&requests[j]);
  52         }
  53     );
  54 
  55     if ( MPI_PARAM_CHECK ) {
  56         int i, rc = MPI_SUCCESS;
  57         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  58         if( (NULL == requests) && (0 != count) ) {
  59             rc = MPI_ERR_REQUEST;
  60         } else {
  61             for (i = 0; i < count; i++) {
  62                 if (NULL == requests[i]) {
  63                     rc = MPI_ERR_REQUEST;
  64                     break;
  65                 }
  66             }
  67         }
  68         if (count < 0) {
  69             rc = MPI_ERR_ARG;
  70         }
  71         OMPI_ERRHANDLER_CHECK(rc, MPI_COMM_WORLD, rc, FUNC_NAME);
  72     }
  73 
  74     if (OPAL_UNLIKELY(0 == count)) {
  75         return MPI_SUCCESS;
  76     }
  77 
  78     OPAL_CR_ENTER_LIBRARY();
  79 
  80     if (OMPI_SUCCESS == ompi_request_wait_all(count, requests, statuses)) {
  81         OPAL_CR_EXIT_LIBRARY();
  82         return MPI_SUCCESS;
  83     }
  84 
  85     if (MPI_SUCCESS !=
  86         ompi_errhandler_request_invoke(count, requests, FUNC_NAME)) {
  87         OPAL_CR_EXIT_LIBRARY();
  88         return MPI_ERR_IN_STATUS;
  89     }
  90 
  91     OPAL_CR_EXIT_LIBRARY();
  92     return MPI_SUCCESS;
  93 }