Blame src/mpi/romio/mpi-io/mpiu_greq.c
|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* (C) 2003 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
#include "mpioimpl.h"
|
|
Packit Service |
c5cf8c |
#include "mpiu_greq.h"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#include <string.h>
|
|
Packit Service |
c5cf8c |
#ifdef HAVE_WEAK_SYMBOLS
|
|
Packit Service |
c5cf8c |
/* Include mapping from MPI->PMPI */
|
|
Packit Service |
c5cf8c |
#define MPIO_BUILD_PROFILING
|
|
Packit Service |
c5cf8c |
#include "mpioprof.h"
|
|
Packit Service |
c5cf8c |
#endif
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int MPIU_Greq_query_fn(void *extra_state, MPI_Status * status)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
int foo;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* can't touch user's MPI_ERROR, so hold it for a moment */
|
|
Packit Service |
c5cf8c |
foo = status->MPI_ERROR;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* get the status from the blocking operation */
|
|
Packit Service |
c5cf8c |
memcpy(status, extra_state, sizeof(MPI_Status));
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* restore MPI_ERROR to whatever it had when we got it */
|
|
Packit Service |
c5cf8c |
status->MPI_ERROR = foo;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* and let Test|Wait know we weren't canceled */
|
|
Packit Service |
c5cf8c |
MPI_Status_set_cancelled(status, 0);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
return MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int MPIU_Greq_free_fn(void *extra_state)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
/* frees the memory allocated in MPIO_Completed_request_create */
|
|
Packit Service |
c5cf8c |
ADIOI_Free(extra_state);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
return MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
int MPIU_Greq_cancel_fn(void *extra_state, int complete)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
MPL_UNREFERENCED_ARG(extra_state);
|
|
Packit Service |
c5cf8c |
MPL_UNREFERENCED_ARG(complete);
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
/* can't cancel */
|
|
Packit Service |
c5cf8c |
return MPI_SUCCESS;
|
|
Packit Service |
c5cf8c |
}
|