2004-09-14 14:55:10 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-24 20:38:08 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-11-28 23:09:25 +03:00
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2004-11-22 04:38:40 +03:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2004-09-14 14:55:10 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* This is the base request type for all IO requests.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef IO_BASE_REQUEST_H
|
|
|
|
#define IO_BASE_REQUEST_H
|
|
|
|
|
2009-03-04 18:35:54 +03:00
|
|
|
#include "ompi_config.h"
|
2005-07-03 20:06:07 +04:00
|
|
|
#include "opal/class/opal_object.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/request/request.h"
|
|
|
|
#include "ompi/file/file.h"
|
|
|
|
#include "ompi/mca/io/base/base.h"
|
2004-09-14 14:55:10 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Base request type.
|
|
|
|
*/
|
|
|
|
struct mca_io_base_request_t {
|
|
|
|
/** Base request */
|
2004-12-12 18:29:29 +03:00
|
|
|
ompi_request_t super;
|
2004-09-14 14:55:10 +04:00
|
|
|
|
|
|
|
/** ompi_file_t of the file that owns this request */
|
|
|
|
ompi_file_t *req_file;
|
|
|
|
|
2004-12-12 18:29:29 +03:00
|
|
|
/** io component version number of the module that owns this
|
|
|
|
request (i.e., this defines what follows this entry in
|
|
|
|
memory) */
|
|
|
|
mca_io_base_version_t req_ver;
|
2005-02-09 05:09:07 +03:00
|
|
|
/** True if free has been called on this request (before it has
|
|
|
|
been finalized */
|
|
|
|
volatile bool free_called;
|
2004-09-14 14:55:10 +04:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Convenience typedef
|
|
|
|
*/
|
|
|
|
typedef struct mca_io_base_request_t mca_io_base_request_t;
|
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
BEGIN_C_DECLS
|
Clean up request handling in the I/O framework to be more consistent with
other request-using frameworks.
- Rather than having mpi/c/* functions allocate requests explicitly,
pass the MPI_Request* down to the I/O component and have it
perform the allocation.
- While the I/O base provides a base request which can be used,
it is not required and all request management occurs within
the component.
- Push progress management into the component, rather than having it
happen in the base. Progress functions are now easily registered,
and not all (ie, the one existing) components use progress functions
in any rational way.
ROMIO switched to generalized requests instead of MPIO_Requests many
moons ago, and Open MPI now uses ROMIO's generalized requests, so there
is no reason to wrap those requests (which are OMPI requests) in another
level of request.
Now the file function passes the MPI_Request* to the ROMIO component,
which passes it to the underlying ROMIO function, which calls
MPI_Grequest_start to create an OMPI request, which is what gets set
as the request to the user. Much cleaner.
This patch has two motivations. One, a whole heck of a lot of code
just got removed, and request handling is now much cleaner for I/O
components. Two, by adding support for Argonne's proposed generalized
request extensions, we can allow ROMIO to provide async I/O through
generalized requests, which we couldn't rationally do in the old
setup due to the crazy request completion rules.
This commit was SVN r22235.
2009-11-26 08:13:43 +03:00
|
|
|
|
2006-08-24 20:38:08 +04:00
|
|
|
/**
|
|
|
|
* Declare the class
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC OBJ_CLASS_DECLARATION(mca_io_base_request_t);
|
|
|
|
|
2009-08-20 15:42:18 +04:00
|
|
|
END_C_DECLS
|
2004-09-14 14:55:10 +04:00
|
|
|
|
|
|
|
#endif
|