root/ompi/mca/pml/monitoring/pml_monitoring_start.c

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

DEFINITIONS

This source file includes following definitions.
  1. mca_pml_monitoring_start

   1 /*
   2  * Copyright (c) 2013-2015 The University of Tennessee and The University
   3  *                         of Tennessee Research Foundation.  All rights
   4  *                         reserved.
   5  * Copyright (c) 2013-2018 Inria.  All rights reserved.
   6  * $COPYRIGHT$
   7  *
   8  * Additional copyrights may follow
   9  *
  10  * $HEADER$
  11  */
  12 
  13 #include <ompi_config.h>
  14 #include "pml_monitoring.h"
  15 #include <ompi/mca/pml/base/pml_base_request.h>
  16 
  17 /* manage persistant requests*/
  18 int mca_pml_monitoring_start(size_t count,
  19                              ompi_request_t** requests)
  20 {
  21     size_t i;
  22 
  23     for( i = 0; i < count; i++ ) {
  24         mca_pml_base_request_t *pml_request = (mca_pml_base_request_t*)requests[i];
  25         int world_rank;
  26 
  27         if(NULL == pml_request) {
  28             continue;
  29         }
  30         if(OMPI_REQUEST_PML != requests[i]->req_type) {
  31             continue;
  32         }
  33         if(MCA_PML_REQUEST_SEND != pml_request->req_type) {
  34             continue;
  35         }
  36 
  37         /**
  38          * If this fails the destination is not part of my MPI_COM_WORLD
  39          */
  40         if(OPAL_SUCCESS == mca_common_monitoring_get_world_rank(pml_request->req_peer,
  41                                                                 pml_request->req_comm->c_remote_group,
  42                                                                 &world_rank)) {
  43             size_t type_size, data_size;
  44             ompi_datatype_type_size(pml_request->req_datatype, &type_size);
  45             data_size = pml_request->req_count * type_size;
  46             mca_common_monitoring_record_pml(world_rank, data_size, 1);
  47         }
  48     }
  49     return pml_selected_module.pml_start(count, requests);
  50 }
  51 

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