00001
00002
00003
00004
00005
00006
00007
00008 #include "adio.h"
00009 #include "mpiu_greq.h"
00010
00011
00012
00013
00014 void MPIO_Completed_request_create(MPI_File *fh, MPI_Offset bytes,
00015 int *error_code, MPI_Request *request)
00016 {
00017 MPI_Status *status;
00018 status = (MPI_Status *)ADIOI_Malloc(sizeof(MPI_Status));
00019
00020 status->MPI_ERROR = *error_code;
00021 #ifdef HAVE_STATUS_SET_BYTES
00022 MPIR_Status_set_bytes(status, MPI_BYTE, bytes);
00023 #endif
00024
00025 if (*error_code != MPI_SUCCESS)
00026 *error_code = MPIO_Err_return_file(*fh, *error_code);
00027
00028 MPI_Grequest_start(MPIU_Greq_query_fn, MPIU_Greq_free_fn,
00029 MPIU_Greq_cancel_fn, status, request);
00030 MPI_Grequest_complete(*request);
00031 }