2013-09-10 19:34:09 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2013 Mellanox Technologies, Inc.
|
|
|
|
* All rights reserved.
|
2015-08-31 03:36:02 +03:00
|
|
|
* Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2013-09-10 19:34:09 +04:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "oshmem_config.h"
|
|
|
|
|
|
|
|
#include "oshmem/constants.h"
|
|
|
|
#include "oshmem/runtime/runtime.h"
|
|
|
|
#include "oshmem/runtime/params.h"
|
|
|
|
|
2013-12-26 14:53:48 +04:00
|
|
|
int oshmem_shmem_allgather(void *send_buf, void *rcv_buf, int elem_size)
|
2013-09-10 19:34:09 +04:00
|
|
|
{
|
2013-12-26 14:53:48 +04:00
|
|
|
int rc;
|
2013-09-10 19:34:09 +04:00
|
|
|
|
2015-10-13 02:52:35 +03:00
|
|
|
rc = PMPI_Allgather(send_buf, elem_size, MPI_BYTE,
|
2013-12-26 14:53:48 +04:00
|
|
|
rcv_buf, elem_size, MPI_BYTE, oshmem_comm_world);
|
2013-09-10 19:34:09 +04:00
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2014-02-27 18:02:30 +04:00
|
|
|
int oshmem_shmem_allgatherv(void *send_buf, void* rcv_buf, int send_count,
|
|
|
|
int* rcv_size, int* displs)
|
|
|
|
{
|
|
|
|
int rc;
|
|
|
|
|
2015-10-13 02:52:35 +03:00
|
|
|
rc = PMPI_Allgatherv(send_buf, send_count, MPI_BYTE,
|
2014-02-27 18:02:30 +04:00
|
|
|
rcv_buf, rcv_size, displs, MPI_BYTE, oshmem_comm_world);
|
|
|
|
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
|
2013-12-26 14:53:48 +04:00
|
|
|
void oshmem_shmem_barrier(void)
|
2013-09-10 19:34:09 +04:00
|
|
|
{
|
2015-10-13 02:52:35 +03:00
|
|
|
PMPI_Barrier(oshmem_comm_world);
|
2013-09-10 19:34:09 +04:00
|
|
|
}
|