1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
/*
* Copyright (c) 2013-2015 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2013-2018 Inria. All rights reserved.
* Copyright (c) 2019 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "pml_monitoring.h"
int mca_pml_monitoring_isend_init(const void *buf,
size_t count,
ompi_datatype_t *datatype,
int dst,
int tag,
mca_pml_base_send_mode_t mode,
struct ompi_communicator_t* comm,
struct ompi_request_t **request)
{
return pml_selected_module.pml_isend_init(buf, count, datatype,
dst, tag, mode, comm, request);
}
int mca_pml_monitoring_isend(const void *buf,
size_t count,
ompi_datatype_t *datatype,
int dst,
int tag,
mca_pml_base_send_mode_t mode,
struct ompi_communicator_t* comm,
struct ompi_request_t **request)
{
int world_rank;
/**
* If this fails the destination is not part of my MPI_COM_WORLD
* Lookup its name in the rank hashtable to get its MPI_COMM_WORLD rank
*/
if(OPAL_SUCCESS == mca_common_monitoring_get_world_rank(dst, comm->c_remote_group, &world_rank)) {
size_t type_size, data_size;
ompi_datatype_type_size(datatype, &type_size);
data_size = count*type_size;
mca_common_monitoring_record_pml(world_rank, data_size, tag);
}
return pml_selected_module.pml_isend(buf, count, datatype,
dst, tag, mode, comm, request);
}
int mca_pml_monitoring_send(const void *buf,
size_t count,
ompi_datatype_t *datatype,
int dst,
int tag,
mca_pml_base_send_mode_t mode,
struct ompi_communicator_t* comm)
{
int world_rank;
/* Are we sending to a peer from my own MPI_COMM_WORLD? */
if(OPAL_SUCCESS == mca_common_monitoring_get_world_rank(dst, comm->c_remote_group, &world_rank)) {
size_t type_size, data_size;
ompi_datatype_type_size(datatype, &type_size);
data_size = count*type_size;
mca_common_monitoring_record_pml(world_rank, data_size, tag);
}
return pml_selected_module.pml_send(buf, count, datatype,
dst, tag, mode, comm);
}
|