This source file includes following definitions.
- ompi_osc_base_select
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 #include "ompi_config.h"
  22 
  23 #include "ompi/constants.h"
  24 #include "ompi/mca/mca.h"
  25 #include "opal/mca/base/base.h"
  26 #include "ompi/mca/osc/osc.h"
  27 #include "ompi/mca/osc/base/base.h"
  28 #include "ompi/info/info.h"
  29 #include "ompi/communicator/communicator.h"
  30 #include "ompi/win/win.h"
  31 
  32 int
  33 ompi_osc_base_select(ompi_win_t *win,
  34                      void **base,
  35                      size_t size,
  36                      int disp_unit,
  37                      ompi_communicator_t *comm,
  38                      opal_info_t *info,
  39                      int flavor,
  40                      int *model)
  41 {
  42     opal_list_item_t *item;
  43     ompi_osc_base_component_t *best_component = NULL;
  44     int best_priority = -1, priority;
  45 
  46     if (opal_list_get_size(&ompi_osc_base_framework.framework_components) <= 0) {
  47         
  48         return OMPI_ERR_NOT_SUPPORTED;
  49     }
  50 
  51     for (item = opal_list_get_first(&ompi_osc_base_framework.framework_components) ;
  52          item != opal_list_get_end(&ompi_osc_base_framework.framework_components) ;
  53          item = opal_list_get_next(item)) {
  54         ompi_osc_base_component_t *component = (ompi_osc_base_component_t*)
  55             ((mca_base_component_list_item_t*) item)->cli_component;
  56 
  57         priority = component->osc_query(win, base, size, disp_unit, comm, info, flavor);
  58         if (priority < 0) {
  59             if (MPI_WIN_FLAVOR_SHARED == flavor && OMPI_ERR_RMA_SHARED == priority) {
  60                 
  61                 return OMPI_ERR_RMA_SHARED;
  62             }
  63             continue;
  64         }
  65 
  66         if (priority > best_priority) {
  67             best_component = component;
  68             best_priority = priority;
  69         }
  70     }
  71 
  72     if (NULL == best_component) return OMPI_ERR_NOT_SUPPORTED;
  73 
  74     opal_output_verbose( 10, ompi_osc_base_framework.framework_output,
  75                          "select: component %s selected",
  76                          best_component->osc_version.mca_component_name );
  77 
  78     return best_component->osc_select(win, base, size, disp_unit, comm, info, flavor, model);
  79 }