2015-03-06 06:50:44 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2004-01-09 11:27:58 +03: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.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* 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.
|
2008-08-06 16:16:54 +04:00
|
|
|
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
2015-03-06 06:50:44 +03:00
|
|
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2015-07-06 18:39:09 +03:00
|
|
|
* Copyright (c) 2015 University of Houston. All rights reserved.
|
2015-09-03 04:33:45 +03:00
|
|
|
* Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). 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-11-22 03:37:56 +03:00
|
|
|
* $HEADER$
|
2004-01-09 11:27:58 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_IO_H
|
|
|
|
#define MCA_IO_H
|
|
|
|
|
2005-11-29 21:25:35 +03:00
|
|
|
#include "mpi.h"
|
2015-03-06 06:50:44 +03:00
|
|
|
#include "ompi/mca/mca.h"
|
2005-11-29 21:25:35 +03:00
|
|
|
#include "ompi/request/request.h"
|
2004-12-12 18:29:29 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
/*
|
|
|
|
* Forward declaration for private data on io components and modules.
|
|
|
|
*/
|
2004-12-12 18:29:29 +03:00
|
|
|
struct ompi_file_t;
|
2004-09-14 14:55:10 +04:00
|
|
|
struct mca_io_base_file_t;
|
|
|
|
struct mca_io_base_delete_t;
|
|
|
|
|
2004-12-12 18:29:29 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Forward declarations of things declared in this file
|
2004-09-14 14:55:10 +04:00
|
|
|
*/
|
2008-08-06 16:16:54 +04:00
|
|
|
struct mca_io_base_module_2_0_0_t;
|
2004-09-14 14:55:10 +04:00
|
|
|
union mca_io_base_modules_t;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2015-06-24 06:59:57 +03:00
|
|
|
* Version of IO component interface that we're using.
|
2004-09-14 14:55:10 +04:00
|
|
|
*
|
|
|
|
* The IO component is being designed to ensure that it can
|
|
|
|
* simultaneously support multiple component versions in a single
|
2008-08-06 16:16:54 +04:00
|
|
|
* executable. This is because ROMIO will always be v2.x that
|
2004-09-14 14:55:10 +04:00
|
|
|
* supports pretty much a 1-to-1 MPI-API-to-module-function mapping,
|
2008-08-06 16:16:54 +04:00
|
|
|
* but we plan to have a v3.x series that will be "something
|
2004-09-14 14:55:10 +04:00
|
|
|
* different" (as yet undefined).
|
|
|
|
*/
|
|
|
|
enum mca_io_base_version_t {
|
|
|
|
MCA_IO_BASE_V_NONE,
|
2008-08-06 16:16:54 +04:00
|
|
|
MCA_IO_BASE_V_2_0_0,
|
2004-09-14 14:55:10 +04:00
|
|
|
|
|
|
|
MCA_IO_BASE_V_MAX
|
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Convenience typedef
|
|
|
|
*/
|
|
|
|
typedef enum mca_io_base_version_t mca_io_base_version_t;
|
|
|
|
|
2004-01-16 03:35:44 +03:00
|
|
|
|
|
|
|
/*
|
2008-07-29 02:40:57 +04:00
|
|
|
* Macro for use in components that are of type io
|
2004-01-17 01:08:54 +03:00
|
|
|
* 1-1 mapping of all MPI-IO functions
|
2004-01-16 03:35:44 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
#define MCA_IO_BASE_VERSION_2_0_0 \
|
2015-03-06 06:50:44 +03:00
|
|
|
OMPI_MCA_BASE_VERSION_2_1_0("io", 2, 0, 0)
|
2004-01-16 03:35:44 +03:00
|
|
|
|
2004-01-17 01:08:54 +03:00
|
|
|
/*
|
2008-07-29 02:40:57 +04:00
|
|
|
* Component
|
2004-01-17 01:08:54 +03:00
|
|
|
*/
|
2004-01-16 03:35:44 +03:00
|
|
|
|
2008-08-06 16:16:54 +04:00
|
|
|
struct mca_io_base_module_2_0_0_t;
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_component_init_query_fn_t)
|
2005-03-27 17:05:23 +04:00
|
|
|
(bool enable_progress_threads, bool enable_mpi_threads);
|
2008-08-06 16:16:54 +04:00
|
|
|
typedef const struct mca_io_base_module_2_0_0_t *
|
|
|
|
(*mca_io_base_component_file_query_2_0_0_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *file, struct mca_io_base_file_t **private_data,
|
2004-09-14 14:55:10 +04:00
|
|
|
int *priority);
|
|
|
|
typedef int (*mca_io_base_component_file_unquery_fn_t)
|
|
|
|
(struct ompi_file_t *file, struct mca_io_base_file_t *private_data);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_component_file_delete_query_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(const char *filename, struct ompi_info_t *info,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct mca_io_base_delete_t **private_data,
|
|
|
|
bool *usable, int *priority);
|
|
|
|
typedef int (*mca_io_base_component_file_delete_select_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(const char *filename, struct ompi_info_t *info,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct mca_io_base_delete_t *private_data);
|
|
|
|
typedef int (*mca_io_base_component_file_delete_unselect_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(const char *filename, struct ompi_info_t *info,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct mca_io_base_delete_t *private_data);
|
2004-01-16 03:35:44 +03:00
|
|
|
|
2005-11-29 21:25:35 +03:00
|
|
|
typedef int (*mca_io_base_component_register_datarep_fn_t)(
|
2015-09-03 04:33:45 +03:00
|
|
|
const char *,
|
2005-11-29 21:25:35 +03:00
|
|
|
MPI_Datarep_conversion_function*,
|
|
|
|
MPI_Datarep_conversion_function*,
|
|
|
|
MPI_Datarep_extent_function*,
|
|
|
|
void*);
|
|
|
|
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
/* IO component version and interface functions. */
|
2008-07-29 02:40:57 +04:00
|
|
|
struct mca_io_base_component_2_0_0_t {
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_base_component_t io_version;
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_base_component_data_t io_data;
|
2004-09-14 14:55:10 +04:00
|
|
|
|
|
|
|
mca_io_base_component_init_query_fn_t io_init_query;
|
2008-08-06 16:16:54 +04:00
|
|
|
mca_io_base_component_file_query_2_0_0_fn_t io_file_query;
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_component_file_unquery_fn_t io_file_unquery;
|
|
|
|
|
|
|
|
mca_io_base_component_file_delete_query_fn_t io_delete_query;
|
|
|
|
mca_io_base_component_file_delete_unselect_fn_t io_delete_unquery;
|
|
|
|
mca_io_base_component_file_delete_select_fn_t io_delete_select;
|
2004-12-12 18:29:29 +03:00
|
|
|
|
2005-11-29 21:25:35 +03:00
|
|
|
mca_io_base_component_register_datarep_fn_t io_register_datarep;
|
2004-01-16 03:35:44 +03:00
|
|
|
};
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct mca_io_base_component_2_0_0_t mca_io_base_component_2_0_0_t;
|
2004-01-16 03:35:44 +03:00
|
|
|
|
|
|
|
|
2004-01-31 02:14:19 +03:00
|
|
|
/*
|
2004-09-14 14:55:10 +04:00
|
|
|
* All component versions
|
2004-01-31 02:14:19 +03:00
|
|
|
*/
|
2004-09-14 14:55:10 +04:00
|
|
|
union mca_io_base_components_t {
|
2008-08-06 16:16:54 +04:00
|
|
|
mca_io_base_component_2_0_0_t v2_0_0;
|
2004-09-14 14:55:10 +04:00
|
|
|
};
|
|
|
|
typedef union mca_io_base_components_t mca_io_base_components_t;
|
2004-01-17 01:08:54 +03:00
|
|
|
|
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
/*
|
2008-08-06 16:16:54 +04:00
|
|
|
* Module v2.0.0
|
2004-09-14 14:55:10 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_open_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_communicator_t *comm, const char *filename, int amode,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_info_t *info, struct ompi_file_t *fh);
|
|
|
|
typedef int (*mca_io_base_module_file_close_fn_t)(struct ompi_file_t *fh);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_set_size_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset size);
|
|
|
|
typedef int (*mca_io_base_module_file_preallocate_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset size);
|
|
|
|
typedef int (*mca_io_base_module_file_get_size_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset *size);
|
|
|
|
typedef int (*mca_io_base_module_file_get_amode_fn_t)
|
|
|
|
(struct ompi_file_t *fh, int *amode);
|
|
|
|
typedef int (*mca_io_base_module_file_set_info_fn_t)
|
|
|
|
(struct ompi_file_t *fh, struct ompi_info_t *info);
|
|
|
|
typedef int (*mca_io_base_module_file_get_info_fn_t)
|
|
|
|
(struct ompi_file_t *fh, struct ompi_info_t **info_used);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_set_view_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset disp, struct ompi_datatype_t *etype,
|
2015-09-03 04:33:45 +03:00
|
|
|
struct ompi_datatype_t *filetype, const char *datarep,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_info_t *info);
|
|
|
|
typedef int (*mca_io_base_module_file_get_view_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, MPI_Offset *disp,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t **etype, struct ompi_datatype_t **filetype,
|
|
|
|
char *datarep);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_read_at_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, void *buf,
|
2015-06-24 06:59:57 +03:00
|
|
|
int count, struct ompi_datatype_t *datatype,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_read_at_all_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, void *buf,
|
2015-06-24 06:59:57 +03:00
|
|
|
int count, struct ompi_datatype_t *datatype,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_at_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
|
2015-06-24 06:59:57 +03:00
|
|
|
int count, struct ompi_datatype_t *datatype,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_at_all_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
|
2015-06-24 06:59:57 +03:00
|
|
|
int count, struct ompi_datatype_t *datatype,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_status_public_t *status);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_iread_at_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, void *buf,
|
2015-06-24 06:59:57 +03:00
|
|
|
int count, struct ompi_datatype_t *datatype,
|
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
|
|
|
struct ompi_request_t **request);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_iwrite_at_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
|
2015-06-24 06:59:57 +03:00
|
|
|
int count, struct ompi_datatype_t *datatype,
|
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
|
|
|
struct ompi_request_t **request);
|
2004-09-14 14:55:10 +04:00
|
|
|
|
2015-07-06 18:39:09 +03:00
|
|
|
typedef int (*mca_io_base_module_file_iread_at_all_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, void *buf,
|
|
|
|
int count, struct ompi_datatype_t *datatype,
|
|
|
|
struct ompi_request_t **request);
|
|
|
|
typedef int (*mca_io_base_module_file_iwrite_at_all_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
|
2015-07-06 18:39:09 +03:00
|
|
|
int count, struct ompi_datatype_t *datatype,
|
|
|
|
struct ompi_request_t **request);
|
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_read_fn_t)
|
2005-05-20 02:29:49 +04:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *
|
2015-06-24 06:59:57 +03:00
|
|
|
datatype, struct ompi_status_public_t *status);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_read_all_fn_t)
|
2005-05-20 02:29:49 +04:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *
|
2015-06-24 06:59:57 +03:00
|
|
|
datatype, struct ompi_status_public_t *status);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_write_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count, struct ompi_datatype_t *
|
2004-09-14 14:55:10 +04:00
|
|
|
datatype, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_all_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count, struct ompi_datatype_t *
|
2004-09-14 14:55:10 +04:00
|
|
|
datatype, struct ompi_status_public_t *status);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_iread_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count,
|
|
|
|
struct ompi_datatype_t *datatype, struct ompi_request_t **request);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_iwrite_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count,
|
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
|
|
|
struct ompi_datatype_t *datatype, struct ompi_request_t **request);
|
2004-09-14 14:55:10 +04:00
|
|
|
|
2015-07-06 18:39:09 +03:00
|
|
|
typedef int (*mca_io_base_module_file_iread_all_fn_t)
|
|
|
|
(struct ompi_file_t *fh, void *buf, int count,
|
|
|
|
struct ompi_datatype_t *datatype, struct ompi_request_t **request);
|
|
|
|
typedef int (*mca_io_base_module_file_iwrite_all_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count,
|
2015-07-06 18:39:09 +03:00
|
|
|
struct ompi_datatype_t *datatype, struct ompi_request_t **request);
|
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_seek_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, int whence);
|
|
|
|
typedef int (*mca_io_base_module_file_get_position_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset *offset);
|
|
|
|
typedef int (*mca_io_base_module_file_get_byte_offset_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, MPI_Offset *disp);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_read_shared_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_shared_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_iread_shared_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count,
|
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
|
|
|
struct ompi_datatype_t *datatype, struct ompi_request_t **request);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_iwrite_shared_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count,
|
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
|
|
|
struct ompi_datatype_t *datatype, struct ompi_request_t **request);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_read_ordered_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_ordered_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_seek_shared_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, int whence);
|
|
|
|
typedef int (*mca_io_base_module_file_get_position_shared_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset *offset);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_read_at_all_begin_fn_t)
|
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, void *buf,
|
|
|
|
int count, struct ompi_datatype_t *datatype);
|
|
|
|
typedef int (*mca_io_base_module_file_read_at_all_end_fn_t)
|
|
|
|
(struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_at_all_begin_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, MPI_Offset offset, const void *buf,
|
2004-09-14 14:55:10 +04:00
|
|
|
int count, struct ompi_datatype_t *datatype);
|
|
|
|
typedef int (*mca_io_base_module_file_write_at_all_end_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, struct ompi_status_public_t *status);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_read_all_begin_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype);
|
|
|
|
typedef int (*mca_io_base_module_file_read_all_end_fn_t)
|
|
|
|
(struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_all_begin_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype);
|
|
|
|
typedef int (*mca_io_base_module_file_write_all_end_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, struct ompi_status_public_t *status);
|
2004-09-14 14:55:10 +04:00
|
|
|
typedef int (*mca_io_base_module_file_read_ordered_begin_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype);
|
|
|
|
typedef int (*mca_io_base_module_file_read_ordered_end_fn_t)
|
|
|
|
(struct ompi_file_t *fh, void *buf, struct ompi_status_public_t *status);
|
|
|
|
typedef int (*mca_io_base_module_file_write_ordered_begin_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, int count,
|
2004-09-14 14:55:10 +04:00
|
|
|
struct ompi_datatype_t *datatype);
|
|
|
|
typedef int (*mca_io_base_module_file_write_ordered_end_fn_t)
|
2015-09-03 04:33:45 +03:00
|
|
|
(struct ompi_file_t *fh, const void *buf, struct ompi_status_public_t *status);
|
2004-09-14 14:55:10 +04:00
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_get_type_extent_fn_t)
|
2015-06-24 06:59:57 +03:00
|
|
|
(struct ompi_file_t *fh, struct ompi_datatype_t *datatype,
|
2004-09-14 14:55:10 +04:00
|
|
|
MPI_Aint *extent);
|
|
|
|
|
|
|
|
typedef int (*mca_io_base_module_file_set_atomicity_fn_t)
|
|
|
|
(struct ompi_file_t *fh, int flag);
|
|
|
|
typedef int (*mca_io_base_module_file_get_atomicity_fn_t)
|
|
|
|
(struct ompi_file_t *fh, int *flag);
|
|
|
|
typedef int (*mca_io_base_module_file_sync_fn_t)(struct ompi_file_t *fh);
|
|
|
|
|
2008-08-06 16:16:54 +04:00
|
|
|
struct mca_io_base_module_2_0_0_t {
|
2004-09-14 14:55:10 +04:00
|
|
|
|
|
|
|
/* Back-ends to MPI API calls (pretty much a 1-to-1 mapping) */
|
|
|
|
|
|
|
|
mca_io_base_module_file_open_fn_t io_module_file_open;
|
|
|
|
mca_io_base_module_file_close_fn_t io_module_file_close;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_set_size_fn_t io_module_file_set_size;
|
|
|
|
mca_io_base_module_file_preallocate_fn_t io_module_file_preallocate;
|
|
|
|
mca_io_base_module_file_get_size_fn_t io_module_file_get_size;
|
2015-06-24 06:59:57 +03:00
|
|
|
mca_io_base_module_file_get_amode_fn_t io_module_file_get_amode;
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_set_info_fn_t io_module_file_set_info;
|
|
|
|
mca_io_base_module_file_get_info_fn_t io_module_file_get_info;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_set_view_fn_t io_module_file_set_view;
|
|
|
|
mca_io_base_module_file_get_view_fn_t io_module_file_get_view;
|
|
|
|
|
|
|
|
mca_io_base_module_file_read_at_fn_t io_module_file_read_at;
|
|
|
|
mca_io_base_module_file_read_at_all_fn_t io_module_file_read_at_all;
|
|
|
|
mca_io_base_module_file_write_at_fn_t io_module_file_write_at;
|
|
|
|
mca_io_base_module_file_write_at_all_fn_t io_module_file_write_at_all;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2015-07-06 18:39:09 +03:00
|
|
|
mca_io_base_module_file_iread_at_fn_t io_module_file_iread_at;
|
|
|
|
mca_io_base_module_file_iwrite_at_fn_t io_module_file_iwrite_at;
|
|
|
|
mca_io_base_module_file_iread_at_all_fn_t io_module_file_iread_at_all;
|
|
|
|
mca_io_base_module_file_iwrite_at_all_fn_t io_module_file_iwrite_at_all;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_read_fn_t io_module_file_read;
|
|
|
|
mca_io_base_module_file_read_all_fn_t io_module_file_read_all;
|
|
|
|
mca_io_base_module_file_write_fn_t io_module_file_write;
|
|
|
|
mca_io_base_module_file_write_all_fn_t io_module_file_write_all;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_iread_fn_t io_module_file_iread;
|
|
|
|
mca_io_base_module_file_iwrite_fn_t io_module_file_iwrite;
|
2015-07-06 18:39:09 +03:00
|
|
|
mca_io_base_module_file_iread_all_fn_t io_module_file_iread_all;
|
|
|
|
mca_io_base_module_file_iwrite_all_fn_t io_module_file_iwrite_all;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_seek_fn_t io_module_file_seek;
|
|
|
|
mca_io_base_module_file_get_position_fn_t io_module_file_get_position;
|
|
|
|
mca_io_base_module_file_get_byte_offset_fn_t io_module_file_get_byte_offset;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_read_shared_fn_t io_module_file_read_shared;
|
|
|
|
mca_io_base_module_file_write_shared_fn_t io_module_file_write_shared;
|
|
|
|
mca_io_base_module_file_iread_shared_fn_t io_module_file_iread_shared;
|
|
|
|
mca_io_base_module_file_iwrite_shared_fn_t io_module_file_iwrite_shared;
|
|
|
|
mca_io_base_module_file_read_ordered_fn_t io_module_file_read_ordered;
|
|
|
|
mca_io_base_module_file_write_ordered_fn_t io_module_file_write_ordered;
|
|
|
|
mca_io_base_module_file_seek_shared_fn_t io_module_file_seek_shared;
|
|
|
|
mca_io_base_module_file_get_position_shared_fn_t io_module_file_get_position_shared;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_read_at_all_begin_fn_t io_module_file_read_at_all_begin;
|
|
|
|
mca_io_base_module_file_read_at_all_end_fn_t io_module_file_read_at_all_end;
|
|
|
|
mca_io_base_module_file_write_at_all_begin_fn_t io_module_file_write_at_all_begin;
|
|
|
|
mca_io_base_module_file_write_at_all_end_fn_t io_module_file_write_at_all_end;
|
|
|
|
mca_io_base_module_file_read_all_begin_fn_t io_module_file_read_all_begin;
|
|
|
|
mca_io_base_module_file_read_all_end_fn_t io_module_file_read_all_end;
|
|
|
|
mca_io_base_module_file_write_all_begin_fn_t io_module_file_write_all_begin;
|
|
|
|
mca_io_base_module_file_write_all_end_fn_t io_module_file_write_all_end;
|
|
|
|
mca_io_base_module_file_read_ordered_begin_fn_t io_module_file_read_ordered_begin;
|
|
|
|
mca_io_base_module_file_read_ordered_end_fn_t io_module_file_read_ordered_end;
|
|
|
|
mca_io_base_module_file_write_ordered_begin_fn_t io_module_file_write_ordered_begin;
|
|
|
|
mca_io_base_module_file_write_ordered_end_fn_t io_module_file_write_ordered_end;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_get_type_extent_fn_t io_module_file_get_type_extent;
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
mca_io_base_module_file_set_atomicity_fn_t io_module_file_set_atomicity;
|
|
|
|
mca_io_base_module_file_get_atomicity_fn_t io_module_file_get_atomicity;
|
|
|
|
mca_io_base_module_file_sync_fn_t io_module_file_sync;
|
2004-01-16 03:35:44 +03:00
|
|
|
};
|
2008-08-06 16:16:54 +04:00
|
|
|
typedef struct mca_io_base_module_2_0_0_t mca_io_base_module_2_0_0_t;
|
2004-01-16 03:35:44 +03:00
|
|
|
|
2004-01-09 11:27:58 +03:00
|
|
|
|
2004-09-14 14:55:10 +04:00
|
|
|
/*
|
|
|
|
* All module versions
|
|
|
|
*/
|
|
|
|
union mca_io_base_modules_t {
|
2008-08-06 16:16:54 +04:00
|
|
|
mca_io_base_module_2_0_0_t v2_0_0;
|
2004-09-14 14:55:10 +04:00
|
|
|
};
|
|
|
|
typedef union mca_io_base_modules_t mca_io_base_modules_t;
|
|
|
|
|
2004-01-09 11:27:58 +03:00
|
|
|
#endif /* MCA_IO_H */
|