root/ompi/mca/io/romio321/romio/adio/common/greq_fns.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. MPIO_Completed_request_create

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
   2 /* 
   3  *
   4  *   Copyright (C) 2004 University of Chicago. 
   5  *   See COPYRIGHT notice in top-level directory.
   6  */
   7 
   8 #include "adio.h"
   9 #include "mpiu_greq.h"
  10 
  11 /* In cases where nonblocking operation will carry out blocking version,
  12  * instantiate and complete a generalized request  */
  13 
  14 void MPIO_Completed_request_create(MPI_File *fh, MPI_Offset bytes,
  15                 int *error_code, MPI_Request *request)
  16 {
  17         MPI_Status *status;
  18         status = (MPI_Status *)ADIOI_Malloc(sizeof(MPI_Status));
  19 
  20         status->MPI_ERROR = *error_code;
  21 #ifdef HAVE_STATUS_SET_BYTES
  22         MPIR_Status_set_bytes(status, MPI_BYTE, bytes);
  23 #endif
  24         /* --BEGIN ERROR HANDLING-- */
  25         if (*error_code != MPI_SUCCESS)
  26                 *error_code = MPIO_Err_return_file(*fh, *error_code);
  27         /* --END ERROR HANDLING-- */
  28         MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn, 
  29                         MPIU_Greq_cancel_fn, status, request);
  30         MPI_Grequest_complete(*request);
  31 }

/* [<][>][^][v][top][bottom][index][help] */