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

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

DEFINITIONS

This source file includes following definitions.
  1. mca_vprotocol_pessimist_iprobe
  2. mca_vprotocol_pessimist_probe
  3. replay_iprobe
  4. log_iprobe
  5. replay_probe
  6. log_probe

   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 "vprotocol_pessimist.h"
  13 
  14 static inline int replay_iprobe(int src, int tag,
  15                                   struct ompi_communicator_t *comm,
  16                                   int *matched, ompi_status_public_t * status );
  17 static inline void log_iprobe(int ret, int src, int tag,
  18                                struct ompi_communicator_t *comm,
  19                                int *matched, ompi_status_public_t * status);
  20 static inline int replay_probe(int src, int tag,
  21                                  struct ompi_communicator_t *comm,
  22                                  ompi_status_public_t * status);
  23 static inline void log_probe(int ret, int src, int tag,
  24                                struct ompi_communicator_t *comm,
  25                                ompi_status_public_t * status);
  26 
  27 /*******************************************************************************
  28  * MPI level functions
  29  */
  30 int mca_vprotocol_pessimist_iprobe( int src, int tag,
  31                         struct ompi_communicator_t *comm,
  32                         int *matched, ompi_status_public_t * status )
  33 {
  34   int ret;
  35 
  36   if(mca_vprotocol_pessimist.replay)
  37   {
  38     ret = replay_iprobe(src, tag, comm, matched, status);
  39   }
  40   else
  41   {
  42     ret = mca_pml_v.host_pml.pml_iprobe(src, tag, comm, matched, status);
  43     log_iprobe(ret, src, tag, comm, matched, status);
  44   }
  45   return ret;
  46 }
  47 
  48 int mca_vprotocol_pessimist_probe( int src, int tag,
  49                        struct ompi_communicator_t *comm,
  50                        ompi_status_public_t * status )
  51 {
  52   int ret;
  53 
  54   if(mca_vprotocol_pessimist.replay)
  55   {
  56     ret = replay_probe(src, tag, comm, status);
  57   }
  58   else
  59   {
  60     ret = mca_pml_v.host_pml.pml_probe(src, tag, comm, status);
  61     log_probe(ret, src, tag, comm, status);
  62   }
  63   return ret;
  64 }
  65 
  66 /*******************************************************************************
  67  * message logging internals
  68  */
  69 static inline int replay_iprobe(int src, int tag,
  70                                   struct ompi_communicator_t *comm,
  71                                   int *matched, ompi_status_public_t * status )
  72 {
  73   return OMPI_ERROR;
  74 }
  75 
  76 static inline void log_iprobe(int ret, int src, int tag,
  77                                struct ompi_communicator_t *comm,
  78                                int *matched, ompi_status_public_t * status)
  79 {
  80   return;
  81 }
  82 
  83 static inline int replay_probe(int src, int tag,
  84                                  struct ompi_communicator_t *comm,
  85                                  ompi_status_public_t * status)
  86 {
  87   return OMPI_ERROR;
  88 }
  89 
  90 static inline void log_probe(int ret, int src, int tag,
  91                                struct ompi_communicator_t *comm,
  92                                ompi_status_public_t * status)
  93 {
  94   return;
  95 }

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