From cd45c7abb625168fc35abc124e9a233886b61b65 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Wed, 13 Jun 2018 14:51:29 +0900 Subject: [PATCH] ompio: misc renames Signed-off-by: Gilles Gouaillardet --- ompi/mca/common/ompio/common_ompio.h | 84 ++++++++--------- .../common/ompio/common_ompio_aggregators.c | 30 +++--- .../common/ompio/common_ompio_aggregators.h | 28 +++--- .../mca/common/ompio/common_ompio_file_open.c | 20 ++-- .../mca/common/ompio/common_ompio_file_read.c | 16 ++-- .../mca/common/ompio/common_ompio_file_view.c | 6 +- .../common/ompio/common_ompio_file_write.c | 22 ++--- .../common/ompio/common_ompio_print_queue.c | 2 +- .../common/ompio/common_ompio_print_queue.h | 4 +- ompi/mca/fbtl/base/base.h | 13 ++- ompi/mca/fbtl/base/fbtl_base_file_select.c | 4 +- ompi/mca/fbtl/base/fbtl_base_file_unselect.c | 4 +- ompi/mca/fbtl/fbtl.h | 20 ++-- ompi/mca/fbtl/posix/fbtl_posix.c | 10 +- ompi/mca/fbtl/posix/fbtl_posix.h | 24 ++--- ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c | 4 +- ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c | 4 +- ompi/mca/fbtl/posix/fbtl_posix_lock.c | 6 +- ompi/mca/fbtl/posix/fbtl_posix_preadv.c | 4 +- ompi/mca/fbtl/posix/fbtl_posix_pwritev.c | 4 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c | 10 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h | 18 ++-- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c | 4 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c | 4 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c | 4 +- ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c | 4 +- ompi/mca/fcoll/base/base.h | 13 ++- ompi/mca/fcoll/base/fcoll_base_file_select.c | 6 +- .../mca/fcoll/base/fcoll_base_file_unselect.c | 4 +- ompi/mca/fcoll/dynamic/fcoll_dynamic.h | 14 +-- .../dynamic/fcoll_dynamic_file_read_all.c | 12 +-- .../dynamic/fcoll_dynamic_file_write_all.c | 12 +-- ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c | 10 +- .../fcoll/dynamic_gen2/fcoll_dynamic_gen2.h | 14 +-- .../fcoll_dynamic_gen2_file_read_all.c | 12 +-- .../fcoll_dynamic_gen2_file_write_all.c | 26 ++--- .../dynamic_gen2/fcoll_dynamic_gen2_module.c | 10 +- ompi/mca/fcoll/fcoll.h | 20 ++-- ompi/mca/fcoll/individual/fcoll_individual.h | 14 +-- .../fcoll_individual_file_read_all.c | 4 +- .../fcoll_individual_file_write_all.c | 4 +- .../individual/fcoll_individual_module.c | 10 +- ompi/mca/fcoll/two_phase/fcoll_two_phase.h | 28 +++--- .../two_phase/fcoll_two_phase_file_read_all.c | 34 +++---- .../fcoll_two_phase_file_write_all.c | 42 ++++----- .../fcoll/two_phase/fcoll_two_phase_module.c | 10 +- .../two_phase/fcoll_two_phase_support_fns.c | 26 ++--- ompi/mca/fcoll/vulcan/fcoll_vulcan.h | 14 +-- .../fcoll/vulcan/fcoll_vulcan_file_read_all.c | 12 +-- .../vulcan/fcoll_vulcan_file_write_all.c | 30 +++--- ompi/mca/fcoll/vulcan/fcoll_vulcan_module.c | 10 +- ompi/mca/fs/base/base.h | 13 ++- ompi/mca/fs/base/fs_base_file_select.c | 4 +- ompi/mca/fs/base/fs_base_file_unselect.c | 4 +- ompi/mca/fs/fs.h | 22 ++--- ompi/mca/fs/lustre/fs_lustre.c | 10 +- ompi/mca/fs/lustre/fs_lustre.h | 22 ++--- ompi/mca/fs/lustre/fs_lustre_file_close.c | 4 +- ompi/mca/fs/lustre/fs_lustre_file_get_size.c | 4 +- ompi/mca/fs/lustre/fs_lustre_file_open.c | 4 +- ompi/mca/fs/lustre/fs_lustre_file_set_size.c | 4 +- ompi/mca/fs/lustre/fs_lustre_file_sync.c | 4 +- ompi/mca/fs/pvfs2/fs_pvfs2.c | 10 +- ompi/mca/fs/pvfs2/fs_pvfs2.h | 22 ++--- ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c | 4 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c | 4 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c | 4 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c | 4 +- ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c | 4 +- ompi/mca/fs/ufs/fs_ufs.c | 10 +- ompi/mca/fs/ufs/fs_ufs.h | 22 ++--- ompi/mca/fs/ufs/fs_ufs_file_close.c | 4 +- ompi/mca/fs/ufs/fs_ufs_file_get_size.c | 4 +- ompi/mca/fs/ufs/fs_ufs_file_open.c | 4 +- ompi/mca/fs/ufs/fs_ufs_file_set_size.c | 4 +- ompi/mca/fs/ufs/fs_ufs_file_sync.c | 4 +- ompi/mca/io/ompio/io_ompio.c | 2 +- ompi/mca/io/ompio/io_ompio.h | 4 +- ompi/mca/io/ompio/io_ompio_component.c | 4 +- ompi/mca/io/ompio/io_ompio_file_open.c | 62 ++++++------ ompi/mca/io/ompio/io_ompio_file_read.c | 92 +++++++++--------- ompi/mca/io/ompio/io_ompio_file_set_view.c | 18 ++-- ompi/mca/io/ompio/io_ompio_file_write.c | 94 +++++++++---------- ompi/mca/sharedfp/base/base.h | 13 ++- .../sharedfp/base/sharedfp_base_file_select.c | 4 +- .../base/sharedfp_base_file_unselect.c | 4 +- .../sharedfp/individual/sharedfp_individual.c | 10 +- .../sharedfp/individual/sharedfp_individual.h | 42 ++++----- .../sharedfp_individual_file_open.c | 18 ++-- .../sharedfp_individual_get_position.c | 4 +- .../individual/sharedfp_individual_iwrite.c | 8 +- .../individual/sharedfp_individual_read.c | 12 ++- .../individual/sharedfp_individual_seek.c | 4 +- .../individual/sharedfp_individual_write.c | 6 +- .../sharedfp/lockedfile/sharedfp_lockedfile.c | 10 +- .../sharedfp/lockedfile/sharedfp_lockedfile.h | 38 ++++---- .../sharedfp_lockedfile_file_open.c | 14 +-- .../sharedfp_lockedfile_get_position.c | 4 +- .../lockedfile/sharedfp_lockedfile_iread.c | 6 +- .../lockedfile/sharedfp_lockedfile_iwrite.c | 6 +- .../lockedfile/sharedfp_lockedfile_read.c | 6 +- .../lockedfile/sharedfp_lockedfile_seek.c | 4 +- .../lockedfile/sharedfp_lockedfile_write.c | 6 +- ompi/mca/sharedfp/sharedfp.h | 42 ++++----- ompi/mca/sharedfp/sm/sharedfp_sm.c | 10 +- ompi/mca/sharedfp/sm/sharedfp_sm.h | 38 ++++---- ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c | 14 +-- .../sharedfp/sm/sharedfp_sm_get_position.c | 4 +- ompi/mca/sharedfp/sm/sharedfp_sm_iread.c | 8 +- ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c | 8 +- ompi/mca/sharedfp/sm/sharedfp_sm_read.c | 6 +- ompi/mca/sharedfp/sm/sharedfp_sm_seek.c | 4 +- ompi/mca/sharedfp/sm/sharedfp_sm_write.c | 6 +- 113 files changed, 844 insertions(+), 734 deletions(-) diff --git a/ompi/mca/common/ompio/common_ompio.h b/ompi/mca/common/ompio/common_ompio.h index 5a844ca522..82abd089fb 100644 --- a/ompi/mca/common/ompio/common_ompio.h +++ b/ompi/mca/common/ompio/common_ompio.h @@ -102,33 +102,33 @@ enum ompio_fs_type PLFS = 4 }; -typedef struct mca_io_ompio_io_array_t { +typedef struct mca_common_ompio_io_array_t { void *memory_address; /* we need that of type OMPI_MPI_OFFSET_TYPE */ void *offset; size_t length; - /*mca_io_ompio_server_t io_server;*/ -} mca_io_ompio_io_array_t; + /*mca_common_ompio_server_t io_server;*/ +} mca_common_ompio_io_array_t; -typedef struct mca_io_ompio_access_array_t{ +typedef struct mca_common_ompio_access_array_t{ OMPI_MPI_OFFSET_TYPE *offsets; int *lens; MPI_Aint *mem_ptrs; int count; -} mca_io_ompio_access_array_t; +} mca_common_ompio_access_array_t; /* forward declaration to keep the compiler happy. */ -struct mca_io_ompio_file_t; -typedef int (*mca_io_ompio_generate_current_file_view_fn_t) (struct mca_io_ompio_file_t *fh, - size_t max_data, - struct iovec **f_iov, - int *iov_count); +struct ompio_file_t; +typedef int (*mca_common_ompio_generate_current_file_view_fn_t) (struct ompio_file_t *fh, + size_t max_data, + struct iovec **f_iov, + int *iov_count); /* functions to retrieve the number of aggregators and the size of the temporary buffer on aggregators from the fcoll modules */ -typedef int (*mca_io_ompio_get_mca_parameter_value_fn_t) ( char *mca_parameter_name, int name_length ); +typedef int (*mca_common_ompio_get_mca_parameter_value_fn_t) ( char *mca_parameter_name, int name_length ); struct mca_common_ompio_print_queue; @@ -136,7 +136,7 @@ struct mca_common_ompio_print_queue; /** * Back-end structure for MPI_File */ -struct mca_io_ompio_file_t { +struct ompio_file_t { /* General parameters */ int fd; struct ompi_file_t *f_fh; /* pointer back to the file_t structure */ @@ -183,7 +183,7 @@ struct mca_io_ompio_file_t { size_t f_etype_size; /* contains IO requests that needs to be read/written */ - mca_io_ompio_io_array_t *f_io_array; + mca_common_ompio_io_array_t *f_io_array; int f_num_of_io_entries; /* Hooks for modules to hang things */ @@ -215,85 +215,85 @@ struct mca_io_ompio_file_t { int f_procs_per_group; /* internal ompio functions required by fbtl and fcoll */ - mca_io_ompio_generate_current_file_view_fn_t f_generate_current_file_view; + mca_common_ompio_generate_current_file_view_fn_t f_generate_current_file_view; - mca_io_ompio_get_mca_parameter_value_fn_t f_get_mca_parameter_value; + mca_common_ompio_get_mca_parameter_value_fn_t f_get_mca_parameter_value; }; -typedef struct mca_io_ompio_file_t mca_io_ompio_file_t; +typedef struct ompio_file_t ompio_file_t; -struct mca_io_ompio_data_t { - mca_io_ompio_file_t ompio_fh; +struct mca_common_ompio_data_t { + ompio_file_t ompio_fh; }; -typedef struct mca_io_ompio_data_t mca_io_ompio_data_t; +typedef struct mca_common_ompio_data_t mca_common_ompio_data_t; #include "common_ompio_print_queue.h" #include "common_ompio_aggregators.h" -OMPI_DECLSPEC int mca_common_ompio_file_write (mca_io_ompio_file_t *fh, const void *buf, int count, +OMPI_DECLSPEC int mca_common_ompio_file_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -OMPI_DECLSPEC int mca_common_ompio_file_write_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, +OMPI_DECLSPEC int mca_common_ompio_file_write_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -OMPI_DECLSPEC int mca_common_ompio_file_iwrite (mca_io_ompio_file_t *fh, const void *buf, int count, +OMPI_DECLSPEC int mca_common_ompio_file_iwrite (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, +OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -OMPI_DECLSPEC int mca_common_ompio_file_write_at_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, +OMPI_DECLSPEC int mca_common_ompio_file_write_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, const void *buf, +OMPI_DECLSPEC int mca_common_ompio_file_iwrite_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -OMPI_DECLSPEC int mca_common_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles, +OMPI_DECLSPEC int mca_common_ompio_build_io_array ( ompio_file_t *fh, int index, int cycles, size_t bytes_per_cycle, int max_data, uint32_t iov_count, struct iovec *decoded_iov, int *ii, int *jj, size_t *tbw, size_t *spc ); -OMPI_DECLSPEC int mca_common_ompio_file_read (mca_io_ompio_file_t *fh, void *buf, int count, +OMPI_DECLSPEC int mca_common_ompio_file_read (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -OMPI_DECLSPEC int mca_common_ompio_file_read_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, +OMPI_DECLSPEC int mca_common_ompio_file_read_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -OMPI_DECLSPEC int mca_common_ompio_file_iread (mca_io_ompio_file_t *fh, void *buf, int count, +OMPI_DECLSPEC int mca_common_ompio_file_iread (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -OMPI_DECLSPEC int mca_common_ompio_file_iread_at (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, +OMPI_DECLSPEC int mca_common_ompio_file_iread_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -OMPI_DECLSPEC int mca_common_ompio_file_read_at_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, +OMPI_DECLSPEC int mca_common_ompio_file_read_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -OMPI_DECLSPEC int mca_common_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, +OMPI_DECLSPEC int mca_common_ompio_file_iread_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); OMPI_DECLSPEC int mca_common_ompio_file_open (ompi_communicator_t *comm, const char *filename, int amode, opal_info_t *info, - mca_io_ompio_file_t *ompio_fh, bool use_sharedfp); + ompio_file_t *ompio_fh, bool use_sharedfp); int mca_common_ompio_file_delete (const char *filename, struct opal_info_t *info); -OMPI_DECLSPEC int mca_common_ompio_file_close (mca_io_ompio_file_t *ompio_fh); -OMPI_DECLSPEC int mca_common_ompio_file_get_size (mca_io_ompio_file_t *ompio_fh, OMPI_MPI_OFFSET_TYPE *size); -OMPI_DECLSPEC int mca_common_ompio_file_get_position (mca_io_ompio_file_t *fh,OMPI_MPI_OFFSET_TYPE *offset); -OMPI_DECLSPEC int mca_common_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset); -OMPI_DECLSPEC int mca_common_ompio_set_file_defaults (mca_io_ompio_file_t *fh); -OMPI_DECLSPEC int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE disp, +OMPI_DECLSPEC int mca_common_ompio_file_close (ompio_file_t *ompio_fh); +OMPI_DECLSPEC int mca_common_ompio_file_get_size (ompio_file_t *ompio_fh, OMPI_MPI_OFFSET_TYPE *size); +OMPI_DECLSPEC int mca_common_ompio_file_get_position (ompio_file_t *fh,OMPI_MPI_OFFSET_TYPE *offset); +OMPI_DECLSPEC int mca_common_ompio_set_explicit_offset (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset); +OMPI_DECLSPEC int mca_common_ompio_set_file_defaults (ompio_file_t *fh); +OMPI_DECLSPEC int mca_common_ompio_set_view (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE disp, ompi_datatype_t *etype, ompi_datatype_t *filetype, const char *datarep, opal_info_t *info); @@ -302,7 +302,7 @@ OMPI_DECLSPEC int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, OMPI_MPI_ * Function that takes in a datatype and buffer, and decodes that datatype * into an iovec using the convertor_raw function */ -OMPI_DECLSPEC int mca_common_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, +OMPI_DECLSPEC int mca_common_ompio_decode_datatype (struct ompio_file_t *fh, struct ompi_datatype_t *datatype, int count, const void *buf, @@ -310,6 +310,6 @@ OMPI_DECLSPEC int mca_common_ompio_decode_datatype (struct mca_io_ompio_file_t * struct iovec **iov, uint32_t *iov_count); -OMPI_DECLSPEC int mca_common_ompio_set_callbacks(mca_io_ompio_generate_current_file_view_fn_t generate_current_file_view, - mca_io_ompio_get_mca_parameter_value_fn_t get_mca_parameter_value); +OMPI_DECLSPEC int mca_common_ompio_set_callbacks(mca_common_ompio_generate_current_file_view_fn_t generate_current_file_view, + mca_common_ompio_get_mca_parameter_value_fn_t get_mca_parameter_value); #endif /* MCA_COMMON_OMPIO_H */ diff --git a/ompi/mca/common/ompio/common_ompio_aggregators.c b/ompi/mca/common/ompio/common_ompio_aggregators.c index 303f5a119b..90082253c5 100644 --- a/ompi/mca/common/ompio/common_ompio_aggregators.c +++ b/ompi/mca/common/ompio/common_ompio_aggregators.c @@ -13,7 +13,7 @@ * Copyright (c) 2008-2017 University of Houston. All rights reserved. * Copyright (c) 2011-2018 Cisco Systems, Inc. All rights reserved * Copyright (c) 2012-2013 Inria. All rights reserved. - * Copyright (c) 2015-2017 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -57,7 +57,7 @@ static double cost_calc (int P, int P_agg, size_t Data_proc, size_t coll_buffer, #define DIM1 1 #define DIM2 2 -int mca_common_ompio_simple_grouping(mca_io_ompio_file_t *fh, +int mca_common_ompio_simple_grouping(ompio_file_t *fh, int *num_groups_out, mca_common_ompio_contg *contg_groups) { @@ -186,7 +186,7 @@ int mca_common_ompio_simple_grouping(mca_io_ompio_file_t *fh, return mca_common_ompio_forced_grouping ( fh, num_groups, contg_groups); } -int mca_common_ompio_forced_grouping ( mca_io_ompio_file_t *fh, +int mca_common_ompio_forced_grouping ( ompio_file_t *fh, int num_groups, mca_common_ompio_contg *contg_groups) { @@ -224,7 +224,7 @@ int mca_common_ompio_forced_grouping ( mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_common_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, +int mca_common_ompio_fview_based_grouping(ompio_file_t *fh, int *num_groups, mca_common_ompio_contg *contg_groups) { @@ -321,7 +321,7 @@ exit: return ret; } -int mca_common_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh, +int mca_common_ompio_cart_based_grouping(ompio_file_t *ompio_fh, int *num_groups, mca_common_ompio_contg *contg_groups) { @@ -448,7 +448,7 @@ exit: -int mca_common_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, +int mca_common_ompio_finalize_initial_grouping(ompio_file_t *fh, int num_groups, mca_common_ompio_contg *contg_groups) { @@ -501,7 +501,7 @@ int mca_common_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, ** of aggregators. */ -int mca_common_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, +int mca_common_ompio_set_aggregator_props (struct ompio_file_t *fh, int num_aggregators, size_t bytes_per_proc) { @@ -546,7 +546,7 @@ int mca_common_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, /*****************************************************************************************************/ /*****************************************************************************************************/ /*****************************************************************************************************/ -int mca_common_ompio_create_groups(mca_io_ompio_file_t *fh, +int mca_common_ompio_create_groups(ompio_file_t *fh, size_t bytes_per_proc) { @@ -681,7 +681,7 @@ exit: return ret; } -int mca_common_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, +int mca_common_ompio_merge_initial_groups(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group, int *decision_list, int is_aggregator){ @@ -881,7 +881,7 @@ exit: return ret; } -int mca_common_ompio_split_initial_groups(mca_io_ompio_file_t *fh, +int mca_common_ompio_split_initial_groups(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets_lens, OMPI_MPI_OFFSET_TYPE *end_offsets, OMPI_MPI_OFFSET_TYPE bytes_per_group){ @@ -1018,7 +1018,7 @@ int mca_common_ompio_split_initial_groups(mca_io_ompio_file_t *fh, } -int mca_common_ompio_retain_initial_groups(mca_io_ompio_file_t *fh){ +int mca_common_ompio_retain_initial_groups(ompio_file_t *fh){ int i = 0; @@ -1036,7 +1036,7 @@ int mca_common_ompio_retain_initial_groups(mca_io_ompio_file_t *fh){ return OMPI_SUCCESS; } -int mca_common_ompio_merge_groups(mca_io_ompio_file_t *fh, +int mca_common_ompio_merge_groups(ompio_file_t *fh, int *merge_aggrs, int num_merge_aggrs) { @@ -1125,7 +1125,7 @@ exit: -int mca_common_ompio_split_a_group(mca_io_ompio_file_t *fh, +int mca_common_ompio_split_a_group(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets_lens, OMPI_MPI_OFFSET_TYPE *end_offsets, int size_new_group, @@ -1186,7 +1186,7 @@ int mca_common_ompio_split_a_group(mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_common_ompio_finalize_split(mca_io_ompio_file_t *fh, +int mca_common_ompio_finalize_split(ompio_file_t *fh, int size_new_group, int size_last_group) { @@ -1240,7 +1240,7 @@ int mca_common_ompio_finalize_split(mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_common_ompio_prepare_to_group(mca_io_ompio_file_t *fh, +int mca_common_ompio_prepare_to_group(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE **start_offsets_lens, OMPI_MPI_OFFSET_TYPE **end_offsets, // need it? OMPI_MPI_OFFSET_TYPE **aggr_bytes_per_group, diff --git a/ompi/mca/common/ompio/common_ompio_aggregators.h b/ompi/mca/common/ompio/common_ompio_aggregators.h index 8f2c6e579a..6a221e9afa 100644 --- a/ompi/mca/common/ompio/common_ompio_aggregators.h +++ b/ompi/mca/common/ompio/common_ompio_aggregators.h @@ -48,29 +48,29 @@ typedef struct{ /*Aggregator selection methods*/ -OMPI_DECLSPEC int mca_common_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, +OMPI_DECLSPEC int mca_common_ompio_set_aggregator_props (struct ompio_file_t *fh, int num_aggregators, size_t bytes_per_proc); -int mca_common_ompio_forced_grouping ( mca_io_ompio_file_t *fh, +int mca_common_ompio_forced_grouping ( ompio_file_t *fh, int num_groups, mca_common_ompio_contg *contg_groups); -int mca_common_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh, int *num_groups, +int mca_common_ompio_cart_based_grouping(ompio_file_t *ompio_fh, int *num_groups, mca_common_ompio_contg *contg_groups); -int mca_common_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, int *num_groups, +int mca_common_ompio_fview_based_grouping(ompio_file_t *fh, int *num_groups, mca_common_ompio_contg *contg_groups); -int mca_common_ompio_simple_grouping(mca_io_ompio_file_t *fh, int *num_groups, +int mca_common_ompio_simple_grouping(ompio_file_t *fh, int *num_groups, mca_common_ompio_contg *contg_groups); -int mca_common_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, int num_groups, +int mca_common_ompio_finalize_initial_grouping(ompio_file_t *fh, int num_groups, mca_common_ompio_contg *contg_groups); -int mca_common_ompio_create_groups(mca_io_ompio_file_t *fh, size_t bytes_per_proc); +int mca_common_ompio_create_groups(ompio_file_t *fh, size_t bytes_per_proc); -int mca_common_ompio_prepare_to_group(mca_io_ompio_file_t *fh, +int mca_common_ompio_prepare_to_group(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE **start_offsets_lens, OMPI_MPI_OFFSET_TYPE **end_offsets, OMPI_MPI_OFFSET_TYPE **aggr_bytes_per_group, @@ -80,16 +80,16 @@ int mca_common_ompio_prepare_to_group(mca_io_ompio_file_t *fh, int *is_aggregator, int *ompio_grouping_flag); -int mca_common_ompio_retain_initial_groups(mca_io_ompio_file_t *fh); +int mca_common_ompio_retain_initial_groups(ompio_file_t *fh); -int mca_common_ompio_split_initial_groups(mca_io_ompio_file_t *fh, +int mca_common_ompio_split_initial_groups(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets_lens, OMPI_MPI_OFFSET_TYPE *end_offsets, OMPI_MPI_OFFSET_TYPE bytes_per_group); -int mca_common_ompio_split_a_group(mca_io_ompio_file_t *fh, +int mca_common_ompio_split_a_group(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets_lens, OMPI_MPI_OFFSET_TYPE *end_offsets, int size_new_group, @@ -97,14 +97,14 @@ int mca_common_ompio_split_a_group(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *min_cci, int *num_groups, int *size_smallest_group); -int mca_common_ompio_finalize_split(mca_io_ompio_file_t *fh, int size_new_group, +int mca_common_ompio_finalize_split(ompio_file_t *fh, int size_new_group, int size_last_group); -int mca_common_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, +int mca_common_ompio_merge_initial_groups(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group, int *decision_list, int is_aggregator); -int mca_common_ompio_merge_groups(mca_io_ompio_file_t *fh, int *merge_aggrs, +int mca_common_ompio_merge_groups(ompio_file_t *fh, int *merge_aggrs, int num_merge_aggrs); diff --git a/ompi/mca/common/ompio/common_ompio_file_open.c b/ompi/mca/common/ompio/common_ompio_file_open.c index 5f4f7811f6..e0431d63be 100644 --- a/ompi/mca/common/ompio/common_ompio_file_open.c +++ b/ompi/mca/common/ompio/common_ompio_file_open.c @@ -41,14 +41,14 @@ #include "common_ompio.h" #include "ompi/mca/topo/topo.h" -static mca_io_ompio_generate_current_file_view_fn_t generate_current_file_view_fn; -static mca_io_ompio_get_mca_parameter_value_fn_t get_mca_parameter_value_fn; +static mca_common_ompio_generate_current_file_view_fn_t generate_current_file_view_fn; +static mca_common_ompio_get_mca_parameter_value_fn_t get_mca_parameter_value_fn; int mca_common_ompio_file_open (ompi_communicator_t *comm, const char *filename, int amode, opal_info_t *info, - mca_io_ompio_file_t *ompio_fh, bool use_sharedfp) + ompio_file_t *ompio_fh, bool use_sharedfp) { int ret = OMPI_SUCCESS; int remote_arch; @@ -228,7 +228,7 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm, return ret; } -int mca_common_ompio_file_close (mca_io_ompio_file_t *ompio_fh) +int mca_common_ompio_file_close (ompio_file_t *ompio_fh) { int ret = OMPI_SUCCESS; int delete_flag = 0; @@ -367,7 +367,7 @@ int mca_common_ompio_file_close (mca_io_ompio_file_t *ompio_fh) return ret; } -int mca_common_ompio_file_get_size (mca_io_ompio_file_t *ompio_fh, +int mca_common_ompio_file_get_size (ompio_file_t *ompio_fh, OMPI_MPI_OFFSET_TYPE *size) { int ret = OMPI_SUCCESS; @@ -378,7 +378,7 @@ int mca_common_ompio_file_get_size (mca_io_ompio_file_t *ompio_fh, } -int mca_common_ompio_file_get_position (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_get_position (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *offset) { OMPI_MPI_OFFSET_TYPE off; @@ -396,7 +396,7 @@ int mca_common_ompio_file_get_position (mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_common_ompio_set_file_defaults (mca_io_ompio_file_t *fh) +int mca_common_ompio_set_file_defaults (ompio_file_t *fh) { if (NULL != fh) { @@ -497,7 +497,7 @@ int mca_common_ompio_file_delete (const char *filename, return OMPI_SUCCESS; } -int mca_common_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, +int mca_common_ompio_decode_datatype (struct ompio_file_t *fh, ompi_datatype_t *datatype, int count, const void *buf, @@ -616,8 +616,8 @@ int mca_common_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_common_ompio_set_callbacks(mca_io_ompio_generate_current_file_view_fn_t generate_current_file_view, - mca_io_ompio_get_mca_parameter_value_fn_t get_mca_parameter_value) +int mca_common_ompio_set_callbacks(mca_common_ompio_generate_current_file_view_fn_t generate_current_file_view, + mca_common_ompio_get_mca_parameter_value_fn_t get_mca_parameter_value) { generate_current_file_view_fn = generate_current_file_view; get_mca_parameter_value_fn = get_mca_parameter_value; diff --git a/ompi/mca/common/ompio/common_ompio_file_read.c b/ompi/mca/common/ompio/common_ompio_file_read.c index 4bebf3e1d9..9b9c19a6b4 100644 --- a/ompi/mca/common/ompio/common_ompio_file_read.c +++ b/ompi/mca/common/ompio/common_ompio_file_read.c @@ -48,10 +48,10 @@ ** routesin are used e.g. from the shared file pointer modules. ** The main difference is, that the first one takes an ompi_file_t ** as a file pointer argument, while the second uses the ompio internal -** mca_io_ompio_file_t structure. +** ompio_file_t structure. */ -int mca_common_ompio_file_read (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_read (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, @@ -148,7 +148,7 @@ int mca_common_ompio_file_read (mca_io_ompio_file_t *fh, return ret; } -int mca_common_ompio_file_read_at (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_read_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, @@ -176,7 +176,7 @@ int mca_common_ompio_file_read_at (mca_io_ompio_file_t *fh, } -int mca_common_ompio_file_iread (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_iread (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, @@ -263,7 +263,7 @@ int mca_common_ompio_file_iread (mca_io_ompio_file_t *fh, } -int mca_common_ompio_file_iread_at (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_iread_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, @@ -296,7 +296,7 @@ int mca_common_ompio_file_iread_at (mca_io_ompio_file_t *fh, /* Infrastructure for collective operations */ -int mca_common_ompio_file_read_at_all (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_read_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, @@ -318,7 +318,7 @@ int mca_common_ompio_file_read_at_all (mca_io_ompio_file_t *fh, return ret; } -int mca_common_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, +int mca_common_ompio_file_iread_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, void *buf, int count, @@ -350,7 +350,7 @@ int mca_common_ompio_file_iread_at_all (mca_io_ompio_file_t *fp, return ret; } -int mca_common_ompio_set_explicit_offset (mca_io_ompio_file_t *fh, +int mca_common_ompio_set_explicit_offset (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset) { int i = 0; diff --git a/ompi/mca/common/ompio/common_ompio_file_view.c b/ompi/mca/common/ompio/common_ompio_file_view.c index d348480fa8..c424e50c1c 100644 --- a/ompi/mca/common/ompio/common_ompio_file_view.c +++ b/ompi/mca/common/ompio/common_ompio_file_view.c @@ -31,7 +31,7 @@ #include "ompi/mca/fcoll/base/base.h" #include "ompi/mca/topo/topo.h" -static OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (mca_io_ompio_file_t *, int flag); +static OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (ompio_file_t *, int flag); static int datatype_duplicate (ompi_datatype_t *oldtype, ompi_datatype_t **newtype ); static int datatype_duplicate (ompi_datatype_t *oldtype, ompi_datatype_t **newtype ) { @@ -54,7 +54,7 @@ static int datatype_duplicate (ompi_datatype_t *oldtype, ompi_datatype_t **newt } -int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, +int mca_common_ompio_set_view (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE disp, ompi_datatype_t *etype, ompi_datatype_t *filetype, @@ -290,7 +290,7 @@ exit: return ret; } -OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (mca_io_ompio_file_t *fh, int flag) +OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (ompio_file_t *fh, int flag) { int uniform = 0; OMPI_MPI_OFFSET_TYPE avg[3] = {0,0,0}; diff --git a/ompi/mca/common/ompio/common_ompio_file_write.c b/ompi/mca/common/ompio/common_ompio_file_write.c index d3cb9a66a4..c7d0c32e3d 100644 --- a/ompi/mca/common/ompio/common_ompio_file_write.c +++ b/ompi/mca/common/ompio/common_ompio_file_write.c @@ -34,7 +34,7 @@ #include "math.h" #include -int mca_common_ompio_file_write (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -121,7 +121,7 @@ int mca_common_ompio_file_write (mca_io_ompio_file_t *fh, return ret; } -int mca_common_ompio_file_write_at (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_write_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, @@ -145,7 +145,7 @@ int mca_common_ompio_file_write_at (mca_io_ompio_file_t *fh, return ret; } -int mca_common_ompio_file_iwrite (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_iwrite (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -228,7 +228,7 @@ int mca_common_ompio_file_iwrite (mca_io_ompio_file_t *fh, return ret; } -int mca_common_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_iwrite_at (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, @@ -262,7 +262,7 @@ int mca_common_ompio_file_iwrite_at (mca_io_ompio_file_t *fh, /* Collective operations */ /******************************************************************/ -int mca_common_ompio_file_write_at_all (mca_io_ompio_file_t *fh, +int mca_common_ompio_file_write_at_all (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, @@ -284,7 +284,7 @@ int mca_common_ompio_file_write_at_all (mca_io_ompio_file_t *fh, return ret; } -int mca_common_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fp, +int mca_common_ompio_file_iwrite_at_all (ompio_file_t *fp, OMPI_MPI_OFFSET_TYPE offset, const void *buf, int count, @@ -321,7 +321,7 @@ int mca_common_ompio_file_iwrite_at_all (mca_io_ompio_file_t *fp, /* Helper function used by both read and write operations */ /**************************************************************/ -int mca_common_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cycles, +int mca_common_ompio_build_io_array ( ompio_file_t *fh, int index, int cycles, size_t bytes_per_cycle, int max_data, uint32_t iov_count, struct iovec *decoded_iov, int *ii, int *jj, size_t *tbw, size_t *spc) @@ -347,8 +347,8 @@ int mca_common_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cy bytes_to_write_in_cycle = bytes_per_cycle; } - fh->f_io_array = (mca_io_ompio_io_array_t *)malloc - (OMPIO_IOVEC_INITIAL_SIZE * sizeof (mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *)malloc + (OMPIO_IOVEC_INITIAL_SIZE * sizeof (mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; @@ -358,9 +358,9 @@ int mca_common_ompio_build_io_array ( mca_io_ompio_file_t *fh, int index, int cy /* reallocate if needed */ if (OMPIO_IOVEC_INITIAL_SIZE*block <= k) { block ++; - fh->f_io_array = (mca_io_ompio_io_array_t *)realloc + fh->f_io_array = (mca_common_ompio_io_array_t *)realloc (fh->f_io_array, OMPIO_IOVEC_INITIAL_SIZE * - block * sizeof (mca_io_ompio_io_array_t)); + block * sizeof (mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; diff --git a/ompi/mca/common/ompio/common_ompio_print_queue.c b/ompi/mca/common/ompio/common_ompio_print_queue.c index 7cb7ef3e1d..b1de74b5a8 100644 --- a/ompi/mca/common/ompio/common_ompio_print_queue.c +++ b/ompi/mca/common/ompio/common_ompio_print_queue.c @@ -99,7 +99,7 @@ int mca_common_ompio_full_print_queue( struct mca_common_ompio_print_queue *q) int mca_common_ompio_print_time_info( struct mca_common_ompio_print_queue *q, char *name, - struct mca_io_ompio_file_t *fh){ + struct ompio_file_t *fh){ int i = 0, j=0, nprocs_for_coll = 0, ret = OMPI_SUCCESS, count = 0; double *time_details = NULL, *final_sum = NULL; diff --git a/ompi/mca/common/ompio/common_ompio_print_queue.h b/ompi/mca/common/ompio/common_ompio_print_queue.h index dbdcdcc659..2c475b1675 100644 --- a/ompi/mca/common/ompio/common_ompio_print_queue.h +++ b/ompi/mca/common/ompio/common_ompio_print_queue.h @@ -26,8 +26,6 @@ #include "mpi.h" -struct mca_io_ompio_file_t; - #define MCA_COMMON_OMPIO_QUEUESIZE 2048 /*To extract time-information */ @@ -61,7 +59,7 @@ OMPI_DECLSPEC int mca_common_ompio_full_print_queue( struct mca_common_ompio_pri OMPI_DECLSPEC int mca_common_ompio_initialize_print_queue(struct mca_common_ompio_print_queue **q); OMPI_DECLSPEC int mca_common_ompio_print_time_info( struct mca_common_ompio_print_queue *q, - char *name_operation, struct mca_io_ompio_file_t *fh); + char *name_operation, struct ompio_file_t *fh); END_C_DECLS diff --git a/ompi/mca/fbtl/base/base.h b/ompi/mca/fbtl/base/base.h index bc79eeb643..f5483511bd 100644 --- a/ompi/mca/fbtl/base/base.h +++ b/ompi/mca/fbtl/base/base.h @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,23 +32,24 @@ #include "ompi_config.h" #include "mpi.h" -#include "ompi/mca/fbtl/fbtl.h" #include "opal/mca/base/base.h" +#include "ompi/mca/common/ompio/common_ompio.h" +#include "ompi/mca/fbtl/fbtl.h" BEGIN_C_DECLS -OMPI_DECLSPEC int mca_fbtl_base_file_select(struct mca_io_ompio_file_t *file, +OMPI_DECLSPEC int mca_fbtl_base_file_select(struct ompio_file_t *file, mca_base_component_t *preferred); -OMPI_DECLSPEC int mca_fbtl_base_file_unselect(struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_fbtl_base_file_unselect(struct ompio_file_t *file); OMPI_DECLSPEC int mca_fbtl_base_find_available(bool enable_progress_threads, bool enable_mpi_threads); -OMPI_DECLSPEC int mca_fbtl_base_init_file (struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_fbtl_base_init_file (struct ompio_file_t *file); -OMPI_DECLSPEC int mca_fbtl_base_get_param (struct mca_io_ompio_file_t *file, int keyval); +OMPI_DECLSPEC int mca_fbtl_base_get_param (struct ompio_file_t *file, int keyval); /* * Globals */ diff --git a/ompi/mca/fbtl/base/fbtl_base_file_select.c b/ompi/mca/fbtl/base/fbtl_base_file_select.c index 1c133ace6a..e7b8055dde 100644 --- a/ompi/mca/fbtl/base/fbtl_base_file_select.c +++ b/ompi/mca/fbtl/base/fbtl_base_file_select.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -62,7 +64,7 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * their module but were unfortunate to not get selected */ -int mca_fbtl_base_file_select (struct mca_io_ompio_file_t *file, +int mca_fbtl_base_file_select (struct ompio_file_t *file, mca_base_component_t *preferred) { int priority; diff --git a/ompi/mca/fbtl/base/fbtl_base_file_unselect.c b/ompi/mca/fbtl/base/fbtl_base_file_unselect.c index bf54f6c802..5f7a3d8caa 100644 --- a/ompi/mca/fbtl/base/fbtl_base_file_unselect.c +++ b/ompi/mca/fbtl/base/fbtl_base_file_unselect.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +33,7 @@ #include "ompi/mca/fbtl/base/base.h" #include "ompi/mca/common/ompio/common_ompio.h" -int mca_fbtl_base_file_unselect(mca_io_ompio_file_t *file) +int mca_fbtl_base_file_unselect(ompio_file_t *file) { if (NULL != file->f_fbtl && NULL != file->f_fbtl->fbtl_module_finalize) { return file->f_fbtl->fbtl_module_finalize(file); diff --git a/ompi/mca/fbtl/fbtl.h b/ompi/mca/fbtl/fbtl.h index 83ddb7c8f3..0299a992e9 100644 --- a/ompi/mca/fbtl/fbtl.h +++ b/ompi/mca/fbtl/fbtl.h @@ -13,6 +13,8 @@ * Copyright (c) 2008-2014 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -34,7 +36,7 @@ BEGIN_C_DECLS -struct mca_io_ompio_file_t; +struct ompio_file_t; struct mca_ompio_request_t; /* @@ -81,11 +83,11 @@ typedef int (*mca_fbtl_base_component_init_query_1_0_0_fn_t) bool enable_mpi_threads); typedef struct mca_fbtl_base_module_1_0_0_t * -(*mca_fbtl_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file, +(*mca_fbtl_base_component_file_query_1_0_0_fn_t) (struct ompio_file_t *file, int *priority); typedef int (*mca_fbtl_base_component_file_unquery_1_0_0_fn_t) - (struct mca_io_ompio_file_t *file); + (struct ompio_file_t *file); /* * ****************** component struct ****************************** @@ -112,21 +114,21 @@ typedef struct mca_fbtl_base_component_2_0_0_t mca_fbtl_base_component_t; */ typedef int (*mca_fbtl_base_module_init_1_0_0_fn_t) - (struct mca_io_ompio_file_t *file); + (struct ompio_file_t *file); typedef int (*mca_fbtl_base_module_finalize_1_0_0_fn_t) - (struct mca_io_ompio_file_t *file); + (struct ompio_file_t *file); typedef ssize_t (*mca_fbtl_base_module_preadv_fn_t) - (struct mca_io_ompio_file_t *file ); + (struct ompio_file_t *file ); typedef ssize_t (*mca_fbtl_base_module_pwritev_fn_t) - (struct mca_io_ompio_file_t *file ); + (struct ompio_file_t *file ); typedef ssize_t (*mca_fbtl_base_module_ipreadv_fn_t) - (struct mca_io_ompio_file_t *file, + (struct ompio_file_t *file, ompi_request_t *request); typedef ssize_t (*mca_fbtl_base_module_ipwritev_fn_t) - (struct mca_io_ompio_file_t *file, + (struct ompio_file_t *file, ompi_request_t *request); typedef bool (*mca_fbtl_base_module_progress_fn_t) ( struct mca_ompio_request_t *request); diff --git a/ompi/mca/fbtl/posix/fbtl_posix.c b/ompi/mca/fbtl/posix/fbtl_posix.c index f8c1c46385..f557636acc 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix.c +++ b/ompi/mca/fbtl/posix/fbtl_posix.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2018 Cisco Systems, Inc. All rights reserved + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -77,7 +79,7 @@ int mca_fbtl_posix_component_init_query(bool enable_progress_threads, } struct mca_fbtl_base_module_1_0_0_t * -mca_fbtl_posix_component_file_query (mca_io_ompio_file_t *fh, int *priority) { +mca_fbtl_posix_component_file_query (ompio_file_t *fh, int *priority) { *priority = mca_fbtl_posix_priority; if (UFS == fh->f_fstype) { @@ -89,7 +91,7 @@ mca_fbtl_posix_component_file_query (mca_io_ompio_file_t *fh, int *priority) { return &posix; } -int mca_fbtl_posix_component_file_unquery (mca_io_ompio_file_t *file) { +int mca_fbtl_posix_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ @@ -97,7 +99,7 @@ int mca_fbtl_posix_component_file_unquery (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fbtl_posix_module_init (mca_io_ompio_file_t *file) { +int mca_fbtl_posix_module_init (ompio_file_t *file) { #if defined (FBTL_POSIX_HAVE_AIO) long val = sysconf(_SC_AIO_MAX); @@ -109,7 +111,7 @@ int mca_fbtl_posix_module_init (mca_io_ompio_file_t *file) { } -int mca_fbtl_posix_module_finalize (mca_io_ompio_file_t *file) { +int mca_fbtl_posix_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fbtl/posix/fbtl_posix.h b/ompi/mca/fbtl/posix/fbtl_posix.h index fd594ace81..b9f1c1149e 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix.h +++ b/ompi/mca/fbtl/posix/fbtl_posix.h @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2018 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,11 +35,11 @@ BEGIN_C_DECLS int mca_fbtl_posix_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fbtl_base_module_1_0_0_t * -mca_fbtl_posix_component_file_query (mca_io_ompio_file_t *file, int *priority); -int mca_fbtl_posix_component_file_unquery (mca_io_ompio_file_t *file); +mca_fbtl_posix_component_file_query (ompio_file_t *file, int *priority); +int mca_fbtl_posix_component_file_unquery (ompio_file_t *file); -int mca_fbtl_posix_module_init (mca_io_ompio_file_t *file); -int mca_fbtl_posix_module_finalize (mca_io_ompio_file_t *file); +int mca_fbtl_posix_module_init (ompio_file_t *file); +int mca_fbtl_posix_module_finalize (ompio_file_t *file); extern int fbtl_posix_max_aio_active_reqs; @@ -48,19 +50,19 @@ OMPI_MODULE_DECLSPEC extern mca_fbtl_base_component_2_0_0_t mca_fbtl_posix_compo * ****************************************************************** */ -ssize_t mca_fbtl_posix_preadv (mca_io_ompio_file_t *file ); -ssize_t mca_fbtl_posix_pwritev (mca_io_ompio_file_t *file ); -ssize_t mca_fbtl_posix_ipreadv (mca_io_ompio_file_t *file, +ssize_t mca_fbtl_posix_preadv (ompio_file_t *file ); +ssize_t mca_fbtl_posix_pwritev (ompio_file_t *file ); +ssize_t mca_fbtl_posix_ipreadv (ompio_file_t *file, ompi_request_t *request); -ssize_t mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *file, +ssize_t mca_fbtl_posix_ipwritev (ompio_file_t *file, ompi_request_t *request); bool mca_fbtl_posix_progress ( mca_ompio_request_t *req); void mca_fbtl_posix_request_free ( mca_ompio_request_t *req); -int mca_fbtl_posix_lock ( struct flock *lock, mca_io_ompio_file_t *fh, int op, +int mca_fbtl_posix_lock ( struct flock *lock, ompio_file_t *fh, int op, OMPI_MPI_OFFSET_TYPE iov_offset, off_t len, int flags); -void mca_fbtl_posix_unlock ( struct flock *lock, mca_io_ompio_file_t *fh ); +void mca_fbtl_posix_unlock ( struct flock *lock, ompio_file_t *fh ); struct mca_fbtl_posix_request_data_t { @@ -74,7 +76,7 @@ struct mca_fbtl_posix_request_data_t { int *aio_req_status; /* array of statuses */ ssize_t aio_total_len; /* total amount of data written */ struct flock aio_lock; /* lock used for certain file systems */ - mca_io_ompio_file_t *aio_fh; /* pointer back to the mca_io_ompio_fh structure */ + ompio_file_t *aio_fh; /* pointer back to the mca_io_ompio_fh structure */ }; typedef struct mca_fbtl_posix_request_data_t mca_fbtl_posix_request_data_t; diff --git a/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c b/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c index 0b56d8334a..6b5476b584 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_ipreadv.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -33,7 +33,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_posix_ipreadv (mca_io_ompio_file_t *fh, +ssize_t mca_fbtl_posix_ipreadv (ompio_file_t *fh, ompi_request_t *request) { #if defined (FBTL_POSIX_HAVE_AIO) diff --git a/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c b/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c index 11790f453f..0cabdc1408 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_ipwritev.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -32,7 +32,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_posix_ipwritev (mca_io_ompio_file_t *fh, +ssize_t mca_fbtl_posix_ipwritev (ompio_file_t *fh, ompi_request_t *request) { #if defined(FBTL_POSIX_HAVE_AIO) diff --git a/ompi/mca/fbtl/posix/fbtl_posix_lock.c b/ompi/mca/fbtl/posix/fbtl_posix_lock.c index b59ec057e9..5056c3a054 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_lock.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_lock.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2017 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -41,7 +43,7 @@ Support for MPI atomicity operations are envisioned, but not yet tested. */ -int mca_fbtl_posix_lock ( struct flock *lock, mca_io_ompio_file_t *fh, int op, +int mca_fbtl_posix_lock ( struct flock *lock, ompio_file_t *fh, int op, OMPI_MPI_OFFSET_TYPE offset, off_t len, int flags) { off_t lmod, bmod; @@ -131,7 +133,7 @@ int mca_fbtl_posix_lock ( struct flock *lock, mca_io_ompio_file_t *fh, int op, return ret; } -void mca_fbtl_posix_unlock ( struct flock *lock, mca_io_ompio_file_t *fh ) +void mca_fbtl_posix_unlock ( struct flock *lock, ompio_file_t *fh ) { if ( -1 == lock->l_start && -1 == lock->l_len ) { return; diff --git a/ompi/mca/fbtl/posix/fbtl_posix_preadv.c b/ompi/mca/fbtl/posix/fbtl_posix_preadv.c index 5f5593c827..f8a031a926 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_preadv.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_preadv.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2017 University of Houston. All rights reserved. - * Copyright (c) 2015-2017 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -28,7 +28,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_posix_preadv (mca_io_ompio_file_t *fh ) +ssize_t mca_fbtl_posix_preadv (ompio_file_t *fh ) { /*int *fp = NULL;*/ int i, block=1, ret; diff --git a/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c b/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c index c6a640290d..7ad6e6d9d2 100644 --- a/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c +++ b/ompi/mca/fbtl/posix/fbtl_posix_pwritev.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2017 University of Houston. All rights reserved. - * Copyright (c) 2015-2017 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -30,7 +30,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_posix_pwritev(mca_io_ompio_file_t *fh ) +ssize_t mca_fbtl_posix_pwritev(ompio_file_t *fh ) { /*int *fp = NULL;*/ int i, block = 1, ret; diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c index 3289fcd62a..5345a720c4 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -57,7 +59,7 @@ int mca_fbtl_pvfs2_component_init_query(bool enable_progress_threads, } struct mca_fbtl_base_module_1_0_0_t * -mca_fbtl_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) { +mca_fbtl_pvfs2_component_file_query (ompio_file_t *fh, int *priority) { *priority = mca_fbtl_pvfs2_priority; if (PVFS2 == fh->f_fstype) { @@ -69,7 +71,7 @@ mca_fbtl_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) { return &pvfs2; } -int mca_fbtl_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) { +int mca_fbtl_pvfs2_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need * to be undone if this module is not selected */ @@ -77,11 +79,11 @@ int mca_fbtl_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fbtl_pvfs2_module_init (mca_io_ompio_file_t *file) { +int mca_fbtl_pvfs2_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fbtl_pvfs2_module_finalize (mca_io_ompio_file_t *file) { +int mca_fbtl_pvfs2_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h index 270d8e7b81..63fcd274e7 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2.h @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -44,11 +46,11 @@ BEGIN_C_DECLS int mca_fbtl_pvfs2_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fbtl_base_module_1_0_0_t * -mca_fbtl_pvfs2_component_file_query (mca_io_ompio_file_t *file, int *priority); -int mca_fbtl_pvfs2_component_file_unquery (mca_io_ompio_file_t *file); +mca_fbtl_pvfs2_component_file_query (ompio_file_t *file, int *priority); +int mca_fbtl_pvfs2_component_file_unquery (ompio_file_t *file); -int mca_fbtl_pvfs2_module_init (mca_io_ompio_file_t *file); -int mca_fbtl_pvfs2_module_finalize (mca_io_ompio_file_t *file); +int mca_fbtl_pvfs2_module_init (ompio_file_t *file); +int mca_fbtl_pvfs2_module_finalize (ompio_file_t *file); OMPI_MODULE_DECLSPEC extern mca_fbtl_base_component_2_0_0_t mca_fbtl_pvfs2_component; /* @@ -57,11 +59,11 @@ OMPI_MODULE_DECLSPEC extern mca_fbtl_base_component_2_0_0_t mca_fbtl_pvfs2_compo * ****************************************************************** */ -ssize_t mca_fbtl_pvfs2_preadv (mca_io_ompio_file_t *file); -ssize_t mca_fbtl_pvfs2_pwritev (mca_io_ompio_file_t *file); -ssize_t mca_fbtl_pvfs2_ipreadv (mca_io_ompio_file_t *file, +ssize_t mca_fbtl_pvfs2_preadv (ompio_file_t *file); +ssize_t mca_fbtl_pvfs2_pwritev (ompio_file_t *file); +ssize_t mca_fbtl_pvfs2_ipreadv (ompio_file_t *file, ompi_request_t **request); -ssize_t mca_fbtl_pvfs2_ipwritev (mca_io_ompio_file_t *file, +ssize_t mca_fbtl_pvfs2_ipwritev (ompio_file_t *file, ompi_request_t **request); /* diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c index 75a5edee54..eaf99c6f28 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipreadv.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -25,7 +27,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_pvfs2_ipreadv (mca_io_ompio_file_t *file, +ssize_t mca_fbtl_pvfs2_ipreadv (ompio_file_t *file, ompi_request_t **request) { printf ("PVFS2 IPREADV\n"); diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c index 0915f3a0c7..b6e46c2681 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_ipwritev.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -25,7 +27,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_pvfs2_ipwritev (mca_io_ompio_file_t *file, +ssize_t mca_fbtl_pvfs2_ipwritev (ompio_file_t *file, ompi_request_t **request) { printf ("PVFS2 IPWRITEV\n"); diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c index 362c6e789b..898e4d8d0c 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_preadv.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2014 University of Houston. All rights reserved. - * Copyright (c) 2017 Research Organization for Information Science + * Copyright (c) 2017-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -32,7 +32,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_pvfs2_preadv (mca_io_ompio_file_t *fh) +ssize_t mca_fbtl_pvfs2_preadv (ompio_file_t *fh) { int i; int ret; diff --git a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c index cd7c846169..496b405ca6 100644 --- a/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c +++ b/ompi/mca/fbtl/pvfs2/fbtl_pvfs2_pwritev.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2014 University of Houston. All rights reserved. - * Copyright (c) 2017 Research Organization for Information Science + * Copyright (c) 2017-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -33,7 +33,7 @@ #include "ompi/constants.h" #include "ompi/mca/fbtl/fbtl.h" -ssize_t mca_fbtl_pvfs2_pwritev (mca_io_ompio_file_t *fh ) +ssize_t mca_fbtl_pvfs2_pwritev (ompio_file_t *fh ) { int i; int merge = 0; diff --git a/ompi/mca/fcoll/base/base.h b/ompi/mca/fcoll/base/base.h index 2ee125ac16..7cebd093a2 100644 --- a/ompi/mca/fcoll/base/base.h +++ b/ompi/mca/fcoll/base/base.h @@ -12,6 +12,8 @@ * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. * Copyright (c) 2017 IBM Corporation. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,22 +34,23 @@ #include "mpi.h" #include "opal/mca/base/base.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/fcoll/fcoll.h" BEGIN_C_DECLS -OMPI_DECLSPEC int mca_fcoll_base_file_select(struct mca_io_ompio_file_t *file, +OMPI_DECLSPEC int mca_fcoll_base_file_select(struct ompio_file_t *file, mca_base_component_t *preferred); -OMPI_DECLSPEC int mca_fcoll_base_query_table (struct mca_io_ompio_file_t *file, +OMPI_DECLSPEC int mca_fcoll_base_query_table (struct ompio_file_t *file, char *name); -OMPI_DECLSPEC int mca_fcoll_base_file_unselect(struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_fcoll_base_file_unselect(struct ompio_file_t *file); OMPI_DECLSPEC int mca_fcoll_base_find_available(bool enable_progress_threads, bool enable_mpi_threads); -OMPI_DECLSPEC int mca_fcoll_base_init_file (struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_fcoll_base_init_file (struct ompio_file_t *file); -OMPI_DECLSPEC int mca_fcoll_base_get_param (struct mca_io_ompio_file_t *file, int keyval); +OMPI_DECLSPEC int mca_fcoll_base_get_param (struct ompio_file_t *file, int keyval); OMPI_DECLSPEC int ompi_fcoll_base_sort_iovec (struct iovec *iov, int num_entries, int *sorted); /* diff --git a/ompi/mca/fcoll/base/fcoll_base_file_select.c b/ompi/mca/fcoll/base/fcoll_base_file_select.c index bcb547db54..34b6e176a1 100644 --- a/ompi/mca/fcoll/base/fcoll_base_file_select.c +++ b/ompi/mca/fcoll/base/fcoll_base_file_select.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2017 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -62,7 +64,7 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * their module but were unfortunate to not get selected */ -int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, +int mca_fcoll_base_file_select (struct ompio_file_t *file, mca_base_component_t *preferred) { int priority; @@ -255,7 +257,7 @@ int mca_fcoll_base_file_select (struct mca_io_ompio_file_t *file, return err; } -int mca_fcoll_base_query_table (struct mca_io_ompio_file_t *file, char *name) +int mca_fcoll_base_query_table (struct ompio_file_t *file, char *name) { if (!strcmp (name, "individual")) { if ((int)file->f_cc_size >= file->f_bytes_per_agg && diff --git a/ompi/mca/fcoll/base/fcoll_base_file_unselect.c b/ompi/mca/fcoll/base/fcoll_base_file_unselect.c index db70a84cae..7011cab7b2 100644 --- a/ompi/mca/fcoll/base/fcoll_base_file_unselect.c +++ b/ompi/mca/fcoll/base/fcoll_base_file_unselect.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +33,7 @@ #include "ompi/mca/fcoll/base/base.h" #include "ompi/mca/common/ompio/common_ompio.h" -int mca_fcoll_base_file_unselect(mca_io_ompio_file_t *file) +int mca_fcoll_base_file_unselect(ompio_file_t *file) { if (NULL != file->f_fcoll && NULL != file->f_fcoll->fcoll_module_finalize) { return file->f_fcoll->fcoll_module_finalize(file); diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic.h b/ompi/mca/fcoll/dynamic/fcoll_dynamic.h index eaa634c93b..d929def61a 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic.h +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -43,21 +43,21 @@ OMPI_MODULE_DECLSPEC extern mca_fcoll_base_component_2_0_0_t mca_fcoll_dynamic_c int mca_fcoll_dynamic_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fcoll_base_module_1_0_0_t * -mca_fcoll_dynamic_component_file_query (mca_io_ompio_file_t *fh, int *priority); +mca_fcoll_dynamic_component_file_query (ompio_file_t *fh, int *priority); -int mca_fcoll_dynamic_component_file_unquery (mca_io_ompio_file_t *file); +int mca_fcoll_dynamic_component_file_unquery (ompio_file_t *file); -int mca_fcoll_dynamic_module_init (mca_io_ompio_file_t *file); -int mca_fcoll_dynamic_module_finalize (mca_io_ompio_file_t *file); +int mca_fcoll_dynamic_module_init (ompio_file_t *file); +int mca_fcoll_dynamic_module_finalize (ompio_file_t *file); -int mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, +int mca_fcoll_dynamic_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_dynamic_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c index b20dccaa0f..4ee4997e14 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c @@ -50,7 +50,7 @@ static int read_heap_sort (mca_io_ompio_local_io_array *io_array, int -mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, +mca_fcoll_dynamic_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, @@ -125,7 +125,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, if (! recvbuf_is_contiguous ) { - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *)fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, datatype, count, buf, @@ -149,7 +149,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERROR; goto exit; } - ret = mca_common_ompio_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, dynamic_num_io_procs, max_data); if (OMPI_SUCCESS != ret){ @@ -199,7 +199,7 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, /********************************************************************* *** 3. Generate the File offsets/lengths corresponding to this write ********************************************************************/ - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *) fh, + ret = fh->f_generate_current_file_view ((struct ompio_file_t *) fh, max_data, &local_iov_array, &local_count); @@ -663,8 +663,8 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, /********************************************************** *** 7e. Create the io array, and pass it to fbtl *********************************************************/ - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc - (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *) malloc + (entries_per_aggregator * sizeof (mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c index f16792f793..92c53ade5d 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c @@ -51,7 +51,7 @@ static int local_heap_sort (mca_io_ompio_local_io_array *io_array, int -mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, +mca_fcoll_dynamic_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -127,7 +127,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, if (! sendbuf_is_contiguous ) { - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *) fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *) fh, datatype, count, buf, @@ -151,7 +151,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERROR; goto exit; } - ret = mca_common_ompio_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, dynamic_num_io_procs, max_data); @@ -205,7 +205,7 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, *** 3. Generate the local offsets/lengths array corresponding to *** this write operation ********************************************************************/ - ret = fh->f_generate_current_file_view( (struct mca_io_ompio_file_t *) fh, + ret = fh->f_generate_current_file_view( (struct ompio_file_t *) fh, max_data, &local_iov_array, &local_count); @@ -911,8 +911,8 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, start_write_time = MPI_Wtime(); #endif - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc - (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *) malloc + (entries_per_aggregator * sizeof (mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c index 17b4636a92..96b88a3f84 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -53,7 +55,7 @@ mca_fcoll_dynamic_component_init_query(bool enable_progress_threads, } mca_fcoll_base_module_1_0_0_t * -mca_fcoll_dynamic_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fcoll_dynamic_component_file_query (ompio_file_t *fh, int *priority) { *priority = mca_fcoll_dynamic_priority; if (0 >= mca_fcoll_dynamic_priority) { @@ -69,7 +71,7 @@ mca_fcoll_dynamic_component_file_query (mca_io_ompio_file_t *fh, int *priority) return &dynamic; } -int mca_fcoll_dynamic_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fcoll_dynamic_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -78,13 +80,13 @@ int mca_fcoll_dynamic_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fcoll_dynamic_module_init (mca_io_ompio_file_t *file) +int mca_fcoll_dynamic_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fcoll_dynamic_module_finalize (mca_io_ompio_file_t *file) +int mca_fcoll_dynamic_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2.h b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2.h index 7c83b42e17..bd46710c45 100644 --- a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2.h +++ b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -45,21 +45,21 @@ OMPI_MODULE_DECLSPEC extern mca_fcoll_base_component_2_0_0_t mca_fcoll_dynamic_g int mca_fcoll_dynamic_gen2_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fcoll_base_module_1_0_0_t * -mca_fcoll_dynamic_gen2_component_file_query (mca_io_ompio_file_t *fh, int *priority); +mca_fcoll_dynamic_gen2_component_file_query (ompio_file_t *fh, int *priority); -int mca_fcoll_dynamic_gen2_component_file_unquery (mca_io_ompio_file_t *file); +int mca_fcoll_dynamic_gen2_component_file_unquery (ompio_file_t *file); -int mca_fcoll_dynamic_gen2_module_init (mca_io_ompio_file_t *file); -int mca_fcoll_dynamic_gen2_module_finalize (mca_io_ompio_file_t *file); +int mca_fcoll_dynamic_gen2_module_init (ompio_file_t *file); +int mca_fcoll_dynamic_gen2_module_finalize (ompio_file_t *file); -int mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, +int mca_fcoll_dynamic_gen2_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_dynamic_gen2_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c index d3ed82050c..dacc90634a 100644 --- a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c +++ b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_read_all.c @@ -50,7 +50,7 @@ static int read_heap_sort (mca_io_ompio_local_io_array *io_array, int -mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, +mca_fcoll_dynamic_gen2_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, @@ -125,7 +125,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, if (! recvbuf_is_contiguous ) { - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *)fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, datatype, count, buf, @@ -149,7 +149,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERROR; goto exit; } - ret = mca_common_ompio_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, dynamic_gen2_num_io_procs, max_data); if (OMPI_SUCCESS != ret){ @@ -199,7 +199,7 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, /********************************************************************* *** 3. Generate the File offsets/lengths corresponding to this write ********************************************************************/ - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *) fh, + ret = fh->f_generate_current_file_view ((struct ompio_file_t *) fh, max_data, &local_iov_array, &local_count); @@ -662,8 +662,8 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, /********************************************************** *** 7e. Create the io array, and pass it to fbtl *********************************************************/ - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc - (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *) malloc + (entries_per_aggregator * sizeof (mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; diff --git a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c index fe3f8c8f84..c2b169f5b0 100644 --- a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c +++ b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_file_write_all.c @@ -61,7 +61,7 @@ typedef struct mca_io_ompio_aggregator_data { int bytes_sent, prev_bytes_sent; struct iovec *decoded_iov; int bytes_to_write, prev_bytes_to_write; - mca_io_ompio_io_array_t *io_array, *prev_io_array; + mca_common_ompio_io_array_t *io_array, *prev_io_array; int num_io_entries, prev_num_io_entries; } mca_io_ompio_aggregator_data; @@ -92,7 +92,7 @@ typedef struct mca_io_ompio_aggregator_data { static int shuffle_init ( int index, int cycles, int aggregator, int rank, mca_io_ompio_aggregator_data *data, ompi_request_t **reqs ); -static int write_init (mca_io_ompio_file_t *fh, int aggregator, mca_io_ompio_aggregator_data *aggr_data, int write_chunksize ); +static int write_init (ompio_file_t *fh, int aggregator, mca_io_ompio_aggregator_data *aggr_data, int write_chunksize ); int mca_fcoll_dynamic_gen2_break_file_view ( struct iovec *decoded_iov, int iov_count, struct iovec *local_iov_array, int local_count, @@ -102,7 +102,7 @@ int mca_fcoll_dynamic_gen2_break_file_view ( struct iovec *decoded_iov, int iov_ int stripe_count, int stripe_size); -int mca_fcoll_dynamic_gen2_get_configuration (mca_io_ompio_file_t *fh, int *dynamic_gen2_num_io_procs, +int mca_fcoll_dynamic_gen2_get_configuration (ompio_file_t *fh, int *dynamic_gen2_num_io_procs, int **ret_aggregators); @@ -110,12 +110,12 @@ static int local_heap_sort (mca_io_ompio_local_io_array *io_array, int num_entries, int *sorted); -int mca_fcoll_dynamic_gen2_split_iov_array ( mca_io_ompio_file_t *fh, mca_io_ompio_io_array_t *work_array, +int mca_fcoll_dynamic_gen2_split_iov_array ( ompio_file_t *fh, mca_common_ompio_io_array_t *work_array, int num_entries, int *last_array_pos, int *last_pos_in_field, int chunk_size ); -int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_dynamic_gen2_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -168,7 +168,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, the user requested */ bytes_per_cycle =bytes_per_cycle/2; - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *) fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *) fh, datatype, count, buf, @@ -234,7 +234,7 @@ int mca_fcoll_dynamic_gen2_file_write_all (mca_io_ompio_file_t *fh, *** 2. Generate the local offsets/lengths array corresponding to *** this write operation ********************************************************************/ - ret = fh->f_generate_current_file_view( (struct mca_io_ompio_file_t *) fh, + ret = fh->f_generate_current_file_view( (struct ompio_file_t *) fh, max_data, &local_iov_array, &local_count); @@ -734,7 +734,7 @@ exit : } -static int write_init (mca_io_ompio_file_t *fh, int aggregator, mca_io_ompio_aggregator_data *aggr_data, int write_chunksize ) +static int write_init (ompio_file_t *fh, int aggregator, mca_io_ompio_aggregator_data *aggr_data, int write_chunksize ) { int ret=OMPI_SUCCESS; int last_array_pos=0; @@ -1258,8 +1258,8 @@ static int shuffle_init ( int index, int cycles, int aggregator, int rank, mca_i if (aggregator == rank && entries_per_aggregator>0) { - data->io_array = (mca_io_ompio_io_array_t *) malloc - (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); + data->io_array = (mca_common_ompio_io_array_t *) malloc + (entries_per_aggregator * sizeof (mca_common_ompio_io_array_t)); if (NULL == data->io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -1549,7 +1549,7 @@ exit: } -int mca_fcoll_dynamic_gen2_get_configuration (mca_io_ompio_file_t *fh, int *dynamic_gen2_num_io_procs, int **ret_aggregators) +int mca_fcoll_dynamic_gen2_get_configuration (ompio_file_t *fh, int *dynamic_gen2_num_io_procs, int **ret_aggregators) { int *aggregators=NULL; int num_io_procs = *dynamic_gen2_num_io_procs; @@ -1591,7 +1591,7 @@ int mca_fcoll_dynamic_gen2_get_configuration (mca_io_ompio_file_t *fh, int *dyna } -int mca_fcoll_dynamic_gen2_split_iov_array ( mca_io_ompio_file_t *fh, mca_io_ompio_io_array_t *io_array, int num_entries, +int mca_fcoll_dynamic_gen2_split_iov_array ( ompio_file_t *fh, mca_common_ompio_io_array_t *io_array, int num_entries, int *ret_array_pos, int *ret_pos, int chunk_size ) { @@ -1601,7 +1601,7 @@ int mca_fcoll_dynamic_gen2_split_iov_array ( mca_io_ompio_file_t *fh, mca_io_omp size_t bytes_to_write = chunk_size; if ( 0 == array_pos && 0 == pos ) { - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc ( num_entries * sizeof(mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *) malloc ( num_entries * sizeof(mca_common_ompio_io_array_t)); if ( NULL == fh->f_io_array ){ opal_output (1,"Could not allocate memory\n"); return -1; diff --git a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_module.c b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_module.c index 16070a9cbf..c3786cf3df 100644 --- a/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_module.c +++ b/ompi/mca/fcoll/dynamic_gen2/fcoll_dynamic_gen2_module.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -53,7 +55,7 @@ mca_fcoll_dynamic_gen2_component_init_query(bool enable_progress_threads, } mca_fcoll_base_module_1_0_0_t * -mca_fcoll_dynamic_gen2_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fcoll_dynamic_gen2_component_file_query (ompio_file_t *fh, int *priority) { *priority = mca_fcoll_dynamic_gen2_priority; if (0 >= mca_fcoll_dynamic_gen2_priority) { @@ -69,7 +71,7 @@ mca_fcoll_dynamic_gen2_component_file_query (mca_io_ompio_file_t *fh, int *prior return &dynamic_gen2; } -int mca_fcoll_dynamic_gen2_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fcoll_dynamic_gen2_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -78,13 +80,13 @@ int mca_fcoll_dynamic_gen2_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fcoll_dynamic_gen2_module_init (mca_io_ompio_file_t *file) +int mca_fcoll_dynamic_gen2_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fcoll_dynamic_gen2_module_finalize (mca_io_ompio_file_t *file) +int mca_fcoll_dynamic_gen2_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fcoll/fcoll.h b/ompi/mca/fcoll/fcoll.h index 8c82a66226..4e4f2fc694 100644 --- a/ompi/mca/fcoll/fcoll.h +++ b/ompi/mca/fcoll/fcoll.h @@ -13,7 +13,7 @@ * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -33,7 +33,7 @@ BEGIN_C_DECLS -struct mca_io_ompio_file_t; +struct ompio_file_t; struct mca_fcoll_request_t; /* @@ -76,11 +76,11 @@ typedef int (*mca_fcoll_base_component_init_query_1_0_0_fn_t) bool enable_mpi_threads); typedef struct mca_fcoll_base_module_1_0_0_t * -(*mca_fcoll_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file, +(*mca_fcoll_base_component_file_query_1_0_0_fn_t) (struct ompio_file_t *file, int *priority); typedef int (*mca_fcoll_base_component_file_unquery_1_0_0_fn_t) - (struct mca_io_ompio_file_t *file); + (struct ompio_file_t *file); /* * ****************** component struct ****************************** @@ -107,34 +107,34 @@ typedef struct mca_fcoll_base_component_2_0_0_t mca_fcoll_base_component_t; */ typedef int (*mca_fcoll_base_module_init_1_0_0_fn_t) -(struct mca_io_ompio_file_t *file); +(struct ompio_file_t *file); typedef int (*mca_fcoll_base_module_finalize_1_0_0_fn_t) -(struct mca_io_ompio_file_t *file); +(struct ompio_file_t *file); typedef int (*mca_fcoll_base_module_file_read_all_fn_t) -(struct mca_io_ompio_file_t *fh, +(struct ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); typedef int (*mca_fcoll_base_module_file_iread_all_fn_t) -(struct mca_io_ompio_file_t *fh, +(struct ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); typedef int (*mca_fcoll_base_module_file_write_all_fn_t) -(struct mca_io_ompio_file_t *fh, +(struct ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); typedef int (*mca_fcoll_base_module_file_iwrite_all_fn_t) -(struct mca_io_ompio_file_t *fh, +(struct ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/fcoll/individual/fcoll_individual.h b/ompi/mca/fcoll/individual/fcoll_individual.h index 26fb833fb6..911a0aa688 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual.h +++ b/ompi/mca/fcoll/individual/fcoll_individual.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -43,21 +43,21 @@ OMPI_MODULE_DECLSPEC extern mca_fcoll_base_component_2_0_0_t mca_fcoll_individua int mca_fcoll_individual_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fcoll_base_module_1_0_0_t * -mca_fcoll_individual_component_file_query (mca_io_ompio_file_t *fh, int *priority); +mca_fcoll_individual_component_file_query (ompio_file_t *fh, int *priority); -int mca_fcoll_individual_component_file_unquery (mca_io_ompio_file_t *file); +int mca_fcoll_individual_component_file_unquery (ompio_file_t *file); -int mca_fcoll_individual_module_init (mca_io_ompio_file_t *file); -int mca_fcoll_individual_module_finalize (mca_io_ompio_file_t *file); +int mca_fcoll_individual_module_init (ompio_file_t *file); +int mca_fcoll_individual_module_finalize (ompio_file_t *file); -int mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh, +int mca_fcoll_individual_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_individual_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c b/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c index 127080b2b7..77966d0a2d 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_file_read_all.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +33,7 @@ /* this component just directly calls the individual I/O operations */ int -mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh, +mca_fcoll_individual_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c b/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c index 550fca715b..148b5e7edc 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_file_write_all.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -30,7 +30,7 @@ #include -int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_individual_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/fcoll/individual/fcoll_individual_module.c b/ompi/mca/fcoll/individual/fcoll_individual_module.c index 865e63b44a..4151f1acb7 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_module.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_module.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -53,7 +55,7 @@ mca_fcoll_individual_component_init_query(bool enable_progress_threads, } mca_fcoll_base_module_1_0_0_t * -mca_fcoll_individual_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fcoll_individual_component_file_query (ompio_file_t *fh, int *priority) { *priority = mca_fcoll_individual_priority; if (0 >= mca_fcoll_individual_priority) { @@ -72,7 +74,7 @@ mca_fcoll_individual_component_file_query (mca_io_ompio_file_t *fh, int *priorit return &individual; } -int mca_fcoll_individual_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fcoll_individual_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -81,13 +83,13 @@ int mca_fcoll_individual_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fcoll_individual_module_init (mca_io_ompio_file_t *file) +int mca_fcoll_individual_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fcoll_individual_module_finalize (mca_io_ompio_file_t *file) +int mca_fcoll_individual_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase.h b/ompi/mca/fcoll/two_phase/fcoll_two_phase.h index 942cd85793..b39c6aae00 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase.h +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -43,28 +43,28 @@ OMPI_MODULE_DECLSPEC extern mca_fcoll_base_component_2_0_0_t mca_fcoll_two_phase int mca_fcoll_two_phase_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fcoll_base_module_1_0_0_t * -mca_fcoll_two_phase_component_file_query (mca_io_ompio_file_t *fh, int *priority); +mca_fcoll_two_phase_component_file_query (ompio_file_t *fh, int *priority); -int mca_fcoll_two_phase_component_file_unquery (mca_io_ompio_file_t *file); +int mca_fcoll_two_phase_component_file_unquery (ompio_file_t *file); -int mca_fcoll_two_phase_module_init (mca_io_ompio_file_t *file); -int mca_fcoll_two_phase_module_finalize (mca_io_ompio_file_t *file); +int mca_fcoll_two_phase_module_init (ompio_file_t *file); +int mca_fcoll_two_phase_module_finalize (ompio_file_t *file); -int mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_two_phase_calc_aggregator (mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_calc_aggregator (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE off, OMPI_MPI_OFFSET_TYPE min_off, OMPI_MPI_OFFSET_TYPE *len, @@ -75,14 +75,14 @@ int mca_fcoll_two_phase_calc_aggregator (mca_io_ompio_file_t *fh, int num_aggregators, int *aggregator_list); -int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_calc_others_requests(ompio_file_t *fh, int count_my_req_procs, int *count_my_req_per_proc, - mca_io_ompio_access_array_t *my_req, + mca_common_ompio_access_array_t *my_req, int *count_others_req_procs_ptr, - mca_io_ompio_access_array_t **others_req_ptr); + mca_common_ompio_access_array_t **others_req_ptr); -int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_calc_my_requests (ompio_file_t *fh, struct iovec *offset_len, int contig_access_count, OMPI_MPI_OFFSET_TYPE min_st_offset, @@ -91,13 +91,13 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE fd_size, int *count_my_req_procs_ptr, int **count_my_req_per_proc_ptr, - mca_io_ompio_access_array_t **my_req_ptr, + mca_common_ompio_access_array_t **my_req_ptr, size_t **buf_indices, int striping_unit, int num_aggregators, int *aggregator_list); -int mca_fcoll_two_phase_domain_partition (mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_domain_partition (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets, OMPI_MPI_OFFSET_TYPE *end_offsets, OMPI_MPI_OFFSET_TYPE *min_st_offset_ptr, diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c index fe536c7af6..2dec7bce99 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all.c @@ -54,10 +54,10 @@ typedef struct flat_list_node { }Flatlist_node; /* local function declarations */ -static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, +static int two_phase_read_and_exch(ompio_file_t *fh, void *buf, MPI_Datatype datatype, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, struct iovec *offset_len, int contig_access_count, OMPI_MPI_OFFSET_TYPE min_st_offset, @@ -68,7 +68,7 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, size_t *buf_idx, int striping_unit, int num_io_procs, int *aggregator_list); -static int two_phase_exchange_data(mca_io_ompio_file_t *fh, +static int two_phase_exchange_data(ompio_file_t *fh, void *buf, struct iovec *offset_length, int *send_size, int *start_pos, @@ -81,14 +81,14 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, Flatlist_node *flat_buf, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, int iter, size_t *buf_idx, MPI_Aint buftype_extent, int striping_unit, int num_io_procs, int *aggregator_list); -static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh, +static void two_phase_fill_user_buffer(ompio_file_t *fh, void *buf, Flatlist_node *flat_buf, char **recv_buf, @@ -119,7 +119,7 @@ double read_exch = 0.0, start_rexch = 0.0, end_rexch = 0.0; int -mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, +mca_fcoll_two_phase_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, @@ -141,7 +141,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets=NULL, *end_offsets=NULL; OMPI_MPI_OFFSET_TYPE *fd_start=NULL, *fd_end=NULL, min_st_offset = 0; Flatlist_node *flat_buf=NULL; - mca_io_ompio_access_array_t *my_req=NULL, *others_req=NULL; + mca_common_ompio_access_array_t *my_req=NULL, *others_req=NULL; #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN mca_common_ompio_print_entry nentry; #endif @@ -150,7 +150,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, // } if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *)fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, datatype, count, buf, @@ -192,7 +192,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, goto exit; } if (-1 == two_phase_num_io_procs ){ - ret = mca_common_ompio_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *)fh, two_phase_num_io_procs, max_data); if (OMPI_SUCCESS != ret){ @@ -224,7 +224,7 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, } } - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *)fh, + ret = fh->f_generate_current_file_view ((struct ompio_file_t *)fh, max_data, &iov, &local_count); @@ -528,10 +528,10 @@ exit: -static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, +static int two_phase_read_and_exch(ompio_file_t *fh, void *buf, MPI_Datatype datatype, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, struct iovec *offset_len, int contig_access_count, OMPI_MPI_OFFSET_TYPE min_st_offset, @@ -726,8 +726,8 @@ static int two_phase_read_and_exch(mca_io_ompio_file_t *fh, #endif len = size * byte_size; - fh->f_io_array = (mca_io_ompio_io_array_t *)calloc - (1,sizeof(mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *)calloc + (1,sizeof(mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -827,7 +827,7 @@ exit: } -static int two_phase_exchange_data(mca_io_ompio_file_t *fh, +static int two_phase_exchange_data(ompio_file_t *fh, void *buf, struct iovec *offset_len, int *send_size, int *start_pos, int *recv_size, int *count, int *partial_send, @@ -837,7 +837,7 @@ static int two_phase_exchange_data(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, Flatlist_node *flat_buf, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, int iter, size_t *buf_idx, MPI_Aint buftype_extent, int striping_unit, int two_phase_num_io_procs, int *aggregator_list) @@ -1065,7 +1065,7 @@ exit: -static void two_phase_fill_user_buffer(mca_io_ompio_file_t *fh, +static void two_phase_fill_user_buffer(ompio_file_t *fh, void *buf, Flatlist_node *flat_buf, char **recv_buf, diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c index 5e8efb9557..b4685d716a 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all.c @@ -56,10 +56,10 @@ typedef struct flat_list_node { /* local function declarations */ -static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, +static int two_phase_exch_and_write(ompio_file_t *fh, const void *buf, MPI_Datatype datatype, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, struct iovec *offset_len, int contig_access_count, OMPI_MPI_OFFSET_TYPE min_st_offset, @@ -72,7 +72,7 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, -static int two_phase_exchage_data(mca_io_ompio_file_t *fh, +static int two_phase_exchage_data(ompio_file_t *fh, const void *buf, char *write_buf, struct iovec *offset_length, @@ -87,7 +87,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, Flatlist_node *flat_buf, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, int *send_buf_idx, int *curr_to_proc, int *done_to_proc, int iter, size_t *buf_idx, MPI_Aint buftype_extent, @@ -95,7 +95,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, int *aggregator_list, int *hole); -static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh, +static int two_phase_fill_send_buffer(ompio_file_t *fh, const void *buf, Flatlist_node *flat_buf, char **send_buf, @@ -120,7 +120,7 @@ static int is_aggregator(int rank, int *aggregator_list); #endif -void two_phase_heap_merge(mca_io_ompio_access_array_t *others_req, +void two_phase_heap_merge(mca_common_ompio_access_array_t *others_req, int *count, OMPI_MPI_OFFSET_TYPE *srt_off, int *srt_len, @@ -141,7 +141,7 @@ double exch_write = 0.0, start_exch = 0.0, end_exch = 0.0; #endif int -mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, +mca_fcoll_two_phase_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -166,7 +166,7 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets=NULL, *end_offsets=NULL; OMPI_MPI_OFFSET_TYPE *fd_start=NULL, *fd_end=NULL, min_st_offset; Flatlist_node *flat_buf=NULL; - mca_io_ompio_access_array_t *my_req=NULL, *others_req=NULL; + mca_common_ompio_access_array_t *my_req=NULL, *others_req=NULL; MPI_Aint send_buf_addr; #if OMPIO_FCOLL_WANT_TIME_BREAKDOWN mca_common_ompio_print_entry nentry; @@ -180,7 +180,7 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *)fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, datatype, count, buf, @@ -228,7 +228,7 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, goto exit; } if(-1 == two_phase_num_io_procs){ - ret = mca_common_ompio_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *)fh, two_phase_num_io_procs, max_data); if ( OMPI_SUCCESS != ret){ @@ -264,7 +264,7 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, } } - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t*)fh, + ret = fh->f_generate_current_file_view ((struct ompio_file_t*)fh, max_data, &iov, &local_count); @@ -590,10 +590,10 @@ exit : } -static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, +static int two_phase_exch_and_write(ompio_file_t *fh, const void *buf, MPI_Datatype datatype, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, struct iovec *offset_len, int contig_access_count, OMPI_MPI_OFFSET_TYPE min_st_offset, @@ -842,8 +842,8 @@ static int two_phase_exch_and_write(mca_io_ompio_file_t *fh, } #endif len = size * byte_size; - fh->f_io_array = (mca_io_ompio_io_array_t *)malloc - (sizeof(mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *)malloc + (sizeof(mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -928,7 +928,7 @@ exit: return ret; } -static int two_phase_exchage_data(mca_io_ompio_file_t *fh, +static int two_phase_exchage_data(ompio_file_t *fh, const void *buf, char *write_buf, struct iovec *offset_length, @@ -943,7 +943,7 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *fd_start, OMPI_MPI_OFFSET_TYPE *fd_end, Flatlist_node *flat_buf, - mca_io_ompio_access_array_t *others_req, + mca_common_ompio_access_array_t *others_req, int *send_buf_idx, int *curr_to_proc, int *done_to_proc, int iter, size_t *buf_idx,MPI_Aint buftype_extent, @@ -1069,8 +1069,8 @@ static int two_phase_exchage_data(mca_io_ompio_file_t *fh, if (nprocs_recv){ if (*hole){ if (off >= 0){ - fh->f_io_array = (mca_io_ompio_io_array_t *)malloc - (sizeof(mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *)malloc + (sizeof(mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -1287,7 +1287,7 @@ exit: -static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh, +static int two_phase_fill_send_buffer(ompio_file_t *fh, const void *buf, Flatlist_node *flat_buf, char **send_buf, @@ -1407,7 +1407,7 @@ static int two_phase_fill_send_buffer(mca_io_ompio_file_t *fh, -void two_phase_heap_merge( mca_io_ompio_access_array_t *others_req, +void two_phase_heap_merge( mca_common_ompio_access_array_t *others_req, int *count, OMPI_MPI_OFFSET_TYPE *srt_off, int *srt_len, diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_module.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_module.c index b4ab1041d3..53fbb363b7 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_module.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_module.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2015 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -53,7 +55,7 @@ mca_fcoll_two_phase_component_init_query(bool enable_progress_threads, } mca_fcoll_base_module_1_0_0_t * -mca_fcoll_two_phase_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fcoll_two_phase_component_file_query (ompio_file_t *fh, int *priority) { *priority = mca_fcoll_two_phase_priority; if (0 >= mca_fcoll_two_phase_priority) { @@ -69,7 +71,7 @@ mca_fcoll_two_phase_component_file_query (mca_io_ompio_file_t *fh, int *priority return &two_phase; } -int mca_fcoll_two_phase_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fcoll_two_phase_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -78,13 +80,13 @@ int mca_fcoll_two_phase_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fcoll_two_phase_module_init (mca_io_ompio_file_t *file) +int mca_fcoll_two_phase_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fcoll_two_phase_module_finalize (mca_io_ompio_file_t *file) +int mca_fcoll_two_phase_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_support_fns.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_support_fns.c index ef153806dc..777cf08b9a 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_support_fns.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_support_fns.c @@ -41,7 +41,7 @@ Functions to support Domain partitioning and aggregator selection for two_phase . This is commom to both two_phase_read and write. */ -int mca_fcoll_two_phase_domain_partition (mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_domain_partition (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *start_offsets, OMPI_MPI_OFFSET_TYPE *end_offsets, OMPI_MPI_OFFSET_TYPE *min_st_offset_ptr, @@ -143,7 +143,7 @@ int mca_fcoll_two_phase_domain_partition (mca_io_ompio_file_t *fh, -int mca_fcoll_two_phase_calc_aggregator(mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_calc_aggregator(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE off, OMPI_MPI_OFFSET_TYPE min_off, OMPI_MPI_OFFSET_TYPE *len, @@ -191,19 +191,19 @@ int mca_fcoll_two_phase_calc_aggregator(mca_io_ompio_file_t *fh, return rank; } -int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_calc_others_requests(ompio_file_t *fh, int count_my_req_procs, int *count_my_req_per_proc, - mca_io_ompio_access_array_t *my_req, + mca_common_ompio_access_array_t *my_req, int *count_others_req_procs_ptr, - mca_io_ompio_access_array_t **others_req_ptr) + mca_common_ompio_access_array_t **others_req_ptr) { int *count_others_req_per_proc=NULL, count_others_req_procs; int i,j, ret=OMPI_SUCCESS; MPI_Request *requests=NULL; - mca_io_ompio_access_array_t *others_req=NULL; + mca_common_ompio_access_array_t *others_req=NULL; count_others_req_per_proc = (int *)malloc(fh->f_size*sizeof(int)); @@ -232,8 +232,8 @@ int mca_fcoll_two_phase_calc_others_requests(mca_io_ompio_file_t *fh, } #endif - *others_req_ptr = (mca_io_ompio_access_array_t *) malloc - (fh->f_size*sizeof(mca_io_ompio_access_array_t)); + *others_req_ptr = (mca_common_ompio_access_array_t *) malloc + (fh->f_size*sizeof(mca_common_ompio_access_array_t)); others_req = *others_req_ptr; count_others_req_procs = 0; @@ -347,7 +347,7 @@ exit: } -int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, +int mca_fcoll_two_phase_calc_my_requests (ompio_file_t *fh, struct iovec *offset_len, int contig_access_count, OMPI_MPI_OFFSET_TYPE min_st_offset, @@ -356,7 +356,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE fd_size, int *count_my_req_procs_ptr, int **count_my_req_per_proc_ptr, - mca_io_ompio_access_array_t **my_req_ptr, + mca_common_ompio_access_array_t **my_req_ptr, size_t **buf_indices, int striping_unit, int num_aggregators, @@ -367,7 +367,7 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, size_t *buf_idx = NULL; int i, l, proc; OMPI_MPI_OFFSET_TYPE fd_len, rem_len, curr_idx, off; - mca_io_ompio_access_array_t *my_req = NULL; + mca_common_ompio_access_array_t *my_req = NULL; *count_my_req_per_proc_ptr = (int*)malloc(fh->f_size*sizeof(int)); @@ -415,8 +415,8 @@ int mca_fcoll_two_phase_calc_my_requests (mca_io_ompio_file_t *fh, } /* printf("%d: fh->f_size : %d\n", fh->f_rank,fh->f_size);*/ - *my_req_ptr = (mca_io_ompio_access_array_t *) - malloc (fh->f_size * sizeof(mca_io_ompio_access_array_t)); + *my_req_ptr = (mca_common_ompio_access_array_t *) + malloc (fh->f_size * sizeof(mca_common_ompio_access_array_t)); if ( NULL == *my_req_ptr ) { ret = OMPI_ERR_OUT_OF_RESOURCE; goto err_exit; diff --git a/ompi/mca/fcoll/vulcan/fcoll_vulcan.h b/ompi/mca/fcoll/vulcan/fcoll_vulcan.h index cf9cecaeae..a3433d144a 100644 --- a/ompi/mca/fcoll/vulcan/fcoll_vulcan.h +++ b/ompi/mca/fcoll/vulcan/fcoll_vulcan.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2017 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -46,21 +46,21 @@ OMPI_MODULE_DECLSPEC extern mca_fcoll_base_component_2_0_0_t mca_fcoll_vulcan_co int mca_fcoll_vulcan_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fcoll_base_module_1_0_0_t * -mca_fcoll_vulcan_component_file_query (mca_io_ompio_file_t *fh, int *priority); +mca_fcoll_vulcan_component_file_query (ompio_file_t *fh, int *priority); -int mca_fcoll_vulcan_component_file_unquery (mca_io_ompio_file_t *file); +int mca_fcoll_vulcan_component_file_unquery (ompio_file_t *file); -int mca_fcoll_vulcan_module_init (mca_io_ompio_file_t *file); -int mca_fcoll_vulcan_module_finalize (mca_io_ompio_file_t *file); +int mca_fcoll_vulcan_module_init (ompio_file_t *file); +int mca_fcoll_vulcan_module_finalize (ompio_file_t *file); -int mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, +int mca_fcoll_vulcan_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_vulcan_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_vulcan_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_read_all.c b/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_read_all.c index 0bee1baaee..beac32fcc1 100644 --- a/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_read_all.c +++ b/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_read_all.c @@ -49,7 +49,7 @@ static int read_heap_sort (mca_io_ompio_local_io_array *io_array, int -mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, +mca_fcoll_vulcan_file_read_all (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, @@ -124,7 +124,7 @@ mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, if (! recvbuf_is_contiguous ) { - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *)fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, datatype, count, buf, @@ -149,7 +149,7 @@ mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, goto exit; } - ret = mca_common_ompio_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, vulcan_num_io_procs, max_data); if (OMPI_SUCCESS != ret){ @@ -199,7 +199,7 @@ mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, /********************************************************************* *** 3. Generate the File offsets/lengths corresponding to this write ********************************************************************/ - ret = fh->f_generate_current_file_view ((struct mca_io_ompio_file_t *) fh, + ret = fh->f_generate_current_file_view ((struct ompio_file_t *) fh, max_data, &local_iov_array, &local_count); @@ -662,8 +662,8 @@ mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, /********************************************************** *** 7e. Create the io array, and pass it to fbtl *********************************************************/ - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc - (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *) malloc + (entries_per_aggregator * sizeof (mca_common_ompio_io_array_t)); if (NULL == fh->f_io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; diff --git a/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_write_all.c b/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_write_all.c index d75d92e728..6b4e2201af 100644 --- a/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_write_all.c +++ b/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_write_all.c @@ -60,7 +60,7 @@ typedef struct mca_io_ompio_aggregator_data { int bytes_sent, prev_bytes_sent; struct iovec *decoded_iov; int bytes_to_write, prev_bytes_to_write; - mca_io_ompio_io_array_t *io_array, *prev_io_array; + mca_common_ompio_io_array_t *io_array, *prev_io_array; int num_io_entries, prev_num_io_entries; } mca_io_ompio_aggregator_data; @@ -91,7 +91,7 @@ typedef struct mca_io_ompio_aggregator_data { static int shuffle_init ( int index, int cycles, int aggregator, int rank, mca_io_ompio_aggregator_data *data, ompi_request_t **reqs ); -static int write_init (mca_io_ompio_file_t *fh, int aggregator, mca_io_ompio_aggregator_data *aggr_data, +static int write_init (ompio_file_t *fh, int aggregator, mca_io_ompio_aggregator_data *aggr_data, int write_chunksize, int write_synchType, ompi_request_t **request); int mca_fcoll_vulcan_break_file_view ( struct iovec *decoded_iov, int iov_count, struct iovec *local_iov_array, int local_count, @@ -101,7 +101,7 @@ int mca_fcoll_vulcan_break_file_view ( struct iovec *decoded_iov, int iov_count, int stripe_count, size_t stripe_size); -int mca_fcoll_vulcan_get_configuration (mca_io_ompio_file_t *fh, int num_io_procs, +int mca_fcoll_vulcan_get_configuration (ompio_file_t *fh, int num_io_procs, int num_groups, size_t max_data); @@ -109,16 +109,16 @@ static int local_heap_sort (mca_io_ompio_local_io_array *io_array, int num_entries, int *sorted); -int mca_fcoll_vulcan_split_iov_array ( mca_io_ompio_file_t *fh, mca_io_ompio_io_array_t *work_array, +int mca_fcoll_vulcan_split_iov_array ( ompio_file_t *fh, mca_common_ompio_io_array_t *work_array, int num_entries, int *last_array_pos, int *last_pos_in_field, int chunk_size ); -static int mca_fcoll_vulcan_minmax ( mca_io_ompio_file_t *fh, struct iovec *iov, int iov_count, int num_aggregators, +static int mca_fcoll_vulcan_minmax ( ompio_file_t *fh, struct iovec *iov, int iov_count, int num_aggregators, long *new_stripe_size); -int mca_fcoll_vulcan_file_write_all (mca_io_ompio_file_t *fh, +int mca_fcoll_vulcan_file_write_all (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -184,7 +184,7 @@ int mca_fcoll_vulcan_file_write_all (mca_io_ompio_file_t *fh, bytes_per_cycle =bytes_per_cycle/2; write_chunksize = bytes_per_cycle; - ret = mca_common_ompio_decode_datatype ((struct mca_io_ompio_file_t *) fh, + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *) fh, datatype, count, buf, @@ -228,7 +228,7 @@ int mca_fcoll_vulcan_file_write_all (mca_io_ompio_file_t *fh, *** 2. Generate the local offsets/lengths array corresponding to *** this write operation ********************************************************************/ - ret = fh->f_generate_current_file_view( (struct mca_io_ompio_file_t *) fh, + ret = fh->f_generate_current_file_view( (struct ompio_file_t *) fh, max_data, &local_iov_array, &local_count); @@ -735,7 +735,7 @@ exit : return OMPI_SUCCESS; } -static int write_init (mca_io_ompio_file_t *fh, +static int write_init (ompio_file_t *fh, int aggregator, mca_io_ompio_aggregator_data *aggr_data, int write_chunksize, @@ -1292,8 +1292,8 @@ static int shuffle_init ( int index, int cycles, int aggregator, int rank, mca_i if (aggregator == rank && entries_per_aggregator>0) { - data->io_array = (mca_io_ompio_io_array_t *) malloc - (entries_per_aggregator * sizeof (mca_io_ompio_io_array_t)); + data->io_array = (mca_common_ompio_io_array_t *) malloc + (entries_per_aggregator * sizeof (mca_common_ompio_io_array_t)); if (NULL == data->io_array) { opal_output(1, "OUT OF MEMORY\n"); ret = OMPI_ERR_OUT_OF_RESOURCE; @@ -1353,7 +1353,7 @@ exit: return OMPI_SUCCESS; } -static int mca_fcoll_vulcan_minmax ( mca_io_ompio_file_t *fh, struct iovec *iov, int iov_count, int num_aggregators, long *new_stripe_size) +static int mca_fcoll_vulcan_minmax ( ompio_file_t *fh, struct iovec *iov, int iov_count, int num_aggregators, long *new_stripe_size) { long min, max, globalmin, globalmax; long stripe_size; @@ -1616,7 +1616,7 @@ exit: } -int mca_fcoll_vulcan_get_configuration (mca_io_ompio_file_t *fh, int num_io_procs, int num_groups, +int mca_fcoll_vulcan_get_configuration (ompio_file_t *fh, int num_io_procs, int num_groups, size_t max_data) { int i, ret; @@ -1647,7 +1647,7 @@ int mca_fcoll_vulcan_get_configuration (mca_io_ompio_file_t *fh, int num_io_proc } -int mca_fcoll_vulcan_split_iov_array ( mca_io_ompio_file_t *fh, mca_io_ompio_io_array_t *io_array, int num_entries, +int mca_fcoll_vulcan_split_iov_array ( ompio_file_t *fh, mca_common_ompio_io_array_t *io_array, int num_entries, int *ret_array_pos, int *ret_pos, int chunk_size ) { @@ -1657,7 +1657,7 @@ int mca_fcoll_vulcan_split_iov_array ( mca_io_ompio_file_t *fh, mca_io_ompio_io_ size_t bytes_to_write = chunk_size; if ( 0 == array_pos && 0 == pos ) { - fh->f_io_array = (mca_io_ompio_io_array_t *) malloc ( num_entries * sizeof(mca_io_ompio_io_array_t)); + fh->f_io_array = (mca_common_ompio_io_array_t *) malloc ( num_entries * sizeof(mca_common_ompio_io_array_t)); if ( NULL == fh->f_io_array ){ opal_output (1,"Could not allocate memory\n"); return -1; diff --git a/ompi/mca/fcoll/vulcan/fcoll_vulcan_module.c b/ompi/mca/fcoll/vulcan/fcoll_vulcan_module.c index 4246e6f8df..f3f847b9fc 100644 --- a/ompi/mca/fcoll/vulcan/fcoll_vulcan_module.c +++ b/ompi/mca/fcoll/vulcan/fcoll_vulcan_module.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2017 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -53,7 +55,7 @@ mca_fcoll_vulcan_component_init_query(bool enable_progress_threads, } mca_fcoll_base_module_1_0_0_t * -mca_fcoll_vulcan_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fcoll_vulcan_component_file_query (ompio_file_t *fh, int *priority) { *priority = mca_fcoll_vulcan_priority; if (0 >= mca_fcoll_vulcan_priority) { @@ -69,7 +71,7 @@ mca_fcoll_vulcan_component_file_query (mca_io_ompio_file_t *fh, int *priority) return &vulcan; } -int mca_fcoll_vulcan_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fcoll_vulcan_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -78,13 +80,13 @@ int mca_fcoll_vulcan_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fcoll_vulcan_module_init (mca_io_ompio_file_t *file) +int mca_fcoll_vulcan_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_fcoll_vulcan_module_finalize (mca_io_ompio_file_t *file) +int mca_fcoll_vulcan_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/base/base.h b/ompi/mca/fs/base/base.h index b83c93890a..9d9969fa1f 100644 --- a/ompi/mca/fs/base/base.h +++ b/ompi/mca/fs/base/base.h @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,23 +32,24 @@ #include "ompi_config.h" #include "mpi.h" -#include "ompi/mca/fs/fs.h" #include "opal/mca/base/base.h" +#include "ompi/mca/common/ompio/common_ompio.h" +#include "ompi/mca/fs/fs.h" BEGIN_C_DECLS -OMPI_DECLSPEC int mca_fs_base_file_select(struct mca_io_ompio_file_t *file, +OMPI_DECLSPEC int mca_fs_base_file_select(struct ompio_file_t *file, mca_base_component_t *preferred); -OMPI_DECLSPEC int mca_fs_base_file_unselect(struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_fs_base_file_unselect(struct ompio_file_t *file); OMPI_DECLSPEC int mca_fs_base_find_available(bool enable_progress_threads, bool enable_mpi_threads); -OMPI_DECLSPEC int mca_fs_base_init_file (struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_fs_base_init_file (struct ompio_file_t *file); -OMPI_DECLSPEC int mca_fs_base_get_param (struct mca_io_ompio_file_t *file, int keyval); +OMPI_DECLSPEC int mca_fs_base_get_param (struct ompio_file_t *file, int keyval); OMPI_DECLSPEC void mca_fs_base_get_parent_dir (char *filename, char **dirnamep); OMPI_DECLSPEC int mca_fs_base_get_fstype(char *fname); /* diff --git a/ompi/mca/fs/base/fs_base_file_select.c b/ompi/mca/fs/base/fs_base_file_select.c index f0927cdf3c..a91209741d 100644 --- a/ompi/mca/fs/base/fs_base_file_select.c +++ b/ompi/mca/fs/base/fs_base_file_select.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -62,7 +64,7 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * their module but were unfortunate to not get selected */ -int mca_fs_base_file_select (struct mca_io_ompio_file_t *file, +int mca_fs_base_file_select (struct ompio_file_t *file, mca_base_component_t *preferred) { int priority; diff --git a/ompi/mca/fs/base/fs_base_file_unselect.c b/ompi/mca/fs/base/fs_base_file_unselect.c index 7b6bbd8267..7552edf174 100644 --- a/ompi/mca/fs/base/fs_base_file_unselect.c +++ b/ompi/mca/fs/base/fs_base_file_unselect.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +34,7 @@ #include "ompi/mca/common/ompio/common_ompio.h" -int mca_fs_base_file_unselect(mca_io_ompio_file_t *file) +int mca_fs_base_file_unselect(ompio_file_t *file) { if (NULL != file->f_fs && NULL != file->f_fs->fs_module_finalize) { return file->f_fs->fs_module_finalize(file); diff --git a/ompi/mca/fs/fs.h b/ompi/mca/fs/fs.h index b5a5aee701..0f1ec90f11 100644 --- a/ompi/mca/fs/fs.h +++ b/ompi/mca/fs/fs.h @@ -13,7 +13,7 @@ * Copyright (c) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -34,7 +34,7 @@ BEGIN_C_DECLS -struct mca_io_ompio_file_t; +struct ompio_file_t; /* * Macro for use in components that are of type coll @@ -74,11 +74,11 @@ typedef int (*mca_fs_base_component_init_query_1_0_0_fn_t) bool enable_mpi_threads); typedef struct mca_fs_base_module_1_0_0_t * -(*mca_fs_base_component_file_query_1_0_0_fn_t) (struct mca_io_ompio_file_t *file, +(*mca_fs_base_component_file_query_1_0_0_fn_t) (struct ompio_file_t *file, int *priority); typedef int (*mca_fs_base_component_file_unquery_1_0_0_fn_t) - (struct mca_io_ompio_file_t *file); + (struct ompio_file_t *file); /* * ****************** component struct ****************************** @@ -105,23 +105,23 @@ typedef struct mca_fs_base_component_2_0_0_t mca_fs_base_component_t; */ typedef int (*mca_fs_base_module_init_1_0_0_fn_t) -(struct mca_io_ompio_file_t *file); +(struct ompio_file_t *file); typedef int (*mca_fs_base_module_finalize_1_0_0_fn_t) -(struct mca_io_ompio_file_t *file); +(struct ompio_file_t *file); typedef int (*mca_fs_base_module_file_open_fn_t)( struct ompi_communicator_t *comm, const char *filename, int amode, - struct opal_info_t *info, struct mca_io_ompio_file_t *fh); -typedef int (*mca_fs_base_module_file_close_fn_t)(struct mca_io_ompio_file_t *fh); + struct opal_info_t *info, struct ompio_file_t *fh); +typedef int (*mca_fs_base_module_file_close_fn_t)(struct ompio_file_t *fh); typedef int (*mca_fs_base_module_file_delete_fn_t)( char *filename, struct opal_info_t *info); typedef int (*mca_fs_base_module_file_set_size_fn_t) - (struct mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); + (struct ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); typedef int (*mca_fs_base_module_file_get_size_fn_t) - (struct mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); + (struct ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); typedef int (*mca_fs_base_module_file_sync_fn_t) - (struct mca_io_ompio_file_t *fh); + (struct ompio_file_t *fh); /* * *********************************************************************** diff --git a/ompi/mca/fs/lustre/fs_lustre.c b/ompi/mca/fs/lustre/fs_lustre.c index 466368168c..31fca26c25 100644 --- a/ompi/mca/fs/lustre/fs_lustre.c +++ b/ompi/mca/fs/lustre/fs_lustre.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2017 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -74,7 +76,7 @@ int mca_fs_lustre_component_init_query(bool enable_progress_threads, } struct mca_fs_base_module_1_0_0_t * -mca_fs_lustre_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fs_lustre_component_file_query (ompio_file_t *fh, int *priority) { char *tmp; @@ -114,7 +116,7 @@ mca_fs_lustre_component_file_query (mca_io_ompio_file_t *fh, int *priority) return NULL; } -int mca_fs_lustre_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fs_lustre_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -123,7 +125,7 @@ int mca_fs_lustre_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fs_lustre_module_init (mca_io_ompio_file_t *file) +int mca_fs_lustre_module_init (ompio_file_t *file) { /* Make sure the file type is not overwritten by the last queried * component */ @@ -132,7 +134,7 @@ int mca_fs_lustre_module_init (mca_io_ompio_file_t *file) } -int mca_fs_lustre_module_finalize (mca_io_ompio_file_t *file) +int mca_fs_lustre_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/lustre/fs_lustre.h b/ompi/mca/fs/lustre/fs_lustre.h index 11042606e9..c1e9c211d5 100644 --- a/ompi/mca/fs/lustre/fs_lustre.h +++ b/ompi/mca/fs/lustre/fs_lustre.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2017 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -45,11 +45,11 @@ BEGIN_C_DECLS int mca_fs_lustre_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fs_base_module_1_0_0_t * -mca_fs_lustre_component_file_query (mca_io_ompio_file_t *fh, int *priority); -int mca_fs_lustre_component_file_unquery (mca_io_ompio_file_t *file); +mca_fs_lustre_component_file_query (ompio_file_t *fh, int *priority); +int mca_fs_lustre_component_file_unquery (ompio_file_t *file); -int mca_fs_lustre_module_init (mca_io_ompio_file_t *file); -int mca_fs_lustre_module_finalize (mca_io_ompio_file_t *file); +int mca_fs_lustre_module_init (ompio_file_t *file); +int mca_fs_lustre_module_finalize (ompio_file_t *file); OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_lustre_component; /* @@ -62,22 +62,22 @@ int mca_fs_lustre_file_open (struct ompi_communicator_t *comm, const char *filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh); + ompio_file_t *fh); -int mca_fs_lustre_file_close (mca_io_ompio_file_t *fh); +int mca_fs_lustre_file_close (ompio_file_t *fh); int mca_fs_lustre_file_delete (char *filename, struct opal_info_t *info); -int mca_fs_lustre_file_set_size (mca_io_ompio_file_t *fh, +int mca_fs_lustre_file_set_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); -int mca_fs_lustre_file_get_size (mca_io_ompio_file_t *fh, +int mca_fs_lustre_file_get_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); -int mca_fs_lustre_file_sync (mca_io_ompio_file_t *fh); +int mca_fs_lustre_file_sync (ompio_file_t *fh); -int mca_fs_lustre_file_seek (mca_io_ompio_file_t *fh, +int mca_fs_lustre_file_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); /* diff --git a/ompi/mca/fs/lustre/fs_lustre_file_close.c b/ompi/mca/fs/lustre/fs_lustre_file_close.c index 5f6e902fa8..ebe5c807b4 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_close.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_close.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +37,7 @@ * Returns: - Success if file closed */ int -mca_fs_lustre_file_close (mca_io_ompio_file_t *fh) +mca_fs_lustre_file_close (ompio_file_t *fh) { fh->f_comm->c_coll->coll_barrier (fh->f_comm, fh->f_comm->c_coll->coll_barrier_module); diff --git a/ompi/mca/fs/lustre/fs_lustre_file_get_size.c b/ompi/mca/fs/lustre/fs_lustre_file_get_size.c index e6e2a51422..057c67e111 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_get_size.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_get_size.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,7 +35,7 @@ * Returns: - Success if size is get */ int -mca_fs_lustre_file_get_size (mca_io_ompio_file_t *fh, +mca_fs_lustre_file_get_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size) { *size = lseek(fh->fd, 0, SEEK_END); diff --git a/ompi/mca/fs/lustre/fs_lustre_file_open.c b/ompi/mca/fs/lustre/fs_lustre_file_open.c index fc1c870d2a..fe58bc3e16 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_open.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_open.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2018 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -61,7 +61,7 @@ mca_fs_lustre_file_open (struct ompi_communicator_t *comm, const char* filename, int access_mode, struct opal_info_t *info, - mca_io_ompio_file_t *fh) + ompio_file_t *fh) { int amode, rank; int old_mask, perm; diff --git a/ompi/mca/fs/lustre/fs_lustre_file_set_size.c b/ompi/mca/fs/lustre/fs_lustre_file_set_size.c index 930029878a..8720a69a12 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_set_size.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_set_size.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,7 +35,7 @@ * Returns: - Success if size is set */ int -mca_fs_lustre_file_set_size (mca_io_ompio_file_t *fh, +mca_fs_lustre_file_set_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size) { int err = 0; diff --git a/ompi/mca/fs/lustre/fs_lustre_file_sync.c b/ompi/mca/fs/lustre/fs_lustre_file_sync.c index 091960de23..896399d9b4 100644 --- a/ompi/mca/fs/lustre/fs_lustre_file_sync.c +++ b/ompi/mca/fs/lustre/fs_lustre_file_sync.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2009 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -34,7 +36,7 @@ * Returns: - Success if file closed */ int -mca_fs_lustre_file_sync (mca_io_ompio_file_t *fh) +mca_fs_lustre_file_sync (ompio_file_t *fh) { int err; diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2.c b/ompi/mca/fs/pvfs2/fs_pvfs2.c index 37fc88771a..aa4a14e49a 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -73,7 +75,7 @@ int mca_fs_pvfs2_component_init_query(bool enable_progress_threads, } struct mca_fs_base_module_1_0_0_t * -mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fs_pvfs2_component_file_query (ompio_file_t *fh, int *priority) { /* The code in this function is based on the ADIO FS selection in ROMIO @@ -119,7 +121,7 @@ mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority) return NULL; } -int mca_fs_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fs_pvfs2_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -128,7 +130,7 @@ int mca_fs_pvfs2_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fs_pvfs2_module_init (mca_io_ompio_file_t *file) +int mca_fs_pvfs2_module_init (ompio_file_t *file) { /* Make sure the file type is not overwritten by the last queried * component */ @@ -137,7 +139,7 @@ int mca_fs_pvfs2_module_init (mca_io_ompio_file_t *file) } -int mca_fs_pvfs2_module_finalize (mca_io_ompio_file_t *file) +int mca_fs_pvfs2_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2.h b/ompi/mca/fs/pvfs2/fs_pvfs2.h index dc4e724f3d..c3747157d1 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2.h +++ b/ompi/mca/fs/pvfs2/fs_pvfs2.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -55,11 +55,11 @@ typedef struct mca_fs_pvfs2_s mca_fs_pvfs2; int mca_fs_pvfs2_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fs_base_module_1_0_0_t * -mca_fs_pvfs2_component_file_query (mca_io_ompio_file_t *fh, int *priority); -int mca_fs_pvfs2_component_file_unquery (mca_io_ompio_file_t *file); +mca_fs_pvfs2_component_file_query (ompio_file_t *fh, int *priority); +int mca_fs_pvfs2_component_file_unquery (ompio_file_t *file); -int mca_fs_pvfs2_module_init (mca_io_ompio_file_t *file); -int mca_fs_pvfs2_module_finalize (mca_io_ompio_file_t *file); +int mca_fs_pvfs2_module_init (ompio_file_t *file); +int mca_fs_pvfs2_module_finalize (ompio_file_t *file); OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_pvfs2_component; /* @@ -72,22 +72,22 @@ int mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, const char *filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh); + ompio_file_t *fh); -int mca_fs_pvfs2_file_close (mca_io_ompio_file_t *fh); +int mca_fs_pvfs2_file_close (ompio_file_t *fh); int mca_fs_pvfs2_file_delete (char *filename, struct opal_info_t *info); -int mca_fs_pvfs2_file_set_size (mca_io_ompio_file_t *fh, +int mca_fs_pvfs2_file_set_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); -int mca_fs_pvfs2_file_get_size (mca_io_ompio_file_t *fh, +int mca_fs_pvfs2_file_get_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); -int mca_fs_pvfs2_file_sync (mca_io_ompio_file_t *fh); +int mca_fs_pvfs2_file_sync (ompio_file_t *fh); -int mca_fs_pvfs2_file_seek (mca_io_ompio_file_t *fh, +int mca_fs_pvfs2_file_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); /* diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c index 9aa940a356..80f96b3ec4 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_close.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -39,7 +41,7 @@ * Returns: - Success if file closed */ int -mca_fs_pvfs2_file_close (mca_io_ompio_file_t *fh) +mca_fs_pvfs2_file_close (ompio_file_t *fh) { if (NULL != fh->f_fs_ptr) { free (fh->f_fs_ptr); diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c index f6b5059529..cc71622e70 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_get_size.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -37,7 +39,7 @@ * Returns: - Success if size is get */ int -mca_fs_pvfs2_file_get_size (mca_io_ompio_file_t *fh, +mca_fs_pvfs2_file_get_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size) { int ret; diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c index 754cd815bd..7b58199962 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_open.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2014 University of Houston. All rights reserved. - * Copyright (c) 2015-2017 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -62,7 +62,7 @@ mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, const char* filename, int access_mode, struct opal_info_t *info, - mca_io_ompio_file_t *fh) + ompio_file_t *fh) { int ret; mca_fs_pvfs2 *pvfs2_fs; diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c index 008ee531f8..65239a0ee5 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_set_size.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -37,7 +39,7 @@ * Returns: - Success if size is set */ int -mca_fs_pvfs2_file_set_size (mca_io_ompio_file_t *fh, +mca_fs_pvfs2_file_set_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size) { int ret; diff --git a/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c index 3a2c5ed16f..9f2bd46d6e 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_sync.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -37,7 +39,7 @@ * Returns: - Success if file closed */ int -mca_fs_pvfs2_file_sync (mca_io_ompio_file_t *fh) +mca_fs_pvfs2_file_sync (ompio_file_t *fh) { int ret; mca_fs_pvfs2 *pvfs2_fs; diff --git a/ompi/mca/fs/ufs/fs_ufs.c b/ompi/mca/fs/ufs/fs_ufs.c index b16ec9c819..e423462dfc 100644 --- a/ompi/mca/fs/ufs/fs_ufs.c +++ b/ompi/mca/fs/ufs/fs_ufs.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2014 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -59,7 +61,7 @@ int mca_fs_ufs_component_init_query(bool enable_progress_threads, } struct mca_fs_base_module_1_0_0_t * -mca_fs_ufs_component_file_query (mca_io_ompio_file_t *fh, int *priority) +mca_fs_ufs_component_file_query (ompio_file_t *fh, int *priority) { /* UFS can always be used, will however have a low priority */ @@ -71,7 +73,7 @@ mca_fs_ufs_component_file_query (mca_io_ompio_file_t *fh, int *priority) return &ufs; } -int mca_fs_ufs_component_file_unquery (mca_io_ompio_file_t *file) +int mca_fs_ufs_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -80,7 +82,7 @@ int mca_fs_ufs_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_fs_ufs_module_init (mca_io_ompio_file_t *file) +int mca_fs_ufs_module_init (ompio_file_t *file) { /* Make sure the file type is not overwritten by the last queried * component */ @@ -89,7 +91,7 @@ int mca_fs_ufs_module_init (mca_io_ompio_file_t *file) } -int mca_fs_ufs_module_finalize (mca_io_ompio_file_t *file) +int mca_fs_ufs_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/fs/ufs/fs_ufs.h b/ompi/mca/fs/ufs/fs_ufs.h index 08fb426e4e..74e5607279 100644 --- a/ompi/mca/fs/ufs/fs_ufs.h +++ b/ompi/mca/fs/ufs/fs_ufs.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -41,11 +41,11 @@ BEGIN_C_DECLS int mca_fs_ufs_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_fs_base_module_1_0_0_t * -mca_fs_ufs_component_file_query (mca_io_ompio_file_t *fh, int *priority); -int mca_fs_ufs_component_file_unquery (mca_io_ompio_file_t *file); +mca_fs_ufs_component_file_query (ompio_file_t *fh, int *priority); +int mca_fs_ufs_component_file_unquery (ompio_file_t *file); -int mca_fs_ufs_module_init (mca_io_ompio_file_t *file); -int mca_fs_ufs_module_finalize (mca_io_ompio_file_t *file); +int mca_fs_ufs_module_init (ompio_file_t *file); +int mca_fs_ufs_module_finalize (ompio_file_t *file); OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_ufs_component; /* @@ -58,22 +58,22 @@ int mca_fs_ufs_file_open (struct ompi_communicator_t *comm, const char *filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh); + ompio_file_t *fh); -int mca_fs_ufs_file_close (mca_io_ompio_file_t *fh); +int mca_fs_ufs_file_close (ompio_file_t *fh); int mca_fs_ufs_file_delete (char *filename, struct opal_info_t *info); -int mca_fs_ufs_file_set_size (mca_io_ompio_file_t *fh, +int mca_fs_ufs_file_set_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size); -int mca_fs_ufs_file_get_size (mca_io_ompio_file_t *fh, +int mca_fs_ufs_file_get_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size); -int mca_fs_ufs_file_sync (mca_io_ompio_file_t *fh); +int mca_fs_ufs_file_sync (ompio_file_t *fh); -int mca_fs_ufs_file_seek (mca_io_ompio_file_t *fh, +int mca_fs_ufs_file_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); /* diff --git a/ompi/mca/fs/ufs/fs_ufs_file_close.c b/ompi/mca/fs/ufs/fs_ufs_file_close.c index a9afee84d6..678aa67430 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_close.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_close.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +37,7 @@ * Returns: - Success if file closed */ int -mca_fs_ufs_file_close (mca_io_ompio_file_t *fh) +mca_fs_ufs_file_close (ompio_file_t *fh) { fh->f_comm->c_coll->coll_barrier (fh->f_comm, fh->f_comm->c_coll->coll_barrier_module); diff --git a/ompi/mca/fs/ufs/fs_ufs_file_get_size.c b/ompi/mca/fs/ufs/fs_ufs_file_get_size.c index fcbdb3861d..037c4fa56d 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_get_size.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_get_size.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +37,7 @@ * Returns: - Success if size is get */ int -mca_fs_ufs_file_get_size (mca_io_ompio_file_t *fh, +mca_fs_ufs_file_get_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE *size) { *size = lseek(fh->fd, 0, SEEK_END); diff --git a/ompi/mca/fs/ufs/fs_ufs_file_open.c b/ompi/mca/fs/ufs/fs_ufs_file_open.c index ada11edeb2..ea3e9d39eb 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_open.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_open.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2018 University of Houston. All rights reserved. - * Copyright (c) 2015-2017 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -46,7 +46,7 @@ mca_fs_ufs_file_open (struct ompi_communicator_t *comm, const char* filename, int access_mode, struct opal_info_t *info, - mca_io_ompio_file_t *fh) + ompio_file_t *fh) { int amode; int old_mask, perm; diff --git a/ompi/mca/fs/ufs/fs_ufs_file_set_size.c b/ompi/mca/fs/ufs/fs_ufs_file_set_size.c index 3cd2aa5338..708029c179 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_set_size.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_set_size.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -35,7 +37,7 @@ * Returns: - Success if size is set */ int -mca_fs_ufs_file_set_size (mca_io_ompio_file_t *fh, +mca_fs_ufs_file_set_size (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE size) { int err = 0; diff --git a/ompi/mca/fs/ufs/fs_ufs_file_sync.c b/ompi/mca/fs/ufs/fs_ufs_file_sync.c index 3added6009..9418a02e54 100644 --- a/ompi/mca/fs/ufs/fs_ufs_file_sync.c +++ b/ompi/mca/fs/ufs/fs_ufs_file_sync.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,7 +29,7 @@ #include "ompi/mca/fs/fs.h" int -mca_fs_ufs_file_sync (mca_io_ompio_file_t *fh) +mca_fs_ufs_file_sync (ompio_file_t *fh) { int err; diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index 0d15c742d8..e9805b7f1d 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -41,7 +41,7 @@ #include "io_ompio.h" -int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, +int ompi_io_ompio_generate_current_file_view (struct ompio_file_t *fh, size_t max_data, struct iovec **f_iov, int *iov_count) diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index f4a4c0a020..183ef51273 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -116,12 +116,12 @@ OMPI_DECLSPEC int ompi_io_ompio_sort_offlen (mca_io_ompio_offlen_array_t *io_arr int *sorted); -OMPI_DECLSPEC int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, +OMPI_DECLSPEC int ompi_io_ompio_generate_current_file_view (struct ompio_file_t *fh, size_t max_data, struct iovec **f_iov, int *iov_count); -OMPI_DECLSPEC int ompi_io_ompio_generate_groups (mca_io_ompio_file_t *fh, +OMPI_DECLSPEC int ompi_io_ompio_generate_groups (ompio_file_t *fh, int num_aggregators, int *root, int *procs_per_group, diff --git a/ompi/mca/io/ompio/io_ompio_component.c b/ompi/mca/io/ompio/io_ompio_component.c index bdacd3a266..911ed67f30 100644 --- a/ompi/mca/io/ompio/io_ompio_component.c +++ b/ompi/mca/io/ompio/io_ompio_component.c @@ -287,7 +287,7 @@ file_query(struct ompi_file_t *file, struct mca_io_base_file_t **private_data, int *priority) { - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; char *tmp; int rank; int is_lustre=0; //false @@ -324,7 +324,7 @@ file_query(struct ompi_file_t *file, /* Allocate a space for this module to hang private data (e.g., the OMPIO file handle) */ - data = calloc(1, sizeof(mca_io_ompio_data_t)); + data = calloc(1, sizeof(mca_common_ompio_data_t)); if (NULL == data) { return NULL; } diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index d9b1d1a695..37f7b308b7 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -49,7 +49,7 @@ int mca_io_ompio_file_open (ompi_communicator_t *comm, ompi_file_t *fh) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data=NULL; + mca_common_ompio_data_t *data=NULL; bool use_sharedfp = true; @@ -57,7 +57,7 @@ int mca_io_ompio_file_open (ompi_communicator_t *comm, There is virtually no way on how to reach this point from multiple threads simultaniously */ - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; if ( NULL == data ) { return OMPI_ERR_OUT_OF_RESOURCE; } @@ -83,9 +83,9 @@ int mca_io_ompio_file_open (ompi_communicator_t *comm, int mca_io_ompio_file_close (ompi_file_t *fh) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; if ( NULL == data ) { /* structure has already been freed, this is an erroneous call to file_close */ return ret; @@ -108,11 +108,11 @@ int mca_io_ompio_file_preallocate (ompi_file_t *fh, { int ret = OMPI_SUCCESS, cycles, i; OMPI_MPI_OFFSET_TYPE tmp, current_size, size, written, len; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; char *buf = NULL; ompi_status_public_t *status = NULL; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); tmp = diskspace; @@ -227,9 +227,9 @@ int mca_io_ompio_file_set_size (ompi_file_t *fh, { int ret = OMPI_SUCCESS; OMPI_MPI_OFFSET_TYPE tmp; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; tmp = size; OPAL_THREAD_LOCK(&fh->f_lock); @@ -274,9 +274,9 @@ int mca_io_ompio_file_get_size (ompi_file_t *fh, OMPI_MPI_OFFSET_TYPE *size) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_get_size(&data->ompio_fh,size); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -288,9 +288,9 @@ int mca_io_ompio_file_get_size (ompi_file_t *fh, int mca_io_ompio_file_get_amode (ompi_file_t *fh, int *amode) { - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; /* No lock necessary in this case, amode is set in file_open, and not modified later on*/ *amode = data->ompio_fh.f_amode; @@ -312,9 +312,9 @@ int mca_io_ompio_file_set_atomicity (ompi_file_t *fh, int flag) { int tmp; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); if (flag) { @@ -344,9 +344,9 @@ int mca_io_ompio_file_set_atomicity (ompi_file_t *fh, int mca_io_ompio_file_get_atomicity (ompi_file_t *fh, int *flag) { - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); *flag = data->ompio_fh.f_atomicity; @@ -358,9 +358,9 @@ int mca_io_ompio_file_get_atomicity (ompi_file_t *fh, int mca_io_ompio_file_sync (ompi_file_t *fh) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); if ( !opal_list_is_empty (&mca_common_ompio_pending_requests) ) { @@ -384,10 +384,10 @@ int mca_io_ompio_file_seek (ompi_file_t *fh, int whence) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; OMPI_MPI_OFFSET_TYPE offset, temp_offset; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); offset = off * data->ompio_fh.f_etype_size; @@ -432,10 +432,10 @@ int mca_io_ompio_file_get_position (ompi_file_t *fd, OMPI_MPI_OFFSET_TYPE *offset) { int ret=OMPI_SUCCESS; - mca_io_ompio_data_t *data=NULL; - mca_io_ompio_file_t *fh=NULL; + mca_common_ompio_data_t *data=NULL; + ompio_file_t *fh=NULL; - data = (mca_io_ompio_data_t *) fd->f_io_selected_data; + data = (mca_common_ompio_data_t *) fd->f_io_selected_data; fh = &data->ompio_fh; OPAL_THREAD_LOCK(&fd->f_lock); @@ -450,11 +450,11 @@ int mca_io_ompio_file_get_byte_offset (ompi_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, OMPI_MPI_OFFSET_TYPE *disp) { - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; int i, k, index; long temp_offset; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); temp_offset = (long) data->ompio_fh.f_view_extent * @@ -496,11 +496,11 @@ int mca_io_ompio_file_seek_shared (ompi_file_t *fp, int whence) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -522,11 +522,11 @@ int mca_io_ompio_file_get_position_shared (ompi_file_t *fp, OMPI_MPI_OFFSET_TYPE * offset) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ diff --git a/ompi/mca/io/ompio/io_ompio_file_read.c b/ompi/mca/io/ompio/io_ompio_file_read.c index 2c0d761e74..3aa4d14538 100644 --- a/ompi/mca/io/ompio/io_ompio_file_read.c +++ b/ompi/mca/io/ompio/io_ompio_file_read.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2018 University of Houston. All rights reserved. - * Copyright (c) 2017 Research Organization for Information Science + * Copyright (c) 2017-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -48,7 +48,7 @@ ** routesin are used e.g. from the shared file pointer modules. ** The main difference is, that the first one takes an ompi_file_t ** as a file pointer argument, while the second uses the ompio internal -** mca_io_ompio_file_t structure. +** ompio_file_t structure. */ int mca_io_ompio_file_read (ompi_file_t *fp, @@ -58,9 +58,9 @@ int mca_io_ompio_file_read (ompi_file_t *fp, ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; OPAL_THREAD_LOCK(&fp->f_lock); ret = mca_common_ompio_file_read(&data->ompio_fh,buf,count,datatype,status); OPAL_THREAD_UNLOCK(&fp->f_lock); @@ -76,9 +76,9 @@ int mca_io_ompio_file_read_at (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_read_at(&data->ompio_fh, offset,buf,count,datatype,status); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -93,9 +93,9 @@ int mca_io_ompio_file_iread (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_iread(&data->ompio_fh,buf,count,datatype,request); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -112,9 +112,9 @@ int mca_io_ompio_file_iread_at (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_iread_at(&data->ompio_fh,offset,buf,count,datatype,request); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -132,9 +132,9 @@ int mca_io_ompio_file_read_all (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = data->ompio_fh. @@ -161,10 +161,10 @@ int mca_io_ompio_file_iread_all (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data=NULL; - mca_io_ompio_file_t *fp=NULL; + mca_common_ompio_data_t *data=NULL; + ompio_file_t *fp=NULL; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; OPAL_THREAD_LOCK(&fh->f_lock); @@ -195,9 +195,9 @@ int mca_io_ompio_file_read_at_all (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_read_at_all(&data->ompio_fh,offset,buf,count,datatype,status); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -213,8 +213,8 @@ int mca_io_ompio_file_iread_at_all (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + mca_common_ompio_data_t *data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_iread_at_all ( &data->ompio_fh, offset, buf, count, datatype, request ); @@ -233,11 +233,11 @@ int mca_io_ompio_file_read_shared (ompi_file_t *fp, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -260,11 +260,11 @@ int mca_io_ompio_file_iread_shared (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *ompio_fh; + mca_common_ompio_data_t *data; + ompio_file_t *ompio_fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; ompio_fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -287,11 +287,11 @@ int mca_io_ompio_file_read_ordered (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *ompio_fh; + mca_common_ompio_data_t *data; + ompio_file_t *ompio_fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; ompio_fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -312,11 +312,11 @@ int mca_io_ompio_file_read_ordered_begin (ompi_file_t *fh, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *ompio_fh; + mca_common_ompio_data_t *data; + ompio_file_t *ompio_fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; ompio_fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -337,11 +337,11 @@ int mca_io_ompio_file_read_ordered_end (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *ompio_fh; + mca_common_ompio_data_t *data; + ompio_file_t *ompio_fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; ompio_fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -366,10 +366,10 @@ int mca_io_ompio_file_read_all_begin (ompi_file_t *fh, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - mca_io_ompio_file_t *fp; - mca_io_ompio_data_t *data; + ompio_file_t *fp; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; if ( true == fp->f_split_coll_in_use ) { printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); @@ -387,10 +387,10 @@ int mca_io_ompio_file_read_all_end (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_file_t *fp; - mca_io_ompio_data_t *data; + ompio_file_t *fp; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; ret = ompi_request_wait ( &fp->f_split_coll_req, status ); @@ -406,9 +406,9 @@ int mca_io_ompio_file_read_at_all_begin (ompi_file_t *fh, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fp=NULL; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + mca_common_ompio_data_t *data; + ompio_file_t *fp=NULL; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; if ( true == fp->f_split_coll_in_use ) { @@ -427,10 +427,10 @@ int mca_io_ompio_file_read_at_all_end (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fp=NULL; + mca_common_ompio_data_t *data; + ompio_file_t *fp=NULL; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; ret = ompi_request_wait ( &fp->f_split_coll_req, status ); diff --git a/ompi/mca/io/ompio/io_ompio_file_set_view.c b/ompi/mca/io/ompio/io_ompio_file_set_view.c index 3e2a7b3f7b..b3780d8ff1 100644 --- a/ompi/mca/io/ompio/io_ompio_file_set_view.c +++ b/ompi/mca/io/ompio/io_ompio_file_set_view.c @@ -10,9 +10,9 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. - * Copyright (c) 2015-2017 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. - * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. + * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -63,11 +63,11 @@ int mca_io_ompio_file_set_view (ompi_file_t *fp, opal_info_t *info) { int ret=OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; - mca_io_ompio_file_t *sh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; + ompio_file_t *sh; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; /* we need to call the internal file set view twice: once for the individual file pointer, once for the shared file pointer (if it is existent) @@ -92,10 +92,10 @@ int mca_io_ompio_file_get_view (struct ompi_file_t *fp, struct ompi_datatype_t **filetype, char *datarep) { - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; OPAL_THREAD_LOCK(&fp->f_lock); diff --git a/ompi/mca/io/ompio/io_ompio_file_write.c b/ompi/mca/io/ompio/io_ompio_file_write.c index c7b8ec0a9f..ba3e1e5f1c 100644 --- a/ompi/mca/io/ompio/io_ompio_file_write.c +++ b/ompi/mca/io/ompio/io_ompio_file_write.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2018 University of Houston. All rights reserved. - * Copyright (c) 2015-2017 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -50,7 +50,7 @@ ** routesin are used e.g. from the shared file pointer modules. ** The main difference is, that the first one takes an ompi_file_t ** as a file pointer argument, while the second uses the ompio internal -** mca_io_ompio_file_t structure. +** ompio_file_t structure. */ @@ -61,10 +61,10 @@ int mca_io_ompio_file_write (ompi_file_t *fp, ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; OPAL_THREAD_LOCK(&fp->f_lock); ret = mca_common_ompio_file_write(fh,buf,count,datatype,status); @@ -81,9 +81,9 @@ int mca_io_ompio_file_write_at (ompi_file_t *fh, ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_write_at (&data->ompio_fh, offset,buf,count,datatype,status); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -98,9 +98,9 @@ int mca_io_ompio_file_iwrite (ompi_file_t *fp, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; OPAL_THREAD_LOCK(&fp->f_lock); ret = mca_common_ompio_file_iwrite(&data->ompio_fh,buf,count,datatype,request); OPAL_THREAD_UNLOCK(&fp->f_lock); @@ -117,9 +117,9 @@ int mca_io_ompio_file_iwrite_at (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_iwrite_at(&data->ompio_fh,offset,buf,count,datatype,request); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -138,9 +138,9 @@ int mca_io_ompio_file_write_all (ompi_file_t *fh, ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = data->ompio_fh. @@ -168,9 +168,9 @@ int mca_io_ompio_file_write_at_all (ompi_file_t *fh, ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_write_at_all(&data->ompio_fh,offset,buf,count,datatype,status); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -185,10 +185,10 @@ int mca_io_ompio_file_iwrite_all (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data=NULL; - mca_io_ompio_file_t *fp=NULL; + mca_common_ompio_data_t *data=NULL; + ompio_file_t *fp=NULL; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; OPAL_THREAD_LOCK(&fh->f_lock); @@ -219,9 +219,9 @@ int mca_io_ompio_file_iwrite_at_all (ompi_file_t *fh, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; OPAL_THREAD_LOCK(&fh->f_lock); ret = mca_common_ompio_file_iwrite_at_all ( &data->ompio_fh, offset, buf, count, datatype, request ); OPAL_THREAD_UNLOCK(&fh->f_lock); @@ -240,11 +240,11 @@ int mca_io_ompio_file_write_shared (ompi_file_t *fp, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -267,11 +267,11 @@ int mca_io_ompio_file_iwrite_shared (ompi_file_t *fp, ompi_request_t **request) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -294,11 +294,11 @@ int mca_io_ompio_file_write_ordered (ompi_file_t *fp, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -320,11 +320,11 @@ int mca_io_ompio_file_write_ordered_begin (ompi_file_t *fp, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -345,11 +345,11 @@ int mca_io_ompio_file_write_ordered_end (ompi_file_t *fp, ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fh; + mca_common_ompio_data_t *data; + ompio_file_t *fh; mca_sharedfp_base_module_t * shared_fp_base_module; - data = (mca_io_ompio_data_t *) fp->f_io_selected_data; + data = (mca_common_ompio_data_t *) fp->f_io_selected_data; fh = &data->ompio_fh; /*get the shared fp module associated with this file*/ @@ -374,10 +374,10 @@ int mca_io_ompio_file_write_all_begin (ompi_file_t *fh, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - mca_io_ompio_file_t *fp; - mca_io_ompio_data_t *data; + ompio_file_t *fp; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; if ( true == fp->f_split_coll_in_use ) { printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); @@ -395,10 +395,10 @@ int mca_io_ompio_file_write_all_end (ompi_file_t *fh, ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - mca_io_ompio_file_t *fp; - mca_io_ompio_data_t *data; + ompio_file_t *fp; + mca_common_ompio_data_t *data; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; ret = ompi_request_wait ( &fp->f_split_coll_req, status ); @@ -415,10 +415,10 @@ int mca_io_ompio_file_write_at_all_begin (ompi_file_t *fh, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data=NULL; - mca_io_ompio_file_t *fp=NULL; + mca_common_ompio_data_t *data=NULL; + ompio_file_t *fp=NULL; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; if ( true == fp->f_split_coll_in_use ) { @@ -439,10 +439,10 @@ int mca_io_ompio_file_write_at_all_end (ompi_file_t *fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; - mca_io_ompio_file_t *fp=NULL; + mca_common_ompio_data_t *data; + ompio_file_t *fp=NULL; - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_io_selected_data; fp = &data->ompio_fh; ret = ompi_request_wait ( &fp->f_split_coll_req, status ); diff --git a/ompi/mca/sharedfp/base/base.h b/ompi/mca/sharedfp/base/base.h index 216b85d8b5..fda473be24 100644 --- a/ompi/mca/sharedfp/base/base.h +++ b/ompi/mca/sharedfp/base/base.h @@ -12,6 +12,8 @@ * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2011 University of Houston. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,8 +34,9 @@ #include "mpi.h" #include "opal/class/opal_list.h" -#include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/mca.h" +#include "ompi/mca/common/ompio/common_ompio.h" +#include "ompi/mca/sharedfp/sharedfp.h" BEGIN_C_DECLS @@ -43,17 +46,17 @@ BEGIN_C_DECLS */ OMPI_DECLSPEC extern mca_base_framework_t ompi_sharedfp_base_framework; /* select a component */ -OMPI_DECLSPEC int mca_sharedfp_base_file_select(struct mca_io_ompio_file_t *file, +OMPI_DECLSPEC int mca_sharedfp_base_file_select(struct ompio_file_t *file, mca_base_component_t *preferred); -OMPI_DECLSPEC int mca_sharedfp_base_file_unselect(struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_sharedfp_base_file_unselect(struct ompio_file_t *file); OMPI_DECLSPEC int mca_sharedfp_base_find_available(bool enable_progress_threads, bool enable_mpi_threads); -OMPI_DECLSPEC int mca_sharedfp_base_init_file (struct mca_io_ompio_file_t *file); +OMPI_DECLSPEC int mca_sharedfp_base_init_file (struct ompio_file_t *file); -OMPI_DECLSPEC int mca_sharedfp_base_get_param (struct mca_io_ompio_file_t *file, int keyval); +OMPI_DECLSPEC int mca_sharedfp_base_get_param (struct ompio_file_t *file, int keyval); /* * Globals */ diff --git a/ompi/mca/sharedfp/base/sharedfp_base_file_select.c b/ompi/mca/sharedfp/base/sharedfp_base_file_select.c index e295af2db9..a6fe773df4 100644 --- a/ompi/mca/sharedfp/base/sharedfp_base_file_select.c +++ b/ompi/mca/sharedfp/base/sharedfp_base_file_select.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -63,7 +65,7 @@ static OBJ_CLASS_INSTANCE(queried_module_t, opal_list_item_t, NULL, NULL); * their module but were unfortunate to not get selected */ -int mca_sharedfp_base_file_select (struct mca_io_ompio_file_t *file, +int mca_sharedfp_base_file_select (struct ompio_file_t *file, mca_base_component_t *preferred) { int priority; diff --git a/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c b/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c index 3c341fe09d..0d4b2930d5 100644 --- a/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c +++ b/ompi/mca/sharedfp/base/sharedfp_base_file_unselect.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -32,7 +34,7 @@ #include "ompi/mca/common/ompio/common_ompio.h" -int mca_sharedfp_base_file_unselect(mca_io_ompio_file_t *file) +int mca_sharedfp_base_file_unselect(ompio_file_t *file) { if (NULL != file->f_sharedfp && NULL != file->f_sharedfp->sharedfp_module_finalize) { return file->f_sharedfp->sharedfp_module_finalize(file); diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual.c b/ompi/mca/sharedfp/individual/sharedfp_individual.c index 9eea5c1263..2d66e20197 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2013-2015 University of Houston. All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -68,7 +70,7 @@ int mca_sharedfp_individual_component_init_query(bool enable_progress_threads, return OMPI_SUCCESS; } -struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_individual_component_file_query (mca_io_ompio_file_t *fh, int *priority) { +struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_individual_component_file_query (ompio_file_t *fh, int *priority) { int amode; bool wronly_flag=false; @@ -152,7 +154,7 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_individual_component_file return NULL; } -int mca_sharedfp_individual_component_file_unquery (mca_io_ompio_file_t *file) +int mca_sharedfp_individual_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -161,13 +163,13 @@ int mca_sharedfp_individual_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_sharedfp_individual_module_init (mca_io_ompio_file_t *file) +int mca_sharedfp_individual_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_sharedfp_individual_module_finalize (mca_io_ompio_file_t *file) +int mca_sharedfp_individual_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual.h b/ompi/mca/sharedfp/individual/sharedfp_individual.h index 8674711cbb..6bb15ebd70 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual.h +++ b/ompi/mca/sharedfp/individual/sharedfp_individual.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -34,11 +34,11 @@ BEGIN_C_DECLS int mca_sharedfp_individual_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_sharedfp_base_module_1_0_0_t * - mca_sharedfp_individual_component_file_query (mca_io_ompio_file_t *file, int *priority); -int mca_sharedfp_individual_component_file_unquery (mca_io_ompio_file_t *file); + mca_sharedfp_individual_component_file_query (ompio_file_t *file, int *priority); +int mca_sharedfp_individual_component_file_unquery (ompio_file_t *file); -int mca_sharedfp_individual_module_init (mca_io_ompio_file_t *file); -int mca_sharedfp_individual_module_finalize (mca_io_ompio_file_t *file); +int mca_sharedfp_individual_module_init (ompio_file_t *file); +int mca_sharedfp_individual_module_finalize (ompio_file_t *file); extern int mca_sharedfp_individual_priority; extern int mca_sharedfp_individual_verbose; @@ -51,51 +51,51 @@ OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_ind */ /*IMPORANT: Update here when implementing functions from sharedfp API*/ -int mca_sharedfp_individual_get_position(mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_get_position(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); -int mca_sharedfp_individual_seek (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, const char* filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh); -int mca_sharedfp_individual_file_close (mca_io_ompio_file_t *fh); -int mca_sharedfp_individual_read (mca_io_ompio_file_t *fh, + ompio_file_t *fh); +int mca_sharedfp_individual_file_close (ompio_file_t *fh); +int mca_sharedfp_individual_read (ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status); -int mca_sharedfp_individual_read_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_read_ordered (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -int mca_sharedfp_individual_read_ordered_begin (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_read_ordered_begin (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); -int mca_sharedfp_individual_read_ordered_end (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_read_ordered_end (ompio_file_t *fh, void *buf, ompi_status_public_t *status); -int mca_sharedfp_individual_iread (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_iread (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write_ordered (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -int mca_sharedfp_individual_write_ordered_begin (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write_ordered_begin (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype); -int mca_sharedfp_individual_write_ordered_end (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write_ordered_end (ompio_file_t *fh, const void *buf, ompi_status_public_t *status); -int mca_sharedfp_individual_iwrite (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_iwrite (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -127,8 +127,8 @@ typedef struct mca_sharedfp_individual_header_record_s{ int numofrecordsonfile; /* Number of records in the metadatafile*/ MPI_Offset datafile_offset; MPI_Offset metadatafile_offset; - mca_io_ompio_file_t * datafilehandle; - mca_io_ompio_file_t * metadatafilehandle; + ompio_file_t * datafilehandle; + ompio_file_t * metadatafilehandle; char * datafilename; /*for now need to delete this on file close*/ char * metadatafilename; /*for now need to delete this on file close*/ MPI_Offset metafile_start_offset; diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c index 90e106700a..7df9113869 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_file_open.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -35,23 +35,23 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, const char* filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh) + ompio_file_t *fh) { int err = 0; int rank; char * datafilename; /*The array size would change as it is based on the current path*/ char * metadatafilename; /*The array size would change as it is based on the current path*/ - mca_io_ompio_file_t * datafilehandle; - mca_io_ompio_file_t * metadatafilehandle; + ompio_file_t * datafilehandle; + ompio_file_t * metadatafilehandle; mca_sharedfp_individual_header_record* headnode = NULL; struct mca_sharedfp_base_data_t* sh; - mca_io_ompio_file_t * shfileHandle; + ompio_file_t * shfileHandle; size_t len=0; /*-------------------------------------------------*/ /*Open the same file again without shared file pointer*/ /*-------------------------------------------------*/ - shfileHandle = (mca_io_ompio_file_t *) malloc ( sizeof(mca_io_ompio_file_t)); + shfileHandle = (ompio_file_t *) malloc ( sizeof(ompio_file_t)); if ( NULL == shfileHandle ) { opal_output(0, "mca_sharedfp_individual_file_open: unable to allocate memory\n"); return OMPI_ERR_OUT_OF_RESOURCE; @@ -104,7 +104,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, snprintf(datafilename, len, "%s%s%d",filename,".data.",rank); - datafilehandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); + datafilehandle = (ompio_file_t *)malloc(sizeof(ompio_file_t)); if ( NULL == datafilehandle ) { opal_output(0, "mca_sharedfp_individual_file_open: unable to allocate memory\n"); free ( shfileHandle ); @@ -145,7 +145,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, } snprintf ( metadatafilename, len, "%s%s%d", filename, ".metadata.",rank); - metadatafilehandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); + metadatafilehandle = (ompio_file_t *)malloc(sizeof(ompio_file_t)); if ( NULL == metadatafilehandle ) { free (shfileHandle ); free (sh); @@ -184,7 +184,7 @@ int mca_sharedfp_individual_file_open (struct ompi_communicator_t *comm, return err; } -int mca_sharedfp_individual_file_close (mca_io_ompio_file_t *fh) +int mca_sharedfp_individual_file_close (ompio_file_t *fh) { mca_sharedfp_individual_header_record* headnode = NULL; struct mca_sharedfp_base_data_t *sh; diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_get_position.c b/ompi/mca/sharedfp/individual/sharedfp_individual_get_position.c index 572f021111..4317f0f078 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_get_position.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_get_position.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" int -mca_sharedfp_individual_get_position(mca_io_ompio_file_t *fh, +mca_sharedfp_individual_get_position(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset) { opal_output(0,"mca_sharedfp_individual_get_position: NOT IMPLEMENTED\n"); diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c index cfe39b5966..72847c8d11 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_iwrite.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -28,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_iwrite(ompio_file_t *fh, const void *buf, int count, ompi_datatype_t *datatype, @@ -89,7 +89,7 @@ int mca_sharedfp_individual_iwrite(mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_individual_write_ordered_begin(mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write_ordered_begin(ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype) @@ -213,7 +213,7 @@ exit: return ret; } -int mca_sharedfp_individual_write_ordered_end(mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write_ordered_end(ompio_file_t *fh, const void *buf, ompi_status_public_t *status) { diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_read.c b/ompi/mca/sharedfp/individual/sharedfp_individual_read.c index a14ae8323d..fa6953e385 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_read.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_read.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,21 +28,21 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_individual_read ( mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_read ( ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { opal_output(0,"mca_sharedfp_individual_read: NOT SUPPORTED by this component\n"); return OMPI_ERROR; } -int mca_sharedfp_individual_read_ordered ( mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_read_ordered ( ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { opal_output(0,"mca_sharedfp_individual_read_ordered: NOT SUPPORTED by this component\n"); return OMPI_ERROR; } -int mca_sharedfp_individual_iread(mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_iread(ompio_file_t *fh, void *buf, int count, ompi_datatype_t *datatype, @@ -50,7 +52,7 @@ int mca_sharedfp_individual_iread(mca_io_ompio_file_t *fh, return OMPI_ERROR; } -int mca_sharedfp_individual_read_ordered_begin(mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_read_ordered_begin(ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype) @@ -59,7 +61,7 @@ int mca_sharedfp_individual_read_ordered_begin(mca_io_ompio_file_t *fh, return OMPI_ERROR; } -int mca_sharedfp_individual_read_ordered_end(mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_read_ordered_end(ompio_file_t *fh, void *buf, ompi_status_public_t *status) { diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c b/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c index 7a6071e3c5..4abed093e5 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_seek.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -25,7 +27,7 @@ #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" -int mca_sharedfp_individual_seek (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence) { opal_output(0,"mca_sharedfp_individual_seek: NOT IMPLEMENTED\n"); diff --git a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c index e6e8f94068..952bafe182 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_write.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_write.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -28,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -86,7 +86,7 @@ int mca_sharedfp_individual_write (mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_individual_write_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_individual_write_ordered (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c index 06c433cffc..c49f21cc27 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -72,7 +74,7 @@ int mca_sharedfp_lockedfile_component_init_query(bool enable_progress_threads, return OMPI_SUCCESS; } -struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file_query(mca_io_ompio_file_t *fh, int *priority) { +struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file_query(ompio_file_t *fh, int *priority) { struct flock lock; int fd, err; /*char *filename;*/ @@ -169,7 +171,7 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_lockedfile_component_file return NULL; } -int mca_sharedfp_lockedfile_component_file_unquery (mca_io_ompio_file_t *file) +int mca_sharedfp_lockedfile_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -178,13 +180,13 @@ int mca_sharedfp_lockedfile_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_sharedfp_lockedfile_module_init (mca_io_ompio_file_t *file) +int mca_sharedfp_lockedfile_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_sharedfp_lockedfile_module_finalize (mca_io_ompio_file_t *file) +int mca_sharedfp_lockedfile_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h index 2eede80bb7..ba1d68fcf6 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile.h @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -34,11 +34,11 @@ BEGIN_C_DECLS int mca_sharedfp_lockedfile_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_sharedfp_base_module_1_0_0_t * - mca_sharedfp_lockedfile_component_file_query (mca_io_ompio_file_t *file, int *priority); -int mca_sharedfp_lockedfile_component_file_unquery (mca_io_ompio_file_t *file); + mca_sharedfp_lockedfile_component_file_query (ompio_file_t *file, int *priority); +int mca_sharedfp_lockedfile_component_file_unquery (ompio_file_t *file); -int mca_sharedfp_lockedfile_module_init (mca_io_ompio_file_t *file); -int mca_sharedfp_lockedfile_module_finalize (mca_io_ompio_file_t *file); +int mca_sharedfp_lockedfile_module_init (ompio_file_t *file); +int mca_sharedfp_lockedfile_module_finalize (ompio_file_t *file); extern int mca_sharedfp_lockedfile_priority; extern int mca_sharedfp_lockedfile_verbose; @@ -51,52 +51,52 @@ OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_loc */ /*IMPORANT: Update here when implementing functions from sharedfp API*/ -int mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); -int mca_sharedfp_lockedfile_get_position (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_get_position (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, const char* filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh); -int mca_sharedfp_lockedfile_file_close (mca_io_ompio_file_t *fh); -int mca_sharedfp_lockedfile_read (mca_io_ompio_file_t *fh, + ompio_file_t *fh); +int mca_sharedfp_lockedfile_file_close (ompio_file_t *fh); +int mca_sharedfp_lockedfile_read (ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status); -int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_read_ordered (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status ); -int mca_sharedfp_lockedfile_read_ordered_begin (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_read_ordered_begin (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); -int mca_sharedfp_lockedfile_read_ordered_end (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_read_ordered_end (ompio_file_t *fh, void *buf, ompi_status_public_t *status); -int mca_sharedfp_lockedfile_iread (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_iread (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write_ordered (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -int mca_sharedfp_lockedfile_write_ordered_begin (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write_ordered_begin (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype); -int mca_sharedfp_lockedfile_write_ordered_end (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write_ordered_end (ompio_file_t *fh, const void *buf, ompi_status_public_t *status); -int mca_sharedfp_lockedfile_iwrite (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_iwrite (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c index 89bdf56aa4..516cd8aff5 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_file_open.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2017 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -40,27 +40,27 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, const char* filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh) + ompio_file_t *fh) { int err = MPI_SUCCESS; char * lockedfilename; int handle, rank; struct mca_sharedfp_lockedfile_data * module_data = NULL; struct mca_sharedfp_base_data_t* sh; - mca_io_ompio_file_t * shfileHandle, *ompio_fh; - mca_io_ompio_data_t *data; + ompio_file_t * shfileHandle, *ompio_fh; + mca_common_ompio_data_t *data; /*------------------------------------------------------------*/ /*Open the same file again without shared file pointer support*/ /*------------------------------------------------------------*/ - shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); + shfileHandle = (ompio_file_t *)malloc(sizeof(ompio_file_t)); err = mca_common_ompio_file_open(comm,filename,amode,info,shfileHandle,false); if ( OMPI_SUCCESS != err) { opal_output(0, "mca_sharedfp_lockedfile_file_open: Error during file open\n"); return err; } shfileHandle->f_fh = fh->f_fh; - data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_fh->f_io_selected_data; ompio_fh = &data->ompio_fh; err = mca_common_ompio_set_view (shfileHandle, @@ -156,7 +156,7 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm, return err; } -int mca_sharedfp_lockedfile_file_close (mca_io_ompio_file_t *fh) +int mca_sharedfp_lockedfile_file_close (ompio_file_t *fh) { int err = OMPI_SUCCESS; struct mca_sharedfp_lockedfile_data * module_data = NULL; diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_get_position.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_get_position.c index 65e56b416d..2faf64cd4a 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_get_position.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_get_position.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2013 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,7 +29,7 @@ #include "ompi/mca/sharedfp/base/base.h" int -mca_sharedfp_lockedfile_get_position(mca_io_ompio_file_t *fh, +mca_sharedfp_lockedfile_get_position(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset) { int ret = OMPI_SUCCESS; diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c index e23ee6eb11..dd671ae960 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c @@ -29,7 +29,7 @@ #include "ompi/mca/sharedfp/base/base.h" #include "ompi/mca/common/ompio/common_ompio.h" -int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_iread(ompio_file_t *fh, void *buf, int count, ompi_datatype_t *datatype, @@ -90,7 +90,7 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_read_ordered_begin(ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype) @@ -219,7 +219,7 @@ exit: } -int mca_sharedfp_lockedfile_read_ordered_end(mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_read_ordered_end(ompio_file_t *fh, void *buf, ompi_status_public_t *status) { diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c index dbc64909cc..b3b251f95b 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c @@ -29,7 +29,7 @@ #include "ompi/mca/sharedfp/base/base.h" #include "ompi/mca/common/ompio/common_ompio.h" -int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_iwrite(ompio_file_t *fh, const void *buf, int count, ompi_datatype_t *datatype, @@ -88,7 +88,7 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write_ordered_begin(ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype) @@ -217,7 +217,7 @@ exit: -int mca_sharedfp_lockedfile_write_ordered_end(mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write_ordered_end(ompio_file_t *fh, const void *buf, ompi_status_public_t *status) { diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c index 369360adbf..430512d692 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_read.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_read ( ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { int ret = OMPI_SUCCESS; @@ -83,7 +85,7 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_read_ordered (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c index 19feb9a4e3..ea26c21753 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_seek.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,7 +32,7 @@ #include int -mca_sharedfp_lockedfile_seek (mca_io_ompio_file_t *fh, +mca_sharedfp_lockedfile_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence) { int rank; diff --git a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c index 94e596be59..058faf2b76 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_write.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -28,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -86,7 +86,7 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_lockedfile_write_ordered (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/sharedfp/sharedfp.h b/ompi/mca/sharedfp/sharedfp.h index 2d5d969315..f1a416e345 100644 --- a/ompi/mca/sharedfp/sharedfp.h +++ b/ompi/mca/sharedfp/sharedfp.h @@ -13,7 +13,7 @@ * Copyright (c) 2008-2013 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -36,7 +36,7 @@ BEGIN_C_DECLS -struct mca_io_ompio_file_t; +struct ompio_file_t; struct ompi_file_t; /* * Macro for use in components that are of type coll @@ -80,10 +80,10 @@ typedef int (*mca_sharedfp_base_component_init_query_1_0_0_fn_t) typedef struct mca_sharedfp_base_module_1_0_0_t * (*mca_sharedfp_base_component_file_query_1_0_0_fn_t) - (struct mca_io_ompio_file_t *file, int *priority); + (struct ompio_file_t *file, int *priority); typedef int (*mca_sharedfp_base_component_file_unquery_1_0_0_fn_t) - (struct mca_io_ompio_file_t *file); + (struct ompio_file_t *file); /* * ****************** component struct ****************************** @@ -111,75 +111,75 @@ typedef struct mca_sharedfp_base_component_2_0_0_t mca_sharedfp_base_component_t */ typedef int (*mca_sharedfp_base_module_init_1_0_0_fn_t) -(struct mca_io_ompio_file_t *file); +(struct ompio_file_t *file); typedef int (*mca_sharedfp_base_module_finalize_1_0_0_fn_t) -(struct mca_io_ompio_file_t *file); +(struct ompio_file_t *file); /* SHAREDFP function definitions */ /* IMPORTANT: Update here when adding sharedfp component interface functions*/ typedef int (*mca_sharedfp_base_module_seek_fn_t)( - struct mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); + struct ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); typedef int (*mca_sharedfp_base_module_get_position_fn_t)( - struct mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); + struct ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); typedef int (*mca_sharedfp_base_module_write_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); typedef int (*mca_sharedfp_base_module_write_ordered_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); typedef int (*mca_sharedfp_base_module_write_ordered_begin_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype); typedef int (*mca_sharedfp_base_module_write_ordered_end_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, const void *buf, ompi_status_public_t *status); typedef int (*mca_sharedfp_base_module_iwrite_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t ** request); typedef int (*mca_sharedfp_base_module_read_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); typedef int (*mca_sharedfp_base_module_read_ordered_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); typedef int (*mca_sharedfp_base_module_iread_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t ** request); typedef int (*mca_sharedfp_base_module_read_ordered_begin_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); typedef int (*mca_sharedfp_base_module_read_ordered_end_fn_t)( - struct mca_io_ompio_file_t *fh, + struct ompio_file_t *fh, void *buf, ompi_status_public_t *status); typedef int (*mca_sharedfp_base_module_file_open_fn_t)( struct ompi_communicator_t *comm, const char *filename, int amode, - struct opal_info_t *info, struct mca_io_ompio_file_t *fh); -typedef int (*mca_sharedfp_base_module_file_close_fn_t)(struct mca_io_ompio_file_t *fh); + struct opal_info_t *info, struct ompio_file_t *fh); +typedef int (*mca_sharedfp_base_module_file_close_fn_t)(struct ompio_file_t *fh); /* @@ -223,7 +223,7 @@ typedef mca_sharedfp_base_module_1_0_0_t mca_sharedfp_base_module_t; */ struct mca_sharedfp_base_data_t{ /* attributes that will be used by all of the sharedfp components */ - struct mca_io_ompio_file_t * sharedfh; + struct ompio_file_t * sharedfh; OMPI_MPI_OFFSET_TYPE global_offset; struct ompi_communicator_t * comm; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm.c b/ompi/mca/sharedfp/sm/sharedfp_sm.c index bc28839e6a..498c02d716 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2008-2013 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -67,7 +69,7 @@ int mca_sharedfp_sm_component_init_query(bool enable_progress_threads, return OMPI_SUCCESS; } -struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(mca_io_ompio_file_t *fh, int *priority) +struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(ompio_file_t *fh, int *priority) { int i; ompi_proc_t *proc; @@ -97,7 +99,7 @@ struct mca_sharedfp_base_module_1_0_0_t * mca_sharedfp_sm_component_file_query(m return &sm; } -int mca_sharedfp_sm_component_file_unquery (mca_io_ompio_file_t *file) +int mca_sharedfp_sm_component_file_unquery (ompio_file_t *file) { /* This function might be needed for some purposes later. for now it * does not have anything to do since there are no steps which need @@ -106,13 +108,13 @@ int mca_sharedfp_sm_component_file_unquery (mca_io_ompio_file_t *file) return OMPI_SUCCESS; } -int mca_sharedfp_sm_module_init (mca_io_ompio_file_t *file) +int mca_sharedfp_sm_module_init (ompio_file_t *file) { return OMPI_SUCCESS; } -int mca_sharedfp_sm_module_finalize (mca_io_ompio_file_t *file) +int mca_sharedfp_sm_module_finalize (ompio_file_t *file) { return OMPI_SUCCESS; } diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm.h b/ompi/mca/sharedfp/sm/sharedfp_sm.h index ec8d0f4ed6..b1f45c0adc 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm.h +++ b/ompi/mca/sharedfp/sm/sharedfp_sm.h @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2008-2016 University of Houston. All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -35,11 +35,11 @@ BEGIN_C_DECLS int mca_sharedfp_sm_component_init_query(bool enable_progress_threads, bool enable_mpi_threads); struct mca_sharedfp_base_module_1_0_0_t * - mca_sharedfp_sm_component_file_query (mca_io_ompio_file_t *file, int *priority); -int mca_sharedfp_sm_component_file_unquery (mca_io_ompio_file_t *file); + mca_sharedfp_sm_component_file_query (ompio_file_t *file, int *priority); +int mca_sharedfp_sm_component_file_unquery (ompio_file_t *file); -int mca_sharedfp_sm_module_init (mca_io_ompio_file_t *file); -int mca_sharedfp_sm_module_finalize (mca_io_ompio_file_t *file); +int mca_sharedfp_sm_module_init (ompio_file_t *file); +int mca_sharedfp_sm_module_finalize (ompio_file_t *file); extern int mca_sharedfp_sm_priority; extern int mca_sharedfp_sm_verbose; @@ -51,52 +51,52 @@ OMPI_MODULE_DECLSPEC extern mca_sharedfp_base_component_2_0_0_t mca_sharedfp_sm_ * ****************************************************************** */ /*IMPORANT: Update here when implementing functions from sharedfp API*/ -int mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence); -int mca_sharedfp_sm_get_position (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_get_position (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset); int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, const char* filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh); -int mca_sharedfp_sm_file_close (mca_io_ompio_file_t *fh); -int mca_sharedfp_sm_read (mca_io_ompio_file_t *fh, + ompio_file_t *fh); +int mca_sharedfp_sm_file_close (ompio_file_t *fh); +int mca_sharedfp_sm_read (ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status); -int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_read_ordered (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status ); -int mca_sharedfp_sm_read_ordered_begin (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_read_ordered_begin (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype); -int mca_sharedfp_sm_read_ordered_end (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_read_ordered_end (ompio_file_t *fh, void *buf, ompi_status_public_t *status); -int mca_sharedfp_sm_iread (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_iread (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, ompi_request_t **request); -int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write_ordered (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); -int mca_sharedfp_sm_write_ordered_begin (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write_ordered_begin (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype); -int mca_sharedfp_sm_write_ordered_end (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write_ordered_end (ompio_file_t *fh, const void *buf, ompi_status_public_t *status); -int mca_sharedfp_sm_iwrite (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_iwrite (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c index 4ed76e12a8..d896d9245f 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_file_open.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2013-2017 University of Houston. All rights reserved. * Copyright (c) 2013 Intel, Inc. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. @@ -50,18 +50,18 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, const char* filename, int amode, struct opal_info_t *info, - mca_io_ompio_file_t *fh) + ompio_file_t *fh) { int err = OMPI_SUCCESS; struct mca_sharedfp_base_data_t* sh; struct mca_sharedfp_sm_data * sm_data = NULL; - mca_io_ompio_file_t * shfileHandle, *ompio_fh; + ompio_file_t * shfileHandle, *ompio_fh; char * filename_basename; char * sm_filename; int sm_filename_length; struct mca_sharedfp_sm_offset * sm_offset_ptr; struct mca_sharedfp_sm_offset sm_offset; - mca_io_ompio_data_t *data; + mca_common_ompio_data_t *data; int sm_fd; int rank; uint32_t comm_cid; @@ -69,7 +69,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, /*----------------------------------------------------*/ /*Open the same file again without shared file pointer*/ /*----------------------------------------------------*/ - shfileHandle = (mca_io_ompio_file_t *)malloc(sizeof(mca_io_ompio_file_t)); + shfileHandle = (ompio_file_t *)malloc(sizeof(ompio_file_t)); if ( NULL == shfileHandle ) { opal_output(0, "mca_sharedfp_sm_file_open: Error during memory allocation\n"); return OMPI_ERR_OUT_OF_RESOURCE; @@ -81,7 +81,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, return err; } shfileHandle->f_fh = fh->f_fh; - data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data; + data = (mca_common_ompio_data_t *) fh->f_fh->f_io_selected_data; ompio_fh = &data->ompio_fh; err = mca_common_ompio_set_view (shfileHandle, @@ -240,7 +240,7 @@ int mca_sharedfp_sm_file_open (struct ompi_communicator_t *comm, return err; } -int mca_sharedfp_sm_file_close (mca_io_ompio_file_t *fh) +int mca_sharedfp_sm_file_close (ompio_file_t *fh) { int err = OMPI_SUCCESS; /*sharedfp data structure*/ diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c b/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c index 35e8b609ba..dfb8268937 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_get_position.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -27,7 +29,7 @@ #include "ompi/mca/sharedfp/base/base.h" int -mca_sharedfp_sm_get_position(mca_io_ompio_file_t *fh, +mca_sharedfp_sm_get_position(ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE * offset) { int ret = OMPI_SUCCESS; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c index 57a70ad046..5075741714 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iread.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_iread(ompio_file_t *fh, void *buf, int count, ompi_datatype_t *datatype, @@ -84,7 +86,7 @@ int mca_sharedfp_sm_iread(mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_sm_read_ordered_begin(mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_read_ordered_begin(ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype) @@ -215,7 +217,7 @@ exit: } -int mca_sharedfp_sm_read_ordered_end(mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_read_ordered_end(ompio_file_t *fh, void *buf, ompi_status_public_t *status) { diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c index 519dc8736d..7808e60851 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_iwrite.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -28,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_iwrite(ompio_file_t *fh, const void *buf, int count, ompi_datatype_t *datatype, @@ -87,7 +87,7 @@ int mca_sharedfp_sm_iwrite(mca_io_ompio_file_t *fh, } -int mca_sharedfp_sm_write_ordered_begin(mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write_ordered_begin(ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype) @@ -218,7 +218,7 @@ exit: } -int mca_sharedfp_sm_write_ordered_end(mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write_ordered_end(ompio_file_t *fh, const void *buf, ompi_status_public_t *status) { diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c index 67d42c99bb..7b83ef76b7 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_read.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_read.c @@ -10,6 +10,8 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -26,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_read ( ompio_file_t *fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) { int ret = OMPI_SUCCESS; @@ -83,7 +85,7 @@ int mca_sharedfp_sm_read ( mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_sm_read_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_read_ordered (ompio_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c b/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c index 72ae1d913c..9f6bfb9923 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_seek.c @@ -11,6 +11,8 @@ * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2018 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,7 +33,7 @@ #include int -mca_sharedfp_sm_seek (mca_io_ompio_file_t *fh, +mca_sharedfp_sm_seek (ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, int whence) { int rank, status=0; diff --git a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c index da05a40372..add78d9b15 100644 --- a/ompi/mca/sharedfp/sm/sharedfp_sm_write.c +++ b/ompi/mca/sharedfp/sm/sharedfp_sm_write.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2013-2016 University of Houston. All rights reserved. - * Copyright (c) 2015 Research Organization for Information Science + * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -28,7 +28,7 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype, @@ -87,7 +87,7 @@ int mca_sharedfp_sm_write (mca_io_ompio_file_t *fh, return ret; } -int mca_sharedfp_sm_write_ordered (mca_io_ompio_file_t *fh, +int mca_sharedfp_sm_write_ordered (ompio_file_t *fh, const void *buf, int count, struct ompi_datatype_t *datatype,