root/ompi/mca/vprotocol/pessimist/vprotocol_pessimist_recv.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. mca_vprotocol_pessimist_irecv
  2. mca_vprotocol_pessimist_recv

   1 /*
   2  * Copyright (c) 2004-2007 The Trustees of the University of Tennessee.
   3  *                         All rights reserved.
   4  * $COPYRIGHT$
   5  *
   6  * Additional copyrights may follow
   7  *
   8  * $HEADER$
   9  */
  10 
  11 #include "ompi_config.h"
  12 #include "ompi/request/request.h"
  13 #include "ompi/mca/pml/base/pml_base_recvreq.h"
  14 #include "vprotocol_pessimist.h"
  15 
  16 
  17 
  18 
  19 
  20 int mca_vprotocol_pessimist_irecv(void *addr,
  21                      size_t count,
  22                      ompi_datatype_t * datatype,
  23                      int src,
  24                      int tag,
  25                      struct ompi_communicator_t *comm,
  26                      struct ompi_request_t **request)
  27 {
  28   int ret;
  29 
  30   V_OUTPUT_VERBOSE(50, "pessimist:\tirecv\trequest\t%"PRIpclock"\tfrom %d\ttag %d\tsize %lu",
  31                         mca_vprotocol_pessimist.clock, src, tag, (unsigned long) count);
  32 
  33   /* first, see if we have to enforce matching order */
  34   VPROTOCOL_PESSIMIST_MATCHING_REPLAY(src);
  35   /* now just let the host pml do its job */
  36   ret = mca_pml_v.host_pml.pml_irecv(addr, count, datatype, src, tag, comm, request);
  37   VPESSIMIST_FTREQ_INIT(*request);
  38   vprotocol_pessimist_matching_log_prepare(*request);
  39   return ret;
  40 }
  41 
  42 
  43 
  44 
  45 
  46 int mca_vprotocol_pessimist_recv(void *addr,
  47                       size_t count,
  48                       ompi_datatype_t * datatype,
  49                       int src,
  50                       int tag,
  51                       struct ompi_communicator_t *comm,
  52                       ompi_status_public_t * status )
  53 {
  54   ompi_request_t *request = MPI_REQUEST_NULL;
  55   int ret;
  56 
  57   V_OUTPUT_VERBOSE(50, "pessimist:\trecv\tposted\t%"PRIpclock"\tfrom %d\ttag %d\tsize %lu",
  58                        mca_vprotocol_pessimist.clock, src, tag, (unsigned long) count);
  59   /* first, see if we have to enforce matching order */
  60   VPROTOCOL_PESSIMIST_MATCHING_REPLAY(src);
  61   /* now just let the pml do its job */
  62   ret = mca_pml_v.host_pml.pml_irecv(addr, count, datatype, src, tag, comm, &request);
  63   VPESSIMIST_FTREQ_INIT(request);
  64   vprotocol_pessimist_matching_log_prepare(request);
  65   /* block until the request is completed */
  66   VPROTOCOL_PESSIMIST_WAIT(&request, status, ret);
  67   return ret;
  68 }

/* [<][>][^][v][top][bottom][index][help] */