1
1
openmpi/oshmem/runtime/oshmem_shmem_exchange.c
Gilles Gouaillardet 53b952dc2b oshmem: invoke the C PMPI_* subroutines instead of the MPI_* ones
when profiling is built.
This prevents oshmem subroutines from being wrapped twice by third
party tools (e.g. once in oshmem and once in MPI)
see discussion starting at http://www.open-mpi.org/community/lists/devel/2015/08/17842.php

Thanks to Bert Wesarg for bringing this to our attention
2015-10-13 08:52:03 +09:00

50 строки
1.2 KiB
C

/*
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "oshmem_config.h"
#include "oshmem/constants.h"
#include "oshmem/runtime/runtime.h"
#include "oshmem/runtime/params.h"
#if OMPI_ENABLE_MPI_PROFILING
#define MPI_Allgather PMPI_Allgather
#define MPI_Allgatherv PMPI_Allgatherv
#define MPI_Barrier PMPI_Barrier
#endif
int oshmem_shmem_allgather(void *send_buf, void *rcv_buf, int elem_size)
{
int rc;
rc = MPI_Allgather(send_buf, elem_size, MPI_BYTE,
rcv_buf, elem_size, MPI_BYTE, oshmem_comm_world);
return rc;
}
int oshmem_shmem_allgatherv(void *send_buf, void* rcv_buf, int send_count,
int* rcv_size, int* displs)
{
int rc;
rc = MPI_Allgatherv(send_buf, send_count, MPI_BYTE,
rcv_buf, rcv_size, displs, MPI_BYTE, oshmem_comm_world);
return rc;
}
void oshmem_shmem_barrier(void)
{
MPI_Barrier(oshmem_comm_world);
}