Exemple #1
0
int
ompi_osc_pt2pt_put(const void *origin_addr, int origin_count,
                  struct ompi_datatype_t *origin_dt,
                  int target, OPAL_PTRDIFF_TYPE target_disp,
                  int target_count,
                  struct ompi_datatype_t *target_dt, ompi_win_t *win)
{
    return ompi_osc_pt2pt_put_w_req (origin_addr, origin_count,
                                    origin_dt, target, target_disp,
                                    target_count, target_dt, win, NULL);
}
Exemple #2
0
int ompi_osc_pt2pt_rput(const void *origin_addr, int origin_count,
                       struct ompi_datatype_t *origin_dt,
                       int target, OPAL_PTRDIFF_TYPE target_disp,
                       int target_count, struct ompi_datatype_t *target_dt,
                       struct ompi_win_t *win, struct ompi_request_t **request)
{
    ompi_osc_pt2pt_request_t *pt2pt_request;
    int ret;

    OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
                         "rput: 0x%lx, %d, %s, %d, %d, %d, %s, %s",
                         (unsigned long) origin_addr, origin_count,
                         origin_dt->name, target, (int) target_disp,
                         target_count, target_dt->name, win->w_name));

    OMPI_OSC_PT2PT_REQUEST_ALLOC(win, pt2pt_request);
    if (NULL == pt2pt_request) {
        return OMPI_ERR_OUT_OF_RESOURCE;
    }

    /* short-circuit case */
    if (0 == origin_count || 0 == target_count) {
        ompi_osc_pt2pt_request_complete (pt2pt_request, MPI_SUCCESS);
        *request = &pt2pt_request->super;
        return OMPI_SUCCESS;
    }

    pt2pt_request->type = OMPI_OSC_PT2PT_HDR_TYPE_PUT;

    ret = ompi_osc_pt2pt_put_w_req (origin_addr, origin_count, origin_dt, target,
                                   target_disp, target_count, target_dt, win,
                                   pt2pt_request);
    if (OMPI_SUCCESS != ret) {
        OMPI_OSC_PT2PT_REQUEST_RETURN(pt2pt_request);
        return ret;
    }

    *request = (ompi_request_t *) pt2pt_request;

    return OMPI_SUCCESS;
}