2015-04-18 09:36:05 -06:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2011-08-25 20:08:17 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2007 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-23 20:59:57 -07:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2011-08-25 20:08:17 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2017-03-02 10:30:11 -06:00
|
|
|
* Copyright (c) 2008-2017 University of Houston. All rights reserved.
|
2015-04-18 09:36:05 -06:00
|
|
|
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2015-05-08 09:19:02 +09:00
|
|
|
* Copyright (c) 2015 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
Major structural changes to data types: .super infosubscriber
ompi_communicator_t, ompi_win_t, ompi_file_t all have a super class of type opal_infosubscriber_t instead of a base/super type of opal_object_t (in previous code comm used c_base, but file used super). It may be a bit bold to say that being a subscriber of MPI_Info is the foundational piece that ties these three things together, but if you object, then I would prefer to turn infosubscriber into a more general name that encompasses other common features rather than create a different super class. The key here is that we want to be able to pass comm, win and file objects as if they were opal_infosubscriber_t, so that one routine can heandle all 3 types of objects being passed to it.
MPI_INFO_NULL is still an ompi_predefined_info_t type since an MPI_Info is part of ompi but the internal details of the underlying information concept is part of opal.
An ompi_info_t type still exists for exposure to the user, but it is simply a wrapper for the opal object.
Routines such as ompi_info_dup, etc have all been moved to opal_info_dup and related to the opal directory.
Fortran to C translation tables are only used for MPI_Info that is exposed to the application and are therefore part of the ompi_info_t and not the opal_info_t
The data structure changes are primarily in the following files:
communicator/communicator.h
ompi/info/info.h
ompi/win/win.h
ompi/file/file.h
The following new files were created:
opal/util/info.h
opal/util/info.c
opal/util/info_subscriber.h
opal/util/info_subscriber.c
This infosubscriber concept is that communicators, files and windows can have subscribers that subscribe to any changes in the info associated with the comm/file/window. When xxx_set_info is called, the new info is presented to each subscriber who can modify the info in any way they want. The new value is presented to the next subscriber and so on until all subscribers have had a chance to modify the value. Therefore, the order of subscribers can make a difference but we hope that there is generally only one subscriber that cares or modifies any given key/value pair. The final info is then stored and returned by a call to xxx_get_info.
The new model can be seen in the following files:
ompi/mpi/c/comm_get_info.c
ompi/mpi/c/comm_set_info.c
ompi/mpi/c/file_get_info.c
ompi/mpi/c/file_set_info.c
ompi/mpi/c/win_get_info.c
ompi/mpi/c/win_set_info.c
The current subscribers where changed as follows:
mca/io/ompio/io_ompio_file_open.c
mca/io/ompio/io_ompio_module.c
mca/osc/rmda/osc_rdma_component.c (This one actually subscribes to "no_locks")
mca/osc/sm/osc_sm_component.c (This one actually subscribes to "blocking_fence" and "alloc_shared_contig")
Signed-off-by: Mark Allen <markalle@us.ibm.com>
Conflicts:
AUTHORS
ompi/communicator/comm.c
ompi/debuggers/ompi_mpihandles_dll.c
ompi/file/file.c
ompi/file/file.h
ompi/info/info.c
ompi/mca/io/ompio/io_ompio.h
ompi/mca/io/ompio/io_ompio_file_open.c
ompi/mca/io/ompio/io_ompio_file_set_view.c
ompi/mca/osc/pt2pt/osc_pt2pt.h
ompi/mca/sharedfp/addproc/sharedfp_addproc.h
ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c
ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c
ompi/mpi/c/lookup_name.c
ompi/mpi/c/publish_name.c
ompi/mpi/c/unpublish_name.c
opal/mca/mpool/base/mpool_base_alloc.c
opal/util/Makefile.am
2016-01-22 12:02:01 -05:00
|
|
|
* Copyright (c) 2016 IBM Corp. All rights reserved.
|
2011-08-25 20:08:17 +00:00
|
|
|
* $COPYRIGHT$
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2011-08-25 20:08:17 +00:00
|
|
|
* Additional copyrights may follow
|
2015-06-23 20:59:57 -07:00
|
|
|
*
|
2011-08-25 20:08:17 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#include "mpi.h"
|
|
|
|
#include "opal/class/opal_list.h"
|
|
|
|
#include "opal/threads/mutex.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "ompi/mca/io/io.h"
|
2017-03-02 10:30:11 -06:00
|
|
|
#include "ompi/mca/fs/base/base.h"
|
2011-08-25 20:08:17 +00:00
|
|
|
#include "io_ompio.h"
|
|
|
|
|
2016-11-15 10:09:43 -06:00
|
|
|
int mca_io_ompio_cycle_buffer_size = OMPIO_DEFAULT_CYCLE_BUF_SIZE;
|
2011-08-25 20:08:17 +00:00
|
|
|
int mca_io_ompio_bytes_per_agg = OMPIO_PREALLOC_MAX_BUF_SIZE;
|
2014-07-23 19:03:14 +00:00
|
|
|
int mca_io_ompio_num_aggregators = -1;
|
2012-10-04 21:53:26 +00:00
|
|
|
int mca_io_ompio_record_offset_info = 0;
|
2012-10-11 21:14:07 +00:00
|
|
|
int mca_io_ompio_coll_timing_info = 0;
|
2017-01-23 08:59:22 -06:00
|
|
|
int mca_io_ompio_sharedfp_lazy_open = 0;
|
2011-08-25 20:08:17 +00:00
|
|
|
|
2015-11-16 08:15:00 -06:00
|
|
|
int mca_io_ompio_grouping_option=5;
|
2014-12-16 15:48:40 -06:00
|
|
|
|
2011-08-25 20:08:17 +00:00
|
|
|
/*
|
|
|
|
* Private functions
|
|
|
|
*/
|
2013-03-27 21:09:41 +00:00
|
|
|
static int register_component(void);
|
2011-08-25 20:08:17 +00:00
|
|
|
static int open_component(void);
|
|
|
|
static int close_component(void);
|
|
|
|
static int init_query(bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads);
|
2015-06-23 20:59:57 -07:00
|
|
|
static const struct mca_io_base_module_2_0_0_t *
|
|
|
|
file_query (struct ompi_file_t *file,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_file_t **private_data,
|
|
|
|
int *priority);
|
2015-06-23 20:59:57 -07:00
|
|
|
static int file_unquery(struct ompi_file_t *file,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_file_t *private_data);
|
|
|
|
|
Major structural changes to data types: .super infosubscriber
ompi_communicator_t, ompi_win_t, ompi_file_t all have a super class of type opal_infosubscriber_t instead of a base/super type of opal_object_t (in previous code comm used c_base, but file used super). It may be a bit bold to say that being a subscriber of MPI_Info is the foundational piece that ties these three things together, but if you object, then I would prefer to turn infosubscriber into a more general name that encompasses other common features rather than create a different super class. The key here is that we want to be able to pass comm, win and file objects as if they were opal_infosubscriber_t, so that one routine can heandle all 3 types of objects being passed to it.
MPI_INFO_NULL is still an ompi_predefined_info_t type since an MPI_Info is part of ompi but the internal details of the underlying information concept is part of opal.
An ompi_info_t type still exists for exposure to the user, but it is simply a wrapper for the opal object.
Routines such as ompi_info_dup, etc have all been moved to opal_info_dup and related to the opal directory.
Fortran to C translation tables are only used for MPI_Info that is exposed to the application and are therefore part of the ompi_info_t and not the opal_info_t
The data structure changes are primarily in the following files:
communicator/communicator.h
ompi/info/info.h
ompi/win/win.h
ompi/file/file.h
The following new files were created:
opal/util/info.h
opal/util/info.c
opal/util/info_subscriber.h
opal/util/info_subscriber.c
This infosubscriber concept is that communicators, files and windows can have subscribers that subscribe to any changes in the info associated with the comm/file/window. When xxx_set_info is called, the new info is presented to each subscriber who can modify the info in any way they want. The new value is presented to the next subscriber and so on until all subscribers have had a chance to modify the value. Therefore, the order of subscribers can make a difference but we hope that there is generally only one subscriber that cares or modifies any given key/value pair. The final info is then stored and returned by a call to xxx_get_info.
The new model can be seen in the following files:
ompi/mpi/c/comm_get_info.c
ompi/mpi/c/comm_set_info.c
ompi/mpi/c/file_get_info.c
ompi/mpi/c/file_set_info.c
ompi/mpi/c/win_get_info.c
ompi/mpi/c/win_set_info.c
The current subscribers where changed as follows:
mca/io/ompio/io_ompio_file_open.c
mca/io/ompio/io_ompio_module.c
mca/osc/rmda/osc_rdma_component.c (This one actually subscribes to "no_locks")
mca/osc/sm/osc_sm_component.c (This one actually subscribes to "blocking_fence" and "alloc_shared_contig")
Signed-off-by: Mark Allen <markalle@us.ibm.com>
Conflicts:
AUTHORS
ompi/communicator/comm.c
ompi/debuggers/ompi_mpihandles_dll.c
ompi/file/file.c
ompi/file/file.h
ompi/info/info.c
ompi/mca/io/ompio/io_ompio.h
ompi/mca/io/ompio/io_ompio_file_open.c
ompi/mca/io/ompio/io_ompio_file_set_view.c
ompi/mca/osc/pt2pt/osc_pt2pt.h
ompi/mca/sharedfp/addproc/sharedfp_addproc.h
ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c
ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c
ompi/mpi/c/lookup_name.c
ompi/mpi/c/publish_name.c
ompi/mpi/c/unpublish_name.c
opal/mca/mpool/base/mpool_base_alloc.c
opal/util/Makefile.am
2016-01-22 12:02:01 -05:00
|
|
|
static int delete_query(const char *filename, struct opal_info_t *info,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_delete_t **private_data,
|
|
|
|
bool *usable, int *priorty);
|
|
|
|
|
Major structural changes to data types: .super infosubscriber
ompi_communicator_t, ompi_win_t, ompi_file_t all have a super class of type opal_infosubscriber_t instead of a base/super type of opal_object_t (in previous code comm used c_base, but file used super). It may be a bit bold to say that being a subscriber of MPI_Info is the foundational piece that ties these three things together, but if you object, then I would prefer to turn infosubscriber into a more general name that encompasses other common features rather than create a different super class. The key here is that we want to be able to pass comm, win and file objects as if they were opal_infosubscriber_t, so that one routine can heandle all 3 types of objects being passed to it.
MPI_INFO_NULL is still an ompi_predefined_info_t type since an MPI_Info is part of ompi but the internal details of the underlying information concept is part of opal.
An ompi_info_t type still exists for exposure to the user, but it is simply a wrapper for the opal object.
Routines such as ompi_info_dup, etc have all been moved to opal_info_dup and related to the opal directory.
Fortran to C translation tables are only used for MPI_Info that is exposed to the application and are therefore part of the ompi_info_t and not the opal_info_t
The data structure changes are primarily in the following files:
communicator/communicator.h
ompi/info/info.h
ompi/win/win.h
ompi/file/file.h
The following new files were created:
opal/util/info.h
opal/util/info.c
opal/util/info_subscriber.h
opal/util/info_subscriber.c
This infosubscriber concept is that communicators, files and windows can have subscribers that subscribe to any changes in the info associated with the comm/file/window. When xxx_set_info is called, the new info is presented to each subscriber who can modify the info in any way they want. The new value is presented to the next subscriber and so on until all subscribers have had a chance to modify the value. Therefore, the order of subscribers can make a difference but we hope that there is generally only one subscriber that cares or modifies any given key/value pair. The final info is then stored and returned by a call to xxx_get_info.
The new model can be seen in the following files:
ompi/mpi/c/comm_get_info.c
ompi/mpi/c/comm_set_info.c
ompi/mpi/c/file_get_info.c
ompi/mpi/c/file_set_info.c
ompi/mpi/c/win_get_info.c
ompi/mpi/c/win_set_info.c
The current subscribers where changed as follows:
mca/io/ompio/io_ompio_file_open.c
mca/io/ompio/io_ompio_module.c
mca/osc/rmda/osc_rdma_component.c (This one actually subscribes to "no_locks")
mca/osc/sm/osc_sm_component.c (This one actually subscribes to "blocking_fence" and "alloc_shared_contig")
Signed-off-by: Mark Allen <markalle@us.ibm.com>
Conflicts:
AUTHORS
ompi/communicator/comm.c
ompi/debuggers/ompi_mpihandles_dll.c
ompi/file/file.c
ompi/file/file.h
ompi/info/info.c
ompi/mca/io/ompio/io_ompio.h
ompi/mca/io/ompio/io_ompio_file_open.c
ompi/mca/io/ompio/io_ompio_file_set_view.c
ompi/mca/osc/pt2pt/osc_pt2pt.h
ompi/mca/sharedfp/addproc/sharedfp_addproc.h
ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c
ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c
ompi/mpi/c/lookup_name.c
ompi/mpi/c/publish_name.c
ompi/mpi/c/unpublish_name.c
opal/mca/mpool/base/mpool_base_alloc.c
opal/util/Makefile.am
2016-01-22 12:02:01 -05:00
|
|
|
static int delete_select(const char *filename, struct opal_info_t *info,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_delete_t *private_data);
|
|
|
|
|
2015-09-03 10:33:45 +09:00
|
|
|
static int register_datarep(const char *,
|
2011-08-25 20:08:17 +00:00
|
|
|
MPI_Datarep_conversion_function*,
|
|
|
|
MPI_Datarep_conversion_function*,
|
|
|
|
MPI_Datarep_extent_function*,
|
|
|
|
void*);
|
2015-09-03 10:33:45 +09:00
|
|
|
/*
|
|
|
|
static int io_progress(void);
|
|
|
|
|
2011-08-25 20:08:17 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Private variables
|
|
|
|
*/
|
2014-07-03 20:04:58 +00:00
|
|
|
static int priority_param = 30;
|
|
|
|
static int delete_priority_param = 30;
|
2011-08-25 20:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global, component-wide OMPIO mutex because OMPIO is not thread safe
|
|
|
|
*/
|
2015-05-08 09:19:02 +09:00
|
|
|
opal_mutex_t mca_io_ompio_mutex = {{0}};
|
2011-08-25 20:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global list of requests for this component
|
|
|
|
*/
|
2015-05-08 09:19:02 +09:00
|
|
|
opal_list_t mca_io_ompio_pending_requests = {{0}};
|
2011-08-25 20:08:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public string showing this component's version number
|
|
|
|
*/
|
|
|
|
const char *mca_io_ompio_component_version_string =
|
|
|
|
"OMPI/MPI OMPIO io MCA component version " OMPI_VERSION;
|
|
|
|
|
|
|
|
|
|
|
|
mca_io_base_component_2_0_0_t mca_io_ompio_component = {
|
|
|
|
/* First, the mca_base_component_t struct containing meta information
|
|
|
|
about the component itself */
|
|
|
|
|
2015-04-18 09:36:05 -06:00
|
|
|
.io_version = {
|
2011-08-25 20:08:17 +00:00
|
|
|
MCA_IO_BASE_VERSION_2_0_0,
|
2015-04-18 09:36:05 -06:00
|
|
|
.mca_component_name = "ompio",
|
|
|
|
MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
|
|
|
|
OMPI_RELEASE_VERSION),
|
|
|
|
.mca_open_component = open_component,
|
|
|
|
.mca_close_component = close_component,
|
2013-07-22 21:11:05 +00:00
|
|
|
.mca_register_component_params = register_component,
|
2011-08-25 20:08:17 +00:00
|
|
|
},
|
2015-04-18 09:36:05 -06:00
|
|
|
.io_data = {
|
2011-08-25 20:08:17 +00:00
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Initial configuration / Open a new file */
|
|
|
|
|
2015-04-18 09:36:05 -06:00
|
|
|
.io_init_query = init_query,
|
|
|
|
.io_file_query = file_query,
|
|
|
|
.io_file_unquery = file_unquery,
|
2011-08-25 20:08:17 +00:00
|
|
|
|
|
|
|
/* Delete a file */
|
|
|
|
|
2015-04-18 09:36:05 -06:00
|
|
|
.io_delete_query = delete_query,
|
|
|
|
.io_delete_select = delete_select,
|
2015-09-03 10:33:45 +09:00
|
|
|
|
|
|
|
.io_register_datarep = register_datarep,
|
2011-08-25 20:08:17 +00:00
|
|
|
};
|
|
|
|
|
2013-03-27 21:09:41 +00:00
|
|
|
static int register_component(void)
|
2011-08-25 20:08:17 +00:00
|
|
|
{
|
2014-07-23 19:03:14 +00:00
|
|
|
priority_param = 30;
|
2013-03-27 21:09:41 +00:00
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"priority", "Priority of the io ompio component",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&priority_param);
|
2015-07-27 15:53:40 -05:00
|
|
|
delete_priority_param = 30;
|
2013-03-27 21:09:41 +00:00
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"delete_priority", "Delete priority of the io ompio component",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&delete_priority_param);
|
|
|
|
|
|
|
|
mca_io_ompio_record_offset_info = 0;
|
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"record_file_offset_info",
|
|
|
|
"The information of the file offset/length",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_io_ompio_record_offset_info);
|
|
|
|
|
|
|
|
mca_io_ompio_coll_timing_info = 0;
|
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"coll_timing_info",
|
|
|
|
"Enable collective algorithm timing information",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_io_ompio_coll_timing_info);
|
|
|
|
|
2016-11-15 10:09:43 -06:00
|
|
|
mca_io_ompio_cycle_buffer_size = OMPIO_DEFAULT_CYCLE_BUF_SIZE;
|
2013-03-27 21:09:41 +00:00
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"cycle_buffer_size",
|
2015-08-07 13:06:39 -05:00
|
|
|
"Data size issued by individual reads/writes per call",
|
2013-03-27 21:09:41 +00:00
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_io_ompio_cycle_buffer_size);
|
|
|
|
|
|
|
|
mca_io_ompio_bytes_per_agg = OMPIO_PREALLOC_MAX_BUF_SIZE;
|
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"bytes_per_agg",
|
2014-07-23 19:03:14 +00:00
|
|
|
"Size of temporary buffer for collective I/O operations",
|
2013-03-27 21:09:41 +00:00
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_io_ompio_bytes_per_agg);
|
2011-08-25 20:08:17 +00:00
|
|
|
|
2014-07-23 19:03:14 +00:00
|
|
|
mca_io_ompio_num_aggregators = -1;
|
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"num_aggregators",
|
|
|
|
"number of aggregators for collective I/O operations",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_io_ompio_num_aggregators);
|
|
|
|
|
2014-12-16 15:48:40 -06:00
|
|
|
|
2017-01-23 08:59:22 -06:00
|
|
|
mca_io_ompio_sharedfp_lazy_open = 0;
|
2013-07-17 21:30:50 +00:00
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"sharedfp_lazy_open",
|
|
|
|
"lazy allocation of internal shared file pointer structures",
|
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_io_ompio_sharedfp_lazy_open);
|
|
|
|
|
2015-11-16 08:15:00 -06:00
|
|
|
mca_io_ompio_grouping_option = 5;
|
2014-12-16 15:48:40 -06:00
|
|
|
(void) mca_base_component_var_register(&mca_io_ompio_component.io_version,
|
|
|
|
"grouping_option",
|
2015-11-12 14:37:07 -06:00
|
|
|
"Option for grouping of processes in the aggregator selection "
|
2015-11-16 08:15:00 -06:00
|
|
|
"1: Data volume based grouping 2: maximizing group size uniformity 3: maximimze "
|
|
|
|
"data contiguity 4: hybrid optimization 5: simple (default) "
|
2015-11-12 14:37:07 -06:00
|
|
|
"6: skip refinement step",
|
2014-12-16 15:48:40 -06:00
|
|
|
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
|
|
|
|
OPAL_INFO_LVL_9,
|
|
|
|
MCA_BASE_VAR_SCOPE_READONLY,
|
|
|
|
&mca_io_ompio_grouping_option);
|
2015-06-23 20:59:57 -07:00
|
|
|
|
2013-03-27 21:09:41 +00:00
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int open_component(void)
|
|
|
|
{
|
2011-08-25 20:08:17 +00:00
|
|
|
/* Create the mutex */
|
|
|
|
OBJ_CONSTRUCT(&mca_io_ompio_mutex, opal_mutex_t);
|
|
|
|
|
|
|
|
/* Create the list of pending requests */
|
|
|
|
|
|
|
|
OBJ_CONSTRUCT(&mca_io_ompio_pending_requests, opal_list_t);
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int close_component(void)
|
|
|
|
{
|
|
|
|
/* Destroy the list of pending requests */
|
|
|
|
/* JMS: Good opprotunity here to list out all the IO requests that
|
|
|
|
were not destroyed / completed upon MPI_FINALIZE */
|
|
|
|
|
|
|
|
OBJ_DESTRUCT(&mca_io_ompio_pending_requests);
|
|
|
|
|
|
|
|
OBJ_DESTRUCT(&mca_io_ompio_mutex);
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int init_query(bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads)
|
|
|
|
{
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static const struct mca_io_base_module_2_0_0_t *
|
2015-06-23 20:59:57 -07:00
|
|
|
file_query(struct ompi_file_t *file,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_file_t **private_data,
|
|
|
|
int *priority)
|
|
|
|
{
|
|
|
|
mca_io_ompio_data_t *data;
|
2017-03-02 10:30:11 -06:00
|
|
|
char *tmp;
|
|
|
|
int rank;
|
|
|
|
int is_lustre=0; //false
|
|
|
|
|
|
|
|
tmp = strchr (file->f_filename, ':');
|
|
|
|
rank = ompi_comm_rank ( file->f_comm);
|
|
|
|
if (!tmp) {
|
|
|
|
if ( 0 == rank) {
|
|
|
|
if (LUSTRE == mca_fs_base_get_fstype(file->f_filename)) {
|
|
|
|
is_lustre = 1; //true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
file->f_comm->c_coll->coll_bcast (&is_lustre,
|
|
|
|
1,
|
|
|
|
MPI_INT,
|
|
|
|
0,
|
|
|
|
file->f_comm,
|
|
|
|
file->f_comm->c_coll->coll_bcast_module);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
if (!strncasecmp(file->f_filename, "lustre:", 7) ) {
|
|
|
|
is_lustre = 1;
|
|
|
|
}
|
|
|
|
}
|
2011-08-25 20:08:17 +00:00
|
|
|
|
2017-03-02 10:30:11 -06:00
|
|
|
if (is_lustre) {
|
|
|
|
*priority = 1;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
*priority = priority_param;
|
|
|
|
}
|
2011-08-25 20:08:17 +00:00
|
|
|
|
|
|
|
/* Allocate a space for this module to hang private data (e.g.,
|
|
|
|
the OMPIO file handle) */
|
|
|
|
|
2015-07-20 10:03:16 -05:00
|
|
|
data = calloc(1, sizeof(mca_io_ompio_data_t));
|
2011-08-25 20:08:17 +00:00
|
|
|
if (NULL == data) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
*private_data = (struct mca_io_base_file_t*) data;
|
|
|
|
|
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return &mca_io_ompio_module;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-06-23 20:59:57 -07:00
|
|
|
static int file_unquery(struct ompi_file_t *file,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_file_t *private_data)
|
|
|
|
{
|
|
|
|
/* Free the ompio module-specific data that was allocated in
|
|
|
|
_file_query(), above */
|
|
|
|
|
|
|
|
if (NULL != private_data) {
|
|
|
|
free(private_data);
|
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Major structural changes to data types: .super infosubscriber
ompi_communicator_t, ompi_win_t, ompi_file_t all have a super class of type opal_infosubscriber_t instead of a base/super type of opal_object_t (in previous code comm used c_base, but file used super). It may be a bit bold to say that being a subscriber of MPI_Info is the foundational piece that ties these three things together, but if you object, then I would prefer to turn infosubscriber into a more general name that encompasses other common features rather than create a different super class. The key here is that we want to be able to pass comm, win and file objects as if they were opal_infosubscriber_t, so that one routine can heandle all 3 types of objects being passed to it.
MPI_INFO_NULL is still an ompi_predefined_info_t type since an MPI_Info is part of ompi but the internal details of the underlying information concept is part of opal.
An ompi_info_t type still exists for exposure to the user, but it is simply a wrapper for the opal object.
Routines such as ompi_info_dup, etc have all been moved to opal_info_dup and related to the opal directory.
Fortran to C translation tables are only used for MPI_Info that is exposed to the application and are therefore part of the ompi_info_t and not the opal_info_t
The data structure changes are primarily in the following files:
communicator/communicator.h
ompi/info/info.h
ompi/win/win.h
ompi/file/file.h
The following new files were created:
opal/util/info.h
opal/util/info.c
opal/util/info_subscriber.h
opal/util/info_subscriber.c
This infosubscriber concept is that communicators, files and windows can have subscribers that subscribe to any changes in the info associated with the comm/file/window. When xxx_set_info is called, the new info is presented to each subscriber who can modify the info in any way they want. The new value is presented to the next subscriber and so on until all subscribers have had a chance to modify the value. Therefore, the order of subscribers can make a difference but we hope that there is generally only one subscriber that cares or modifies any given key/value pair. The final info is then stored and returned by a call to xxx_get_info.
The new model can be seen in the following files:
ompi/mpi/c/comm_get_info.c
ompi/mpi/c/comm_set_info.c
ompi/mpi/c/file_get_info.c
ompi/mpi/c/file_set_info.c
ompi/mpi/c/win_get_info.c
ompi/mpi/c/win_set_info.c
The current subscribers where changed as follows:
mca/io/ompio/io_ompio_file_open.c
mca/io/ompio/io_ompio_module.c
mca/osc/rmda/osc_rdma_component.c (This one actually subscribes to "no_locks")
mca/osc/sm/osc_sm_component.c (This one actually subscribes to "blocking_fence" and "alloc_shared_contig")
Signed-off-by: Mark Allen <markalle@us.ibm.com>
Conflicts:
AUTHORS
ompi/communicator/comm.c
ompi/debuggers/ompi_mpihandles_dll.c
ompi/file/file.c
ompi/file/file.h
ompi/info/info.c
ompi/mca/io/ompio/io_ompio.h
ompi/mca/io/ompio/io_ompio_file_open.c
ompi/mca/io/ompio/io_ompio_file_set_view.c
ompi/mca/osc/pt2pt/osc_pt2pt.h
ompi/mca/sharedfp/addproc/sharedfp_addproc.h
ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c
ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c
ompi/mpi/c/lookup_name.c
ompi/mpi/c/publish_name.c
ompi/mpi/c/unpublish_name.c
opal/mca/mpool/base/mpool_base_alloc.c
opal/util/Makefile.am
2016-01-22 12:02:01 -05:00
|
|
|
static int delete_query(const char *filename, struct opal_info_t *info,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_delete_t **private_data,
|
|
|
|
bool *usable, int *priority)
|
|
|
|
{
|
2013-03-27 21:09:41 +00:00
|
|
|
*priority = delete_priority_param;
|
2011-08-25 20:08:17 +00:00
|
|
|
*usable = true;
|
|
|
|
*private_data = NULL;
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
Major structural changes to data types: .super infosubscriber
ompi_communicator_t, ompi_win_t, ompi_file_t all have a super class of type opal_infosubscriber_t instead of a base/super type of opal_object_t (in previous code comm used c_base, but file used super). It may be a bit bold to say that being a subscriber of MPI_Info is the foundational piece that ties these three things together, but if you object, then I would prefer to turn infosubscriber into a more general name that encompasses other common features rather than create a different super class. The key here is that we want to be able to pass comm, win and file objects as if they were opal_infosubscriber_t, so that one routine can heandle all 3 types of objects being passed to it.
MPI_INFO_NULL is still an ompi_predefined_info_t type since an MPI_Info is part of ompi but the internal details of the underlying information concept is part of opal.
An ompi_info_t type still exists for exposure to the user, but it is simply a wrapper for the opal object.
Routines such as ompi_info_dup, etc have all been moved to opal_info_dup and related to the opal directory.
Fortran to C translation tables are only used for MPI_Info that is exposed to the application and are therefore part of the ompi_info_t and not the opal_info_t
The data structure changes are primarily in the following files:
communicator/communicator.h
ompi/info/info.h
ompi/win/win.h
ompi/file/file.h
The following new files were created:
opal/util/info.h
opal/util/info.c
opal/util/info_subscriber.h
opal/util/info_subscriber.c
This infosubscriber concept is that communicators, files and windows can have subscribers that subscribe to any changes in the info associated with the comm/file/window. When xxx_set_info is called, the new info is presented to each subscriber who can modify the info in any way they want. The new value is presented to the next subscriber and so on until all subscribers have had a chance to modify the value. Therefore, the order of subscribers can make a difference but we hope that there is generally only one subscriber that cares or modifies any given key/value pair. The final info is then stored and returned by a call to xxx_get_info.
The new model can be seen in the following files:
ompi/mpi/c/comm_get_info.c
ompi/mpi/c/comm_set_info.c
ompi/mpi/c/file_get_info.c
ompi/mpi/c/file_set_info.c
ompi/mpi/c/win_get_info.c
ompi/mpi/c/win_set_info.c
The current subscribers where changed as follows:
mca/io/ompio/io_ompio_file_open.c
mca/io/ompio/io_ompio_module.c
mca/osc/rmda/osc_rdma_component.c (This one actually subscribes to "no_locks")
mca/osc/sm/osc_sm_component.c (This one actually subscribes to "blocking_fence" and "alloc_shared_contig")
Signed-off-by: Mark Allen <markalle@us.ibm.com>
Conflicts:
AUTHORS
ompi/communicator/comm.c
ompi/debuggers/ompi_mpihandles_dll.c
ompi/file/file.c
ompi/file/file.h
ompi/info/info.c
ompi/mca/io/ompio/io_ompio.h
ompi/mca/io/ompio/io_ompio_file_open.c
ompi/mca/io/ompio/io_ompio_file_set_view.c
ompi/mca/osc/pt2pt/osc_pt2pt.h
ompi/mca/sharedfp/addproc/sharedfp_addproc.h
ompi/mca/sharedfp/addproc/sharedfp_addproc_file_open.c
ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c
ompi/mpi/c/lookup_name.c
ompi/mpi/c/publish_name.c
ompi/mpi/c/unpublish_name.c
opal/mca/mpool/base/mpool_base_alloc.c
opal/util/Makefile.am
2016-01-22 12:02:01 -05:00
|
|
|
static int delete_select(const char *filename, struct opal_info_t *info,
|
2011-08-25 20:08:17 +00:00
|
|
|
struct mca_io_base_delete_t *private_data)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
OPAL_THREAD_LOCK (&mca_io_ompio_mutex);
|
|
|
|
ret = mca_io_ompio_file_delete (filename, info);
|
|
|
|
OPAL_THREAD_UNLOCK (&mca_io_ompio_mutex);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2015-09-03 10:33:45 +09:00
|
|
|
|
|
|
|
static int register_datarep(const char * datarep,
|
|
|
|
MPI_Datarep_conversion_function* read_fn,
|
|
|
|
MPI_Datarep_conversion_function* write_fn,
|
|
|
|
MPI_Datarep_extent_function* extent_fn,
|
|
|
|
void* state)
|
|
|
|
{
|
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
|
|
|
|
2011-08-25 20:08:17 +00:00
|
|
|
/*
|
|
|
|
static int io_progress (void)
|
|
|
|
{
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
*/
|