d8df9d414d
This commit adds support for performing one-sided operations over supported hardware (currently Infiniband and Cray Gemini/Aries). This component is still undergoing active development. Current features: - Use network atomic operations (fadd, cswap) for implementing locking and PSCW synchronization. - Aggregate small contiguous puts. - Reduced memory footprint by storing window data (pointer, keys, etc) at the lowest rank on each node. The data is fetched as each process needs to communicate with a new peer. This is a trade-off between the performance of the first operation on a peer and the memory utilization of a window. TODO: - Add support for the accumulate_ops info key. If it is known that the same op or same op/no op is used it may be possible to use hardware atomics for fetch-and-op and compare-and-swap. Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
75 строки
2.0 KiB
C
75 строки
2.0 KiB
C
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
|
/*
|
|
* Copyright (c) 2011-2012 Sandia National Laboratories. All rights reserved.
|
|
* Copyright (c) 2014-2015 Los Alamos National Security, LLC. All rights
|
|
* reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include "ompi/request/request.h"
|
|
#include "ompi/mca/osc/osc.h"
|
|
#include "ompi/mca/osc/base/base.h"
|
|
#include "ompi/mca/osc/base/osc_base_obj_convert.h"
|
|
|
|
#include "osc_rdma.h"
|
|
#include "osc_rdma_request.h"
|
|
|
|
static int request_cancel(struct ompi_request_t *request, int complete)
|
|
{
|
|
return MPI_ERR_REQUEST;
|
|
}
|
|
|
|
static int request_free(struct ompi_request_t **ompi_req)
|
|
{
|
|
ompi_osc_rdma_request_t *request =
|
|
(ompi_osc_rdma_request_t*) *ompi_req;
|
|
|
|
if (true != request->super.req_complete) {
|
|
return MPI_ERR_REQUEST;
|
|
}
|
|
|
|
OMPI_OSC_RDMA_REQUEST_RETURN(request);
|
|
|
|
*ompi_req = MPI_REQUEST_NULL;
|
|
|
|
return OMPI_SUCCESS;
|
|
}
|
|
|
|
static int request_complete (struct ompi_request_t *request)
|
|
{
|
|
ompi_osc_rdma_request_t *parent_request = ((ompi_osc_rdma_request_t *) request)->parent_request;
|
|
|
|
if (parent_request && 0 == OPAL_THREAD_ADD32 (&parent_request->outstanding_requests, -1)) {
|
|
ompi_osc_rdma_request_complete (parent_request, OMPI_SUCCESS);
|
|
}
|
|
|
|
return OMPI_SUCCESS;
|
|
}
|
|
|
|
static void request_construct(ompi_osc_rdma_request_t *request)
|
|
{
|
|
request->super.req_type = OMPI_REQUEST_WIN;
|
|
request->super.req_status._cancelled = 0;
|
|
request->super.req_free = request_free;
|
|
request->super.req_cancel = request_cancel;
|
|
request->super.req_complete_cb = request_complete;
|
|
request->parent_request = 0;
|
|
OBJ_CONSTRUCT(&request->convertor, opal_convertor_t);
|
|
}
|
|
|
|
static void request_destruct(ompi_osc_rdma_request_t *request)
|
|
{
|
|
OBJ_DESTRUCT(&request->convertor);
|
|
}
|
|
|
|
OBJ_CLASS_INSTANCE(ompi_osc_rdma_request_t,
|
|
ompi_request_t,
|
|
request_construct,
|
|
request_destruct);
|