diff --git a/ompi/mca/common/ompio/Makefile.am b/ompi/mca/common/ompio/Makefile.am index aa7112cb03..6eda4644b8 100644 --- a/ompi/mca/common/ompio/Makefile.am +++ b/ompi/mca/common/ompio/Makefile.am @@ -11,7 +11,7 @@ # All rights reserved. # Copyright (c) 2008-2016 University of Houston. All rights reserved. # Copyright (c) 2016 IBM Corporation. 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$ @@ -22,11 +22,13 @@ # headers = \ + common_ompio_aggregators.h \ common_ompio_print_queue.h \ common_ompio_request.h \ common_ompio.h sources = \ + common_ompio_aggregators.c \ common_ompio_print_queue.c \ common_ompio_request.c \ common_ompio_file_open.c \ diff --git a/ompi/mca/common/ompio/common_ompio.h b/ompi/mca/common/ompio/common_ompio.h index 2edb9d280c..82abd089fb 100644 --- a/ompi/mca/common/ompio/common_ompio.h +++ b/ompi/mca/common/ompio/common_ompio.h @@ -11,6 +11,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 @@ -21,72 +23,293 @@ #ifndef MCA_COMMON_OMPIO_H #define MCA_COMMON_OMPIO_H -#include "ompi/mca/common/ompio/common_ompio_print_queue.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include -OMPI_DECLSPEC int mca_common_ompio_file_write (mca_io_ompio_file_t *fh, const void *buf, int count, +#include "mpi.h" +#include "opal/class/opal_list.h" +#include "ompi/errhandler/errhandler.h" +#include "opal/threads/mutex.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/fs/fs.h" +#include "ompi/mca/fcoll/fcoll.h" +#include "ompi/mca/fbtl/fbtl.h" +#include "ompi/mca/sharedfp/sharedfp.h" +#include "ompi/communicator/communicator.h" +#include "ompi/info/info.h" +#include "opal/datatype/opal_convertor.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/request/request.h" + +#define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define OMPIO_MAX(a, b) (((a) < (b)) ? (b) : (a)) + +#define OMPIO_MCA_GET(fh, name) ((fh)->f_get_mca_parameter_value(#name, strlen(#name)+1)) + +/* + * Flags + */ +#define OMPIO_CONTIGUOUS_MEMORY 0x00000001 +#define OMPIO_UNIFORM_FVIEW 0x00000002 +#define OMPIO_FILE_IS_OPEN 0x00000004 +#define OMPIO_FILE_VIEW_IS_SET 0x00000008 +#define OMPIO_CONTIGUOUS_FVIEW 0x00000010 +#define OMPIO_AGGREGATOR_IS_SET 0x00000020 +#define OMPIO_SHAREDFP_IS_SET 0x00000040 +#define OMPIO_LOCK_ENTIRE_FILE 0x00000080 +#define OMPIO_LOCK_NEVER 0x00000100 +#define OMPIO_LOCK_NOT_THIS_OP 0x00000200 + + +#define OMPIO_ROOT 0 + +/*AGGREGATOR GROUPING DECISIONS*/ +#define OMPIO_MERGE 1 +#define OMPIO_SPLIT 2 +#define OMPIO_RETAIN 3 + +#define DATA_VOLUME 1 +#define UNIFORM_DISTRIBUTION 2 +#define CONTIGUITY 3 +#define OPTIMIZE_GROUPING 4 +#define SIMPLE 5 +#define NO_REFINEMENT 6 +#define SIMPLE_PLUS 7 + +#define OMPIO_LOCK_ENTIRE_REGION 10 +#define OMPIO_LOCK_SELECTIVE 11 + +#define OMPIO_FCOLL_WANT_TIME_BREAKDOWN 0 +#define MCA_IO_DEFAULT_FILE_VIEW_SIZE 4*1024*1024 + +#define OMPIO_UNIFORM_DIST_THRESHOLD 0.5 +#define OMPIO_CONTG_THRESHOLD 1048576 +#define OMPIO_CONTG_FACTOR 8 +#define OMPIO_DEFAULT_STRIPE_SIZE 1048576 +#define OMPIO_PROCS_PER_GROUP_TAG 0 +#define OMPIO_PROCS_IN_GROUP_TAG 1 +#define OMPIO_MERGE_THRESHOLD 0.5 + +#define OMPIO_PERM_NULL -1 +#define OMPIO_IOVEC_INITIAL_SIZE 100 + +enum ompio_fs_type +{ + NONE = 0, + UFS = 1, + PVFS2 = 2, + LUSTRE = 3, + PLFS = 4 +}; + +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_common_ompio_server_t io_server;*/ +} mca_common_ompio_io_array_t; + + +typedef struct mca_common_ompio_access_array_t{ + OMPI_MPI_OFFSET_TYPE *offsets; + int *lens; + MPI_Aint *mem_ptrs; + int count; +} mca_common_ompio_access_array_t; + + +/* forward declaration to keep the compiler happy. */ +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_common_ompio_get_mca_parameter_value_fn_t) ( char *mca_parameter_name, int name_length ); + + +struct mca_common_ompio_print_queue; + +/** + * Back-end structure for MPI_File + */ +struct ompio_file_t { + /* General parameters */ + int fd; + struct ompi_file_t *f_fh; /* pointer back to the file_t structure */ + OMPI_MPI_OFFSET_TYPE f_offset; /* byte offset of current position */ + OMPI_MPI_OFFSET_TYPE f_disp; /* file_view displacement */ + int f_rank; + int f_size; + int f_amode; + int f_perm; + ompi_communicator_t *f_comm; + const char *f_filename; + char *f_datarep; + opal_convertor_t *f_convertor; + opal_info_t *f_info; + int32_t f_flags; + void *f_fs_ptr; + int f_fs_block_size; + int f_atomicity; + size_t f_stripe_size; + int f_stripe_count; + size_t f_cc_size; + int f_bytes_per_agg; + enum ompio_fs_type f_fstype; + ompi_request_t *f_split_coll_req; + bool f_split_coll_in_use; + /* Place for selected sharedfp module to hang it's data. + Note: Neither f_sharedfp nor f_sharedfp_component seemed appropriate for this. + */ + void *f_sharedfp_data; + + + /* File View parameters */ + struct iovec *f_decoded_iov; + uint32_t f_iov_count; + ompi_datatype_t *f_iov_type; + size_t f_position_in_file_view; /* in bytes */ + size_t f_total_bytes; /* total bytes read/written within 1 Fview*/ + int f_index_in_file_view; + ptrdiff_t f_view_extent; + size_t f_view_size; + ompi_datatype_t *f_etype; + ompi_datatype_t *f_filetype; + ompi_datatype_t *f_orig_filetype; /* the fileview passed by the user to us */ + size_t f_etype_size; + + /* contains IO requests that needs to be read/written */ + mca_common_ompio_io_array_t *f_io_array; + int f_num_of_io_entries; + + /* Hooks for modules to hang things */ + mca_base_component_t *f_fs_component; + mca_base_component_t *f_fcoll_component; + mca_base_component_t *f_fbtl_component; + mca_base_component_t *f_sharedfp_component; + + /* structure of function pointers */ + mca_fs_base_module_t *f_fs; + mca_fcoll_base_module_t *f_fcoll; + mca_fbtl_base_module_t *f_fbtl; + mca_sharedfp_base_module_t *f_sharedfp; + + /* Timing information */ + struct mca_common_ompio_print_queue *f_coll_write_time; + struct mca_common_ompio_print_queue *f_coll_read_time; + + /*initial list of aggregators and groups*/ + int *f_init_aggr_list; + int f_init_num_aggrs; + int f_init_procs_per_group; + int *f_init_procs_in_group; + + /* final of aggregators and groups*/ + int *f_aggr_list; + int f_num_aggrs; + int *f_procs_in_group; + int f_procs_per_group; + + /* internal ompio functions required by fbtl and fcoll */ + mca_common_ompio_generate_current_file_view_fn_t f_generate_current_file_view; + + mca_common_ompio_get_mca_parameter_value_fn_t f_get_mca_parameter_value; +}; +typedef struct ompio_file_t ompio_file_t; + +struct mca_common_ompio_data_t { + ompio_file_t ompio_fh; +}; +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 (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); -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, +int mca_common_ompio_file_delete (const char *filename, + struct opal_info_t *info); + +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); +/* + * 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 ompio_file_t *fh, + struct ompi_datatype_t *datatype, + int count, + const void *buf, + size_t *max_data, + struct iovec **iov, + uint32_t *iov_count); + +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/io/ompio/io_ompio_aggregators.c b/ompi/mca/common/ompio/common_ompio_aggregators.c similarity index 83% rename from ompi/mca/io/ompio/io_ompio_aggregators.c rename to ompi/mca/common/ompio/common_ompio_aggregators.c index af7b74c01b..90082253c5 100644 --- a/ompi/mca/io/ompio/io_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$ @@ -39,7 +39,7 @@ #include #include -#include "io_ompio.h" +#include "common_ompio.h" /* ** This file contains all the functionality related to determing the number of aggregators @@ -53,14 +53,13 @@ ** of the access pattern */ - static double cost_calc (int P, int P_agg, size_t Data_proc, size_t coll_buffer, int dim ); #define DIM1 1 #define DIM2 2 -int mca_io_ompio_simple_grouping(mca_io_ompio_file_t *fh, - int *num_groups_out, - mca_io_ompio_contg *contg_groups) +int mca_common_ompio_simple_grouping(ompio_file_t *fh, + int *num_groups_out, + mca_common_ompio_contg *contg_groups) { int num_groups=1; @@ -103,7 +102,7 @@ int mca_io_ompio_simple_grouping(mca_io_ompio_file_t *fh, ** for mca_io_ompio_max_aggregators will decrease the maximum number of aggregators ** allowed for the given no. of processes. */ - dtime_threshold = (double) mca_io_ompio_aggregators_cutoff_threshold / 100.0; + dtime_threshold = (double) OMPIO_MCA_GET(fh, aggregators_cutoff_threshold) / 100.0; /* Determine whether to use the formula for 1-D or 2-D data decomposition. Anything ** that is not 1-D is assumed to be 2-D in this version @@ -176,20 +175,20 @@ int mca_io_ompio_simple_grouping(mca_io_ompio_file_t *fh, #endif /* Cap the maximum number of aggregators.*/ - if ( num_groups > (fh->f_size/mca_io_ompio_max_aggregators_ratio)) { - num_groups = (fh->f_size/mca_io_ompio_max_aggregators_ratio); + if ( num_groups > (fh->f_size/OMPIO_MCA_GET(fh, max_aggregators_ratio))) { + num_groups = (fh->f_size/OMPIO_MCA_GET(fh, max_aggregators_ratio)); } if ( 1 >= num_groups ) { num_groups = 1; } *num_groups_out = num_groups; - return mca_io_ompio_forced_grouping ( fh, num_groups, contg_groups); + return mca_common_ompio_forced_grouping ( fh, num_groups, contg_groups); } -int mca_io_ompio_forced_grouping ( mca_io_ompio_file_t *fh, - int num_groups, - mca_io_ompio_contg *contg_groups) +int mca_common_ompio_forced_grouping ( ompio_file_t *fh, + int num_groups, + mca_common_ompio_contg *contg_groups) { int group_size = fh->f_size / num_groups; int rest = fh->f_size % num_groups; @@ -225,9 +224,9 @@ int mca_io_ompio_forced_grouping ( mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_io_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, - int *num_groups, - mca_io_ompio_contg *contg_groups) +int mca_common_ompio_fview_based_grouping(ompio_file_t *fh, + int *num_groups, + mca_common_ompio_contg *contg_groups) { int k = 0; @@ -322,9 +321,9 @@ exit: return ret; } -int mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh, - int *num_groups, - mca_io_ompio_contg *contg_groups) +int mca_common_ompio_cart_based_grouping(ompio_file_t *ompio_fh, + int *num_groups, + mca_common_ompio_contg *contg_groups) { int k = 0; int g=0; @@ -449,9 +448,9 @@ exit: -int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, - int num_groups, - mca_io_ompio_contg *contg_groups) +int mca_common_ompio_finalize_initial_grouping(ompio_file_t *fh, + int num_groups, + mca_common_ompio_contg *contg_groups) { int z = 0; @@ -502,9 +501,9 @@ int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, ** of aggregators. */ -int mca_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, - int num_aggregators, - size_t bytes_per_proc) +int mca_common_ompio_set_aggregator_props (struct ompio_file_t *fh, + int num_aggregators, + size_t bytes_per_proc) { int j; int ret=OMPI_SUCCESS; @@ -512,10 +511,10 @@ int mca_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, fh->f_flags |= OMPIO_AGGREGATOR_IS_SET; if ( (-1 == num_aggregators) && - ((SIMPLE != mca_io_ompio_grouping_option && - NO_REFINEMENT != mca_io_ompio_grouping_option && - SIMPLE_PLUS != mca_io_ompio_grouping_option ))) { - ret = mca_io_ompio_create_groups(fh,bytes_per_proc); + ((SIMPLE != OMPIO_MCA_GET(fh, grouping_option) && + NO_REFINEMENT != OMPIO_MCA_GET(fh, grouping_option) && + SIMPLE_PLUS != OMPIO_MCA_GET(fh, grouping_option) ))) { + ret = mca_common_ompio_create_groups(fh,bytes_per_proc); } else { fh->f_procs_per_group = fh->f_init_procs_per_group; @@ -544,8 +543,11 @@ int mca_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, -int mca_io_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 is_aggregator = 0; @@ -561,46 +563,46 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE bytes_per_group = 0; OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group = NULL; - ret = mca_io_ompio_prepare_to_group(fh, - &start_offsets_lens, - &end_offsets, - &aggr_bytes_per_group, - &bytes_per_group, - &decision_list, - bytes_per_proc, - &is_aggregator, - &ompio_grouping_flag); + ret = mca_common_ompio_prepare_to_group(fh, + &start_offsets_lens, + &end_offsets, + &aggr_bytes_per_group, + &bytes_per_group, + &decision_list, + bytes_per_proc, + &is_aggregator, + &ompio_grouping_flag); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_create_groups: error in mca_io_ompio_prepare_to_group\n"); + opal_output (1, "mca_common_ompio_create_groups: error in mca_common_ompio_prepare_to_group\n"); goto exit; } switch(ompio_grouping_flag){ case OMPIO_SPLIT: - ret = mca_io_ompio_split_initial_groups(fh, - start_offsets_lens, - end_offsets, - bytes_per_group); + ret = mca_common_ompio_split_initial_groups(fh, + start_offsets_lens, + end_offsets, + bytes_per_group); break; case OMPIO_MERGE: - ret = mca_io_ompio_merge_initial_groups(fh, - aggr_bytes_per_group, - decision_list, - is_aggregator); + ret = mca_common_ompio_merge_initial_groups(fh, + aggr_bytes_per_group, + decision_list, + is_aggregator); break; case OMPIO_RETAIN: - ret = mca_io_ompio_retain_initial_groups(fh); + ret = mca_common_ompio_retain_initial_groups(fh); break; } if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_create_groups: error in subroutine called within switch statement\n"); + opal_output (1, "mca_common_ompio_create_groups: error in subroutine called within switch statement\n"); goto exit; } @@ -618,13 +620,13 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, fh->f_comm, fh->f_comm->c_coll->coll_allreduce_module); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_create_groups: error in allreduce\n"); + opal_output (1, "mca_common_ompio_create_groups: error in allreduce\n"); goto exit; } tmp_final_aggrs =(int*) malloc ( fh->f_size *sizeof(int)); if ( NULL == tmp_final_aggrs ) { - opal_output(1,"mca_io_ompio_create_groups: could not allocate memory\n"); + opal_output(1,"mca_common_ompio_create_groups: could not allocate memory\n"); goto exit; } ret = fh->f_comm->c_coll->coll_allgather (&final_aggr, @@ -636,7 +638,7 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, fh->f_comm, fh->f_comm->c_coll->coll_allgather_module); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_create_groups: error in allreduce\n"); + opal_output (1, "mca_common_ompio_create_groups: error in allreduce\n"); goto exit; } @@ -645,7 +647,7 @@ int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, fh->f_num_aggrs = final_num_aggrs; fh->f_aggr_list = (int*) malloc (fh->f_num_aggrs * sizeof(int)); if ( NULL == fh->f_aggr_list ) { - opal_output(1,"mca_io_ompio_create_groups: could not allocate memory\n"); + opal_output(1,"mca_common_ompio_create_groups: could not allocate memory\n"); goto exit; } @@ -679,10 +681,10 @@ exit: return ret; } -int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group, - int *decision_list, - int is_aggregator){ +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){ OMPI_MPI_OFFSET_TYPE sum_bytes = 0; MPI_Request *sendreqs = NULL; @@ -711,13 +713,13 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, break; } else if((decision_list[i] == OMPIO_MERGE) && - (sum_bytes <= mca_io_ompio_bytes_per_agg)){ + (sum_bytes <= OMPIO_MCA_GET(fh, bytes_per_agg))){ sum_bytes = sum_bytes + aggr_bytes_per_group[i]; decision_list[i] = merge_pair_flag; i++; } else if((decision_list[i] == OMPIO_MERGE) && - (sum_bytes >= mca_io_ompio_bytes_per_agg)){ + (sum_bytes >= OMPIO_MCA_GET(fh, bytes_per_agg))){ if(decision_list[i+1] == OMPIO_MERGE){ merge_pair_flag++; decision_list[i] = merge_pair_flag; @@ -772,10 +774,10 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, for( j = 0 ; j < end-start+1 ;j++){ if(fh->f_rank == merge_aggrs[j]){ - ret = mca_io_ompio_merge_groups(fh, merge_aggrs, - end-start+1); + ret = mca_common_ompio_merge_groups(fh, merge_aggrs, + end-start+1); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_merge_initial_groups: error in mca_io_ompio_merge_groups\n"); + opal_output (1, "mca_common_ompio_merge_initial_groups: error in mca_common_ompio_merge_groups\n"); free ( merge_aggrs ); return ret; } @@ -813,7 +815,7 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, fh->f_comm, sendreqs + r++)); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_merge_initial_groups: error in Isend\n"); + opal_output (1, "mca_common_ompio_merge_initial_groups: error in Isend\n"); goto exit; } //new aggregator sends distribution of process to all its new members @@ -826,7 +828,7 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, fh->f_comm, sendreqs + r++)); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_merge_initial_groups: error in Isend 2\n"); + opal_output (1, "mca_common_ompio_merge_initial_groups: error in Isend 2\n"); goto exit; } @@ -843,7 +845,7 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, fh->f_comm, MPI_STATUS_IGNORE)); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_merge_initial_groups: error in Recv\n"); + opal_output (1, "mca_common_ompio_merge_initial_groups: error in Recv\n"); return ret; } @@ -861,7 +863,7 @@ int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, fh->f_comm, MPI_STATUS_IGNORE)); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_merge_initial_groups: error in Recv 2\n"); + opal_output (1, "mca_common_ompio_merge_initial_groups: error in Recv 2\n"); return ret; } @@ -879,10 +881,10 @@ exit: return ret; } -int mca_io_ompio_split_initial_groups(mca_io_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_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 size_new_group = 0; @@ -895,24 +897,24 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE max_cci = 0; OMPI_MPI_OFFSET_TYPE min_cci = 0; - size_new_group = ceil ((float)mca_io_ompio_bytes_per_agg * fh->f_init_procs_per_group/ bytes_per_group); + size_new_group = ceil ((float)OMPIO_MCA_GET(fh, bytes_per_agg) * fh->f_init_procs_per_group/ bytes_per_group); size_old_group = fh->f_init_procs_per_group; - ret = mca_io_ompio_split_a_group(fh, - start_offsets_lens, - end_offsets, - size_new_group, - &max_cci, - &min_cci, - &num_groups, - &size_smallest_group); + ret = mca_common_ompio_split_a_group(fh, + start_offsets_lens, + end_offsets, + size_new_group, + &max_cci, + &min_cci, + &num_groups, + &size_smallest_group); if (OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_split_initial_groups: error in mca_io_ompio_split_a_group\n"); + opal_output (1, "mca_common_ompio_split_initial_groups: error in mca_common_ompio_split_a_group\n"); return ret; } - switch(mca_io_ompio_grouping_option){ + switch(OMPIO_MCA_GET(fh, grouping_option)){ case DATA_VOLUME: //Just use size as returned by split group size_last_group = size_smallest_group; @@ -944,16 +946,16 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, (size_new_group < size_old_group)){ size_new_group = floor( (float) (size_new_group + size_old_group ) / 2 ); - ret = mca_io_ompio_split_a_group(fh, - start_offsets_lens, - end_offsets, - size_new_group, - &max_cci, - &min_cci, - &num_groups, - &size_smallest_group); + ret = mca_common_ompio_split_a_group(fh, + start_offsets_lens, + end_offsets, + size_new_group, + &max_cci, + &min_cci, + &num_groups, + &size_smallest_group); if (OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_split_initial_groups: error in mca_io_ompio_split_a_group 2\n"); + opal_output (1, "mca_common_ompio_split_initial_groups: error in mca_common_ompio_split_a_group 2\n"); return ret; } } @@ -972,16 +974,16 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, //monitor the previous iteration //break if it has not changed. size_new_group = ceil( (float) (size_new_group + size_old_group ) / 2 ); - ret = mca_io_ompio_split_a_group(fh, - start_offsets_lens, - end_offsets, - size_new_group, - &max_cci, - &min_cci, - &num_groups, - &size_smallest_group); + ret = mca_common_ompio_split_a_group(fh, + start_offsets_lens, + end_offsets, + size_new_group, + &max_cci, + &min_cci, + &num_groups, + &size_smallest_group); if (OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_split_initial_groups: error in mca_io_ompio_split_a_group 3\n"); + opal_output (1, "mca_common_ompio_split_initial_groups: error in mca_common_ompio_split_a_group 3\n"); return ret; } } @@ -1010,13 +1012,13 @@ int mca_io_ompio_split_initial_groups(mca_io_ompio_file_t *fh, break; } - ret = mca_io_ompio_finalize_split(fh, size_new_group, size_last_group); + ret = mca_common_ompio_finalize_split(fh, size_new_group, size_last_group); return ret; } -int mca_io_ompio_retain_initial_groups(mca_io_ompio_file_t *fh){ +int mca_common_ompio_retain_initial_groups(ompio_file_t *fh){ int i = 0; @@ -1034,9 +1036,9 @@ int mca_io_ompio_retain_initial_groups(mca_io_ompio_file_t *fh){ return OMPI_SUCCESS; } -int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, - int *merge_aggrs, - int num_merge_aggrs) +int mca_common_ompio_merge_groups(ompio_file_t *fh, + int *merge_aggrs, + int num_merge_aggrs) { int i = 0; int *sizes_old_group; @@ -1123,14 +1125,14 @@ exit: -int mca_io_ompio_split_a_group(mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE *start_offsets_lens, - OMPI_MPI_OFFSET_TYPE *end_offsets, - int size_new_group, - OMPI_MPI_OFFSET_TYPE *max_cci, - OMPI_MPI_OFFSET_TYPE *min_cci, - int *num_groups, - int *size_smallest_group) +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, + OMPI_MPI_OFFSET_TYPE *max_cci, + OMPI_MPI_OFFSET_TYPE *min_cci, + int *num_groups, + int *size_smallest_group) { OMPI_MPI_OFFSET_TYPE *cci = NULL; @@ -1184,9 +1186,9 @@ int mca_io_ompio_split_a_group(mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_io_ompio_finalize_split(mca_io_ompio_file_t *fh, - int size_new_group, - int size_last_group) +int mca_common_ompio_finalize_split(ompio_file_t *fh, + int size_new_group, + int size_last_group) { //based on new group and last group finalize f_procs_per_group and f_procs_in_group @@ -1238,15 +1240,15 @@ int mca_io_ompio_finalize_split(mca_io_ompio_file_t *fh, return OMPI_SUCCESS; } -int mca_io_ompio_prepare_to_group(mca_io_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, - OMPI_MPI_OFFSET_TYPE *bytes_per_group, - int **decision_list, - size_t bytes_per_proc, - int *is_aggregator, - int *ompio_grouping_flag) +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, + OMPI_MPI_OFFSET_TYPE *bytes_per_group, + int **decision_list, + size_t bytes_per_proc, + int *is_aggregator, + int *ompio_grouping_flag) { OMPI_MPI_OFFSET_TYPE start_offset_len[3] = {0}; @@ -1291,7 +1293,7 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, fh->f_init_procs_per_group, fh->f_comm); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_prepare_to_grou[: error in ompi_fcoll_base_coll_allgather_array\n"); + opal_output (1, "mca_common_ompio_prepare_to_group: error in ompi_fcoll_base_coll_allgather_array\n"); goto exit; } end_offsets_tmp = (OMPI_MPI_OFFSET_TYPE* )malloc (fh->f_init_procs_per_group * sizeof(OMPI_MPI_OFFSET_TYPE)); @@ -1347,19 +1349,19 @@ int mca_io_ompio_prepare_to_group(mca_io_ompio_file_t *fh, fh->f_init_num_aggrs, fh->f_comm); if ( OMPI_SUCCESS != ret ) { - opal_output (1, "mca_io_ompio_prepare_to_group: error in ompi_fcoll_base_coll_allgather_array 2\n"); + opal_output (1, "mca_common_ompio_prepare_to_group: error in ompi_fcoll_base_coll_allgather_array 2\n"); free(decision_list_tmp); goto exit; } for( i = 0; i < fh->f_init_num_aggrs; i++){ if((size_t)(aggr_bytes_per_group_tmp[i])> - (size_t)mca_io_ompio_bytes_per_agg){ + (size_t)OMPIO_MCA_GET(fh, bytes_per_agg)){ decision_list_tmp[i] = OMPIO_SPLIT; split_count++; } else if((size_t)(aggr_bytes_per_group_tmp[i])< - (size_t)mca_io_ompio_bytes_per_agg){ + (size_t)OMPIO_MCA_GET(fh, bytes_per_agg)){ decision_list_tmp[i] = OMPIO_MERGE; merge_count++; } diff --git a/ompi/mca/common/ompio/common_ompio_aggregators.h b/ompi/mca/common/ompio/common_ompio_aggregators.h new file mode 100644 index 0000000000..6a221e9afa --- /dev/null +++ b/ompi/mca/common/ompio/common_ompio_aggregators.h @@ -0,0 +1,111 @@ +/* -*- Mode: C; c-basic-offset:4 ; -*- */ +/* + * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2013 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * University of Stuttgart. All rights reserved. + * 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 + * + * $HEADER$ + */ + + +#ifndef MCA_COMMON_OMPIO_AGGREGATORS_H +#define MCA_COMMON_OMPIO_AGGREGATORS_H + + +/*AGGREGATOR GROUPING DECISIONS*/ +#define OMPIO_MERGE 1 +#define OMPIO_SPLIT 2 +#define OMPIO_RETAIN 3 + +typedef struct { + int ndims; + int *dims; + int *periods; + int *coords; + int reorder; +} mca_io_ompio_cart_topo_components; + + +typedef struct{ + OMPI_MPI_OFFSET_TYPE contg_chunk_size; + int *procs_in_contg_group; + int procs_per_contg_group; +} mca_common_ompio_contg; + + +/*Aggregator selection methods*/ +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 ( ompio_file_t *fh, + int num_groups, + mca_common_ompio_contg *contg_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(ompio_file_t *fh, int *num_groups, + mca_common_ompio_contg *contg_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(ompio_file_t *fh, int num_groups, + mca_common_ompio_contg *contg_groups); + +int mca_common_ompio_create_groups(ompio_file_t *fh, size_t bytes_per_proc); + +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, + OMPI_MPI_OFFSET_TYPE *bytes_per_group, + int **decision_list, + size_t bytes_per_proc, + int *is_aggregator, + int *ompio_grouping_flag); + +int mca_common_ompio_retain_initial_groups(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(ompio_file_t *fh, + OMPI_MPI_OFFSET_TYPE *start_offsets_lens, + OMPI_MPI_OFFSET_TYPE *end_offsets, + int size_new_group, + OMPI_MPI_OFFSET_TYPE *max_cci, + OMPI_MPI_OFFSET_TYPE *min_cci, + int *num_groups, int *size_smallest_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(ompio_file_t *fh, + OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group, + int *decision_list, int is_aggregator); + +int mca_common_ompio_merge_groups(ompio_file_t *fh, int *merge_aggrs, + int num_merge_aggrs); + + +#endif /* MCA_COMMON_AGGREGATORS_H */ diff --git a/ompi/mca/common/ompio/common_ompio_file_open.c b/ompi/mca/common/ompio/common_ompio_file_open.c index 47786c60c7..e0431d63be 100644 --- a/ompi/mca/common/ompio/common_ompio_file_open.c +++ b/ompi/mca/common/ompio/common_ompio_file_open.c @@ -10,9 +10,9 @@ * 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 (c) 2016 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * @@ -41,11 +41,14 @@ #include "common_ompio.h" #include "ompi/mca/topo/topo.h" +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; @@ -92,6 +95,10 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm, ompio_fh->f_atomicity = 0; ompio_fh->f_fs_block_size = 4096; + /* set some function pointers required for fcoll, fbtls and sharedfp modules*/ + ompio_fh->f_generate_current_file_view=generate_current_file_view_fn; + ompio_fh->f_get_mca_parameter_value=get_mca_parameter_value_fn; + mca_common_ompio_set_file_defaults (ompio_fh); ompio_fh->f_filename = filename; @@ -102,16 +109,10 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm, mca_common_ompio_initialize_print_queue(&ompio_fh->f_coll_write_time); mca_common_ompio_initialize_print_queue(&ompio_fh->f_coll_read_time); - /* set some function pointers required for fcoll, fbtls and sharedfp modules*/ - ompio_fh->f_decode_datatype=ompi_io_ompio_decode_datatype; - ompio_fh->f_generate_current_file_view=ompi_io_ompio_generate_current_file_view; - - ompio_fh->f_get_mca_parameter_value=mca_io_ompio_get_mca_parameter_value; - ompio_fh->f_set_aggregator_props=mca_io_ompio_set_aggregator_props; - /* This fix is needed for data seiving to work with two-phase collective I/O */ - if ( mca_io_ompio_overwrite_amode && !(amode & MPI_MODE_SEQUENTIAL) ) { + if ( OMPIO_MCA_GET(ompio_fh, overwrite_amode) && !(amode & MPI_MODE_SEQUENTIAL) ) { + if ((amode & MPI_MODE_WRONLY)){ amode -= MPI_MODE_WRONLY; amode += MPI_MODE_RDWR; @@ -176,7 +177,7 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm, ** are used by his application. */ if ( NULL != ompio_fh->f_sharedfp && - !mca_io_ompio_sharedfp_lazy_open ) { + !OMPIO_MCA_GET(ompio_fh, sharedfp_lazy_open) ) { ret = ompio_fh->f_sharedfp->sharedfp_file_open(comm, filename, amode, @@ -201,7 +202,7 @@ int mca_common_ompio_file_open (ompi_communicator_t *comm, mca_common_ompio_set_explicit_offset (ompio_fh, current_size); if ( true == use_sharedfp ) { if ( NULL != ompio_fh->f_sharedfp && - !mca_io_ompio_sharedfp_lazy_open ) { + !OMPIO_MCA_GET(ompio_fh, sharedfp_lazy_open) ) { shared_fp_base_module = ompio_fh->f_sharedfp; ret = shared_fp_base_module->sharedfp_seek(ompio_fh,current_size, MPI_SEEK_SET); if ( MPI_SUCCESS != ret ) { @@ -227,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; @@ -241,7 +242,7 @@ int mca_common_ompio_file_close (mca_io_ompio_file_t *ompio_fh) } - if(mca_io_ompio_coll_timing_info){ + if(OMPIO_MCA_GET(ompio_fh, coll_timing_info)){ strcpy (name, "WRITE"); if (!mca_common_ompio_empty_print_queue(ompio_fh->f_coll_write_time)){ ret = mca_common_ompio_print_time_info(ompio_fh->f_coll_write_time, @@ -278,7 +279,7 @@ int mca_common_ompio_file_close (mca_io_ompio_file_t *ompio_fh) ret = ompio_fh->f_fs->fs_file_close (ompio_fh); } if ( delete_flag ) { - ret = mca_io_ompio_file_delete ( ompio_fh->f_filename, &(MPI_INFO_NULL->super) ); + ret = mca_common_ompio_file_delete ( ompio_fh->f_filename, &(MPI_INFO_NULL->super) ); } if ( NULL != ompio_fh->f_fs ) { @@ -366,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; @@ -377,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; @@ -395,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) { @@ -407,7 +408,7 @@ int mca_common_ompio_set_file_defaults (mca_io_ompio_file_t *fh) fh->f_io_array = NULL; fh->f_perm = OMPIO_PERM_NULL; fh->f_flags = 0; - fh->f_bytes_per_agg = mca_io_ompio_bytes_per_agg; + fh->f_bytes_per_agg = OMPIO_MCA_GET(fh, bytes_per_agg); fh->f_datarep = strdup ("native"); fh->f_offset = 0; @@ -472,3 +473,153 @@ int mca_common_ompio_set_file_defaults (mca_io_ompio_file_t *fh) } +int mca_common_ompio_file_delete (const char *filename, + struct opal_info_t *info) +{ + int ret = OMPI_SUCCESS; + + /* No locking required for file_delete according to my understanding. + One thread will succeed, the other ones silently ignore the + error that the file is already deleted. + */ + ret = unlink(filename); + + if (0 > ret ) { + if ( ENOENT == errno ) { + return MPI_ERR_NO_SUCH_FILE; + } else { + opal_output (0, "mca_common_ompio_file_delete: Could not remove file %s errno = %d %s\n", filename, + errno, strerror(errno)); + return MPI_ERR_ACCESS; + } + } + + return OMPI_SUCCESS; +} + +int mca_common_ompio_decode_datatype (struct ompio_file_t *fh, + ompi_datatype_t *datatype, + int count, + const void *buf, + size_t *max_data, + struct iovec **iov, + uint32_t *iovec_count) +{ + + + + opal_convertor_t convertor; + size_t remaining_length = 0; + uint32_t i; + uint32_t temp_count; + struct iovec *temp_iov=NULL; + size_t temp_data; + + + opal_convertor_clone (fh->f_convertor, &convertor, 0); + + if (OMPI_SUCCESS != opal_convertor_prepare_for_send (&convertor, + &(datatype->super), + count, + buf)) { + opal_output (1, "Cannot attach the datatype to a convertor\n"); + return OMPI_ERROR; + } + + if ( 0 == datatype->super.size ) { + *max_data = 0; + *iovec_count = 0; + *iov = NULL; + return OMPI_SUCCESS; + } + + remaining_length = count * datatype->super.size; + + temp_count = OMPIO_IOVEC_INITIAL_SIZE; + temp_iov = (struct iovec*)malloc(temp_count * sizeof(struct iovec)); + if (NULL == temp_iov) { + opal_output (1, "OUT OF MEMORY\n"); + return OMPI_ERR_OUT_OF_RESOURCE; + } + + while (0 == opal_convertor_raw(&convertor, + temp_iov, + &temp_count, + &temp_data)) { +#if 0 + printf ("%d: New raw extraction (iovec_count = %d, max_data = %lu)\n", + fh->f_rank,temp_count, (unsigned long)temp_data); + for (i = 0; i < temp_count; i++) { + printf ("%d: \t{%p, %lu}\n",fh->f_rank, + temp_iov[i].iov_base, + (unsigned long)temp_iov[i].iov_len); + } +#endif + + *iovec_count = *iovec_count + temp_count; + *max_data = *max_data + temp_data; + *iov = (struct iovec *) realloc (*iov, *iovec_count * sizeof(struct iovec)); + if (NULL == *iov) { + opal_output(1, "OUT OF MEMORY\n"); + free(temp_iov); + return OMPI_ERR_OUT_OF_RESOURCE; + } + for (i=0 ; if_rank,temp_count, temp_data); + for (i = 0; i < temp_count; i++) { + printf ("%d: \t offset[%d]: %ld; length[%d]: %ld\n", fh->f_rank,i,temp_iov[i].iov_base, i,temp_iov[i].iov_len); + } +#endif + *iovec_count = *iovec_count + temp_count; + *max_data = *max_data + temp_data; + if ( temp_count > 0 ) { + *iov = (struct iovec *) realloc (*iov, *iovec_count * sizeof(struct iovec)); + if (NULL == *iov) { + opal_output(1, "OUT OF MEMORY\n"); + free(temp_iov); + return OMPI_ERR_OUT_OF_RESOURCE; + } + } + for (i=0 ; if_rank) { + printf ("%d Entries: \n",*iovec_count); + for (i=0 ; i<*iovec_count ; i++) { + printf ("\t{%p, %d}\n", + (*iov)[i].iov_base, + (*iov)[i].iov_len); + } + } +#endif + if (remaining_length != 0) { + printf( "Not all raw description was been extracted (%lu bytes missing)\n", + (unsigned long) remaining_length ); + } + + free (temp_iov); + + return OMPI_SUCCESS; +} + +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; + return OMPI_SUCCESS; +} diff --git a/ompi/mca/common/ompio/common_ompio_file_read.c b/ompi/mca/common/ompio/common_ompio_file_read.c index fcbe6d1e47..9b9c19a6b4 100644 --- a/ompi/mca/common/ompio/common_ompio_file_read.c +++ b/ompi/mca/common/ompio/common_ompio_file_read.c @@ -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 @@ -31,7 +33,6 @@ #include "common_ompio.h" #include "common_ompio_request.h" -#include "ompi/mca/io/ompio/io_ompio.h" #include "math.h" #include @@ -47,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, @@ -85,19 +86,19 @@ int mca_common_ompio_file_read (mca_io_ompio_file_t *fh, return ret; } - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + mca_common_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); - if ( -1 == mca_io_ompio_cycle_buffer_size ) { + if ( -1 == OMPIO_MCA_GET(fh, cycle_buffer_size) ) { bytes_per_cycle = max_data; } else { - bytes_per_cycle = mca_io_ompio_cycle_buffer_size; + bytes_per_cycle = OMPIO_MCA_GET(fh, cycle_buffer_size); } cycles = ceil((float)max_data/bytes_per_cycle); @@ -147,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, @@ -175,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, @@ -207,13 +208,13 @@ int mca_common_ompio_file_iread (mca_io_ompio_file_t *fh, int i = 0; /* index into the decoded iovec of the buffer */ int j = 0; /* index into the file vie iovec */ - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + mca_common_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); // Non-blocking operations have to occur in a single cycle j = fh->f_index_in_file_view; @@ -262,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, @@ -295,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, @@ -317,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, @@ -349,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 9486b66c80..c424e50c1c 100644 --- a/ompi/mca/common/ompio/common_ompio_file_view.c +++ b/ompi/mca/common/ompio/common_ompio_file_view.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) 2017 Research Organization for Information Science + * Copyright (c) 2017-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -27,10 +27,11 @@ #include #include "common_ompio.h" +#include "common_ompio_aggregators.h" #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 ) { @@ -53,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, @@ -65,7 +66,7 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, int i, flag; int num_groups = 0; int num_cb_nodes=-1; - mca_io_ompio_contg *contg_groups=NULL; + mca_common_ompio_contg *contg_groups=NULL; size_t ftype_size; ptrdiff_t ftype_extent, lb, ub; @@ -123,13 +124,13 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, fh->f_index_in_file_view=0; fh->f_position_in_file_view=0; - ompi_io_ompio_decode_datatype (fh, - newfiletype, - 1, - NULL, - &max_data, - &fh->f_decoded_iov, - &fh->f_iov_count); + mca_common_ompio_decode_datatype (fh, + newfiletype, + 1, + NULL, + &max_data, + &fh->f_decoded_iov, + &fh->f_iov_count); opal_datatype_get_extent(&newfiletype->super, &lb, &fh->f_view_extent); opal_datatype_type_ub (&newfiletype->super, &ub); @@ -141,7 +142,7 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, ompi_datatype_duplicate (newfiletype, &fh->f_filetype); - if( SIMPLE_PLUS == mca_io_ompio_grouping_option ) { + if( SIMPLE_PLUS == OMPIO_MCA_GET(fh, grouping_option) ) { fh->f_cc_size = get_contiguous_chunk_size (fh, 1); } else { @@ -155,7 +156,7 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, } } - contg_groups = (mca_io_ompio_contg*) calloc ( 1, fh->f_size * sizeof(mca_io_ompio_contg)); + contg_groups = (mca_common_ompio_contg*) calloc ( 1, fh->f_size * sizeof(mca_common_ompio_contg)); if (NULL == contg_groups) { opal_output (1, "OUT OF MEMORY\n"); return OMPI_ERR_OUT_OF_RESOURCE; @@ -188,9 +189,9 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, } - if ( -1 != mca_io_ompio_num_aggregators || -1 != num_cb_nodes) { + if ( -1 != OMPIO_MCA_GET(fh, num_aggregators) || -1 != num_cb_nodes) { /* The user requested a particular number of aggregators */ - num_groups = mca_io_ompio_num_aggregators; + num_groups = OMPIO_MCA_GET(fh, num_aggregators); if ( -1 != num_cb_nodes ) { /* A hint through an MPI Info object trumps an mca parameter value */ num_groups = num_cb_nodes; @@ -198,14 +199,14 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, if ( num_groups > fh->f_size ) { num_groups = fh->f_size; } - mca_io_ompio_forced_grouping ( fh, num_groups, contg_groups); + mca_common_ompio_forced_grouping ( fh, num_groups, contg_groups); } else { - if ( SIMPLE != mca_io_ompio_grouping_option && - SIMPLE_PLUS != mca_io_ompio_grouping_option ) { - ret = mca_io_ompio_fview_based_grouping(fh, - &num_groups, - contg_groups); + if ( SIMPLE != OMPIO_MCA_GET(fh, grouping_option) && + SIMPLE_PLUS != OMPIO_MCA_GET(fh, grouping_option) ) { + ret = mca_common_ompio_fview_based_grouping(fh, + &num_groups, + contg_groups); if ( OMPI_SUCCESS != ret ) { opal_output(1, "mca_common_ompio_set_view: mca_io_ompio_fview_based_grouping failed\n"); goto exit; @@ -221,9 +222,9 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, goto exit; } if ( ndims > 1 ) { - ret = mca_io_ompio_cart_based_grouping( fh, - &num_groups, - contg_groups); + ret = mca_common_ompio_cart_based_grouping( fh, + &num_groups, + contg_groups); if (OMPI_SUCCESS != ret ) { opal_output(1, "mca_common_ompio_set_view: mca_io_ompio_cart_based_grouping failed\n"); goto exit; @@ -233,9 +234,9 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, } if ( !done ) { - ret = mca_io_ompio_simple_grouping(fh, - &num_groups, - contg_groups); + ret = mca_common_ompio_simple_grouping(fh, + &num_groups, + contg_groups); if ( OMPI_SUCCESS != ret ){ opal_output(1, "mca_common_ompio_set_view: mca_io_ompio_simple_grouping failed\n"); goto exit; @@ -259,9 +260,9 @@ int mca_common_ompio_set_view (mca_io_ompio_file_t *fh, } #endif - ret = mca_io_ompio_finalize_initial_grouping(fh, - num_groups, - contg_groups); + ret = mca_common_ompio_finalize_initial_grouping(fh, + num_groups, + contg_groups); if ( OMPI_SUCCESS != ret ) { opal_output(1, "mca_common_ompio_set_view: mca_io_ompio_finalize_initial_grouping failed\n"); goto exit; @@ -289,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 07361dfa67..c7d0c32e3d 100644 --- a/ompi/mca/common/ompio/common_ompio_file_write.c +++ b/ompi/mca/common/ompio/common_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$ * @@ -31,11 +31,10 @@ #include "common_ompio.h" #include "common_ompio_request.h" -#include "ompi/mca/io/ompio/io_ompio.h" #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, @@ -62,19 +61,19 @@ int mca_common_ompio_file_write (mca_io_ompio_file_t *fh, return ret; } - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + mca_common_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); - if ( -1 == mca_io_ompio_cycle_buffer_size ) { + if ( -1 == OMPIO_MCA_GET(fh, cycle_buffer_size) ) { bytes_per_cycle = max_data; } else { - bytes_per_cycle = mca_io_ompio_cycle_buffer_size; + bytes_per_cycle = OMPIO_MCA_GET(fh, cycle_buffer_size); } cycles = ceil((float)max_data/bytes_per_cycle); @@ -122,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, @@ -146,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, @@ -177,13 +176,13 @@ int mca_common_ompio_file_iwrite (mca_io_ompio_file_t *fh, int i = 0; /* index into the decoded iovec of the buffer */ int j = 0; /* index into the file vie iovec */ - ompi_io_ompio_decode_datatype (fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + mca_common_ompio_decode_datatype (fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); j = fh->f_index_in_file_view; /* Non blocking operations have to occur in a single cycle */ @@ -229,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, @@ -263,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, @@ -285,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, @@ -322,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) @@ -348,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; @@ -359,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 30b3e549e9..b1de74b5a8 100644 --- a/ompi/mca/common/ompio/common_ompio_print_queue.c +++ b/ompi/mca/common/ompio/common_ompio_print_queue.c @@ -11,6 +11,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$ * @@ -25,7 +27,6 @@ #include "ompi/datatype/ompi_datatype.h" #include "ompi/mca/common/ompio/common_ompio.h" -#include "ompi/mca/io/ompio/io_ompio.h" /* Print queue related function implementations */ @@ -98,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 ba74e30a55..2c475b1675 100644 --- a/ompi/mca/common/ompio/common_ompio_print_queue.h +++ b/ompi/mca/common/ompio/common_ompio_print_queue.h @@ -11,7 +11,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$ * @@ -26,9 +26,6 @@ #include "mpi.h" -OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info; -struct mca_io_ompio_file_t; - #define MCA_COMMON_OMPIO_QUEUESIZE 2048 /*To extract time-information */ @@ -62,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/common/ompio/common_ompio_request.h b/ompi/mca/common/ompio/common_ompio_request.h index 2a66afab0d..50508e99e1 100644 --- a/ompi/mca/common/ompio/common_ompio_request.h +++ b/ompi/mca/common/ompio/common_ompio_request.h @@ -11,6 +11,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 @@ -24,7 +26,7 @@ #include "ompi_config.h" #include "ompi/request/request.h" #include "ompi/mca/fbtl/fbtl.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "common_ompio.h" BEGIN_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/Makefile.am b/ompi/mca/fcoll/dynamic/Makefile.am index 6b77394ec6..603fa55df7 100644 --- a/ompi/mca/fcoll/dynamic/Makefile.am +++ b/ompi/mca/fcoll/dynamic/Makefile.am @@ -12,6 +12,8 @@ # Copyright (c) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. 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 @@ -42,7 +44,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_fcoll_dynamic_la_SOURCES = $(sources) mca_fcoll_dynamic_la_LDFLAGS = -module -avoid-version -mca_fcoll_dynamic_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la +mca_fcoll_dynamic_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_fcoll_dynamic_la_SOURCES =$(sources) 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 249100054b..4ee4997e14 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_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) 2017 Research Organization for Information Science + * Copyright (c) 2017-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -27,7 +27,7 @@ #include "ompi/constants.h" #include "ompi/mca/fcoll/fcoll.h" #include "ompi/mca/fcoll/base/fcoll_base_coll_array.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "math.h" #include "ompi/mca/pml/pml.h" @@ -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,13 +125,13 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, if (! recvbuf_is_contiguous ) { - ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); if (OMPI_SUCCESS != ret){ goto exit; } @@ -149,9 +149,9 @@ mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERROR; goto exit; } - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, - dynamic_num_io_procs, - max_data); + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, + dynamic_num_io_procs, + max_data); if (OMPI_SUCCESS != ret){ goto exit; } @@ -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 8d43188991..92c53ade5d 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_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-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$ @@ -27,7 +27,7 @@ #include "ompi/constants.h" #include "ompi/mca/fcoll/fcoll.h" #include "ompi/mca/fcoll/base/fcoll_base_coll_array.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "math.h" #include "ompi/mca/pml/pml.h" @@ -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,13 +127,13 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, if (! sendbuf_is_contiguous ) { - ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *) fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *) fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); if (OMPI_SUCCESS != ret ){ goto exit; } @@ -151,9 +151,9 @@ mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, ret = OMPI_ERROR; goto exit; } - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, - dynamic_num_io_procs, - max_data); + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, + dynamic_num_io_procs, + max_data); if (OMPI_SUCCESS != ret){ goto exit; @@ -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/Makefile.am b/ompi/mca/fcoll/dynamic_gen2/Makefile.am index 052e34fc50..a4e91e5cd7 100644 --- a/ompi/mca/fcoll/dynamic_gen2/Makefile.am +++ b/ompi/mca/fcoll/dynamic_gen2/Makefile.am @@ -10,8 +10,10 @@ # 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) 2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 Cisco Systems, Inc. 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 @@ -42,7 +44,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_fcoll_dynamic_gen2_la_SOURCES = $(sources) mca_fcoll_dynamic_gen2_la_LDFLAGS = -module -avoid-version -mca_fcoll_dynamic_gen2_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la +mca_fcoll_dynamic_gen2_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_fcoll_dynamic_gen2_la_SOURCES =$(sources) 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 95465cc401..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 @@ -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) 2017 Research Organization for Information Science + * Copyright (c) 2017-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ @@ -27,7 +27,7 @@ #include "ompi/constants.h" #include "ompi/mca/fcoll/fcoll.h" #include "ompi/mca/fcoll/base/fcoll_base_coll_array.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "math.h" #include "ompi/mca/pml/pml.h" @@ -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,13 +125,13 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, if (! recvbuf_is_contiguous ) { - ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); if (OMPI_SUCCESS != ret){ goto exit; } @@ -149,9 +149,9 @@ mca_fcoll_dynamic_gen2_file_read_all (mca_io_ompio_file_t *fh, ret = OMPI_ERROR; goto exit; } - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, - dynamic_gen2_num_io_procs, - max_data); + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, + dynamic_gen2_num_io_procs, + max_data); if (OMPI_SUCCESS != ret){ goto exit; } @@ -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 91b242f967..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 @@ -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-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 (c) 2018 Cisco Systems, Inc. All rights reserved @@ -28,7 +28,7 @@ #include "ompi/constants.h" #include "ompi/mca/fcoll/fcoll.h" #include "ompi/mca/fcoll/base/fcoll_base_coll_array.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "math.h" #include "ompi/mca/pml/pml.h" @@ -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,13 +168,13 @@ 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 = fh->f_decode_datatype ((struct mca_io_ompio_file_t *) fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *) fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); if (OMPI_SUCCESS != ret ){ goto exit; } @@ -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/Makefile.am b/ompi/mca/fcoll/individual/Makefile.am index 21438356bc..437bd498cf 100644 --- a/ompi/mca/fcoll/individual/Makefile.am +++ b/ompi/mca/fcoll/individual/Makefile.am @@ -10,8 +10,10 @@ # 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) 2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 Cisco Systems, Inc. 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 @@ -42,7 +44,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_fcoll_individual_la_SOURCES = $(sources) mca_fcoll_individual_la_LDFLAGS = -module -avoid-version -mca_fcoll_individual_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la +mca_fcoll_individual_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_fcoll_individual_la_SOURCES =$(sources) 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/Makefile.am b/ompi/mca/fcoll/two_phase/Makefile.am index 154d9a32e9..b62fdec8c2 100644 --- a/ompi/mca/fcoll/two_phase/Makefile.am +++ b/ompi/mca/fcoll/two_phase/Makefile.am @@ -10,8 +10,10 @@ # 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) 2012 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 Cisco Systems, Inc. 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 @@ -43,7 +45,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_fcoll_two_phase_la_SOURCES = $(sources) mca_fcoll_two_phase_la_LDFLAGS = -module -avoid-version -mca_fcoll_two_phase_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la +mca_fcoll_two_phase_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_fcoll_two_phase_la_SOURCES =$(sources) 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 3bc932cff0..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 @@ -14,7 +14,7 @@ * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. 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$ * @@ -29,7 +29,7 @@ #include "ompi/constants.h" #include "ompi/communicator/communicator.h" #include "ompi/mca/fcoll/fcoll.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "opal/mca/base/base.h" #include "math.h" @@ -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,13 +150,13 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, // } if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, - datatype, - count, - buf, - &max_data, - &temp_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, + datatype, + count, + buf, + &max_data, + &temp_iov, + &iov_count); if (OMPI_SUCCESS != ret ){ goto exit; } @@ -192,9 +192,9 @@ mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, goto exit; } if (-1 == two_phase_num_io_procs ){ - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, - two_phase_num_io_procs, - max_data); + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *)fh, + two_phase_num_io_procs, + max_data); if (OMPI_SUCCESS != ret){ goto exit; } @@ -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 fc598e31f0..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 @@ -11,7 +11,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) 2015-2016 Los Alamos National Security, LLC. All rights * reserved. @@ -29,7 +29,7 @@ #include "ompi/constants.h" #include "ompi/communicator/communicator.h" #include "ompi/mca/fcoll/fcoll.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "opal/mca/base/base.h" #include "math.h" @@ -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,13 +180,13 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, if (! (fh->f_flags & OMPIO_CONTIGUOUS_MEMORY)) { - ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, - datatype, - count, - buf, - &max_data, - &temp_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, + datatype, + count, + buf, + &max_data, + &temp_iov, + &iov_count); if (OMPI_SUCCESS != ret ){ goto exit; } @@ -228,9 +228,9 @@ mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, goto exit; } if(-1 == two_phase_num_io_procs){ - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *)fh, - two_phase_num_io_procs, - max_data); + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *)fh, + two_phase_num_io_procs, + max_data); if ( OMPI_SUCCESS != ret){ goto exit; } @@ -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 13c60c23b0..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 @@ -11,7 +11,7 @@ * 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) 2014 Research Organization for Information Science + * Copyright (c) 2014-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. @@ -28,7 +28,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "ompi/mca/fcoll/fcoll.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "opal/mca/base/base.h" #include "math.h" @@ -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/Makefile.am b/ompi/mca/fcoll/vulcan/Makefile.am index 0684396a18..63f1ad9da2 100644 --- a/ompi/mca/fcoll/vulcan/Makefile.am +++ b/ompi/mca/fcoll/vulcan/Makefile.am @@ -11,6 +11,8 @@ # All rights reserved. # Copyright (c) 2008-2018 University of Houston. All rights reserved. # Copyright (c) 2012 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 @@ -41,6 +43,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_fcoll_vulcan_la_SOURCES = $(sources) mca_fcoll_vulcan_la_LDFLAGS = -module -avoid-version +mca_fcoll_vulcan_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_fcoll_vulcan_la_SOURCES =$(sources) 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 77934408c8..beac32fcc1 100644 --- a/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_read_all.c +++ b/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_read_all.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) 2017 Research Organization for Information Science + * Copyright (c) 2017-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. * $COPYRIGHT$ * @@ -26,7 +26,7 @@ #include "ompi/constants.h" #include "ompi/mca/fcoll/fcoll.h" #include "ompi/mca/fcoll/base/fcoll_base_coll_array.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "math.h" #include "ompi/mca/pml/pml.h" @@ -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,13 +124,13 @@ mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, if (! recvbuf_is_contiguous ) { - ret = fh->f_decode_datatype ((struct mca_io_ompio_file_t *)fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *)fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); if (OMPI_SUCCESS != ret){ goto exit; } @@ -149,9 +149,9 @@ mca_fcoll_vulcan_file_read_all (mca_io_ompio_file_t *fh, goto exit; } - ret = fh->f_set_aggregator_props ((struct mca_io_ompio_file_t *) fh, - vulcan_num_io_procs, - max_data); + ret = mca_common_ompio_set_aggregator_props ((struct ompio_file_t *) fh, + vulcan_num_io_procs, + max_data); if (OMPI_SUCCESS != ret){ goto exit; } @@ -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 5730116311..6b4e2201af 100644 --- a/ompi/mca/fcoll/vulcan/fcoll_vulcan_file_write_all.c +++ b/ompi/mca/fcoll/vulcan/fcoll_vulcan_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-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$ * @@ -26,7 +26,7 @@ #include "ompi/constants.h" #include "ompi/mca/fcoll/fcoll.h" #include "ompi/mca/fcoll/base/fcoll_base_coll_array.h" -#include "ompi/mca/io/ompio/io_ompio.h" +#include "ompi/mca/common/ompio/common_ompio.h" #include "ompi/mca/io/io.h" #include "ompi/mca/common/ompio/common_ompio_request.h" #include "math.h" @@ -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,13 +184,13 @@ 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 = fh->f_decode_datatype ((struct mca_io_ompio_file_t *) fh, - datatype, - count, - buf, - &max_data, - &decoded_iov, - &iov_count); + ret = mca_common_ompio_decode_datatype ((struct ompio_file_t *) fh, + datatype, + count, + buf, + &max_data, + &decoded_iov, + &iov_count); if (OMPI_SUCCESS != ret ){ goto exit; } @@ -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,11 +1616,11 @@ 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; - ret = fh->f_set_aggregator_props (fh, num_io_procs, max_data); + ret = mca_common_ompio_set_aggregator_props (fh, num_io_procs, max_data); /* Note: as of this version of the vulcan component, we are not using yet the num_groups parameter to split the aggregators (and processes) into @@ -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..2b83bf8568 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$ @@ -46,6 +46,8 @@ extern int mca_fs_pvfs2_IS_INITIALIZED; BEGIN_C_DECLS +#define OMPIO_PVFS2_MAX_NAME 100 + struct mca_fs_pvfs2_s { PVFS_credentials credentials; PVFS_object_ref object_ref; @@ -55,11 +57,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 +74,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_delete.c b/ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c index 1033e895b7..ca60a8dcce 100644 --- a/ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c +++ b/ompi/mca/fs/pvfs2/fs_pvfs2_file_delete.c @@ -45,7 +45,7 @@ mca_fs_pvfs2_file_delete (char* file_name, PVFS_sysresp_getparent resp_getparent; int ret; PVFS_fs_id pvfs2_id; - char pvfs2_path[OMPIO_MAX_NAME] = {0}; + char pvfs2_path[OMPIO_PVFS2_MAX_NAME] = {0}; char * ncache_timeout; if (!mca_fs_pvfs2_IS_INITIALIZED) { @@ -64,7 +64,7 @@ mca_fs_pvfs2_file_delete (char* file_name, memset (&credentials, 0, sizeof(PVFS_credentials)); PVFS_util_gen_credentials (&credentials); - ret = PVFS_util_resolve(file_name, &pvfs2_id, pvfs2_path, OMPIO_MAX_NAME); + ret = PVFS_util_resolve(file_name, &pvfs2_id, pvfs2_path, OMPIO_PVFS2_MAX_NAME); if (ret != 0) { return OMPI_ERROR; } 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..cfc9acb591 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,12 +62,12 @@ 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; PVFS_fs_id pvfs2_id; - char pvfs2_path[OMPIO_MAX_NAME] = {0}; + char pvfs2_path[OMPIO_PVFS2_MAX_NAME] = {0}; char * ncache_timeout; open_status o_status = {0, {0, 0}}; struct ompi_datatype_t *open_status_type; @@ -129,7 +129,7 @@ mca_fs_pvfs2_file_open (struct ompi_communicator_t *comm, if (OMPIO_ROOT == fh->f_rank) { - ret = PVFS_util_resolve(filename, &pvfs2_id, pvfs2_path, OMPIO_MAX_NAME); + ret = PVFS_util_resolve(filename, &pvfs2_id, pvfs2_path, OMPIO_PVFS2_MAX_NAME); if (ret < 0 ) { PVFS_perror("PVFS_util_resolve", ret); o_status.error = -1; 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/Makefile.am b/ompi/mca/io/ompio/Makefile.am index 8e742a3bb6..9cf3950cf6 100644 --- a/ompi/mca/io/ompio/Makefile.am +++ b/ompi/mca/io/ompio/Makefile.am @@ -11,6 +11,8 @@ # All rights reserved. # Copyright (c) 2008-2012 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 @@ -34,8 +36,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_io_ompio_la_SOURCES = $(headers) $(sources) mca_io_ompio_la_LDFLAGS = -module -avoid-version -mca_io_ompio_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la \ - $(io_ompio_LIBS) \ +mca_io_ompio_la_LIBADD = $(io_ompio_LIBS) \ $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) @@ -45,12 +46,10 @@ libmca_io_ompio_la_LDFLAGS = -module -avoid-version # Source files headers = \ - io_ompio.h \ - io_ompio_aggregators.h + io_ompio.h sources = \ io_ompio.c \ - io_ompio_aggregators.c \ io_ompio_component.c \ io_ompio_module.c \ io_ompio_file_set_view.c \ diff --git a/ompi/mca/io/ompio/io_ompio.c b/ompi/mca/io/ompio/io_ompio.c index 05188ad764..e9805b7f1d 100644 --- a/ompi/mca/io/ompio/io_ompio.c +++ b/ompi/mca/io/ompio/io_ompio.c @@ -13,7 +13,7 @@ * Copyright (c) 2008-2016 University of Houston. All rights reserved. * Copyright (c) 2011-2015 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$ * @@ -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) @@ -415,127 +415,6 @@ int ompi_io_ompio_generate_current_file_view (struct mca_io_ompio_file_t *fh, } -int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, - ompi_datatype_t *datatype, - int count, - const void *buf, - size_t *max_data, - struct iovec **iov, - uint32_t *iovec_count) -{ - - - - opal_convertor_t convertor; - size_t remaining_length = 0; - uint32_t i; - uint32_t temp_count; - struct iovec *temp_iov=NULL; - size_t temp_data; - - - opal_convertor_clone (fh->f_convertor, &convertor, 0); - - if (OMPI_SUCCESS != opal_convertor_prepare_for_send (&convertor, - &(datatype->super), - count, - buf)) { - opal_output (1, "Cannot attach the datatype to a convertor\n"); - return OMPI_ERROR; - } - - if ( 0 == datatype->super.size ) { - *max_data = 0; - *iovec_count = 0; - *iov = NULL; - return OMPI_SUCCESS; - } - - remaining_length = count * datatype->super.size; - - temp_count = OMPIO_IOVEC_INITIAL_SIZE; - temp_iov = (struct iovec*)malloc(temp_count * sizeof(struct iovec)); - if (NULL == temp_iov) { - opal_output (1, "OUT OF MEMORY\n"); - return OMPI_ERR_OUT_OF_RESOURCE; - } - - while (0 == opal_convertor_raw(&convertor, - temp_iov, - &temp_count, - &temp_data)) { -#if 0 - printf ("%d: New raw extraction (iovec_count = %d, max_data = %lu)\n", - fh->f_rank,temp_count, (unsigned long)temp_data); - for (i = 0; i < temp_count; i++) { - printf ("%d: \t{%p, %lu}\n",fh->f_rank, - temp_iov[i].iov_base, - (unsigned long)temp_iov[i].iov_len); - } -#endif - - *iovec_count = *iovec_count + temp_count; - *max_data = *max_data + temp_data; - *iov = (struct iovec *) realloc (*iov, *iovec_count * sizeof(struct iovec)); - if (NULL == *iov) { - opal_output(1, "OUT OF MEMORY\n"); - free(temp_iov); - return OMPI_ERR_OUT_OF_RESOURCE; - } - for (i=0 ; if_rank,temp_count, temp_data); - for (i = 0; i < temp_count; i++) { - printf ("%d: \t offset[%d]: %ld; length[%d]: %ld\n", fh->f_rank,i,temp_iov[i].iov_base, i,temp_iov[i].iov_len); - } -#endif - *iovec_count = *iovec_count + temp_count; - *max_data = *max_data + temp_data; - if ( temp_count > 0 ) { - *iov = (struct iovec *) realloc (*iov, *iovec_count * sizeof(struct iovec)); - if (NULL == *iov) { - opal_output(1, "OUT OF MEMORY\n"); - free(temp_iov); - return OMPI_ERR_OUT_OF_RESOURCE; - } - } - for (i=0 ; if_rank) { - printf ("%d Entries: \n",*iovec_count); - for (i=0 ; i<*iovec_count ; i++) { - printf ("\t{%p, %d}\n", - (*iov)[i].iov_base, - (*iov)[i].iov_len); - } - } -#endif - if (remaining_length != 0) { - printf( "Not all raw description was been extracted (%lu bytes missing)\n", - (unsigned long) remaining_length ); - } - - free (temp_iov); - - return OMPI_SUCCESS; -} - - - int ompi_io_ompio_sort_offlen (mca_io_ompio_offlen_array_t *io_array, int num_entries, int *sorted){ @@ -660,6 +539,15 @@ int mca_io_ompio_get_mca_parameter_value ( char *mca_parameter_name, int name_le else if ( !strncmp ( mca_parameter_name, "aggregators_cutoff_threshold", name_length )) { return mca_io_ompio_aggregators_cutoff_threshold; } + else if ( !strncmp ( mca_parameter_name, "grouping_option", name_length )) { + return mca_io_ompio_grouping_option; + } + else if ( !strncmp ( mca_parameter_name, "sharedfp_lazy_open", name_length )) { + return mca_io_ompio_sharedfp_lazy_open; + } + else if ( !strncmp ( mca_parameter_name, "coll_timing_info", name_length )) { + return mca_io_ompio_coll_timing_info; + } else { opal_output (1, "Error in mca_io_ompio_get_mca_parameter_value: unknown parameter name"); } diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index 457346dc41..37a47c5612 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -11,7 +11,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$ @@ -42,6 +42,7 @@ #include "ompi/datatype/ompi_datatype.h" #include "ompi/request/request.h" +#include "ompi/mca/common/ompio/common_ompio.h" extern int mca_io_ompio_cycle_buffer_size; extern int mca_io_ompio_bytes_per_agg; @@ -55,37 +56,13 @@ extern int mca_io_ompio_overwrite_amode; OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info; -/* - * Flags - */ -#define OMPIO_CONTIGUOUS_MEMORY 0x00000001 -#define OMPIO_UNIFORM_FVIEW 0x00000002 -#define OMPIO_FILE_IS_OPEN 0x00000004 -#define OMPIO_FILE_VIEW_IS_SET 0x00000008 -#define OMPIO_CONTIGUOUS_FVIEW 0x00000010 -#define OMPIO_AGGREGATOR_IS_SET 0x00000020 -#define OMPIO_SHAREDFP_IS_SET 0x00000040 -#define OMPIO_LOCK_ENTIRE_FILE 0x00000080 -#define OMPIO_LOCK_NEVER 0x00000100 -#define OMPIO_LOCK_NOT_THIS_OP 0x00000200 - - #define QUEUESIZE 2048 -#define MCA_IO_DEFAULT_FILE_VIEW_SIZE 4*1024*1024 -#define OMPIO_FCOLL_WANT_TIME_BREAKDOWN 0 - -#define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b)) -#define OMPIO_MAX(a, b) (((a) < (b)) ? (b) : (a)) /* * General values */ #define OMPIO_PREALLOC_MAX_BUF_SIZE 33554432 #define OMPIO_DEFAULT_CYCLE_BUF_SIZE 536870912 -#define OMPIO_PERM_NULL -1 -#define OMPIO_IOVEC_INITIAL_SIZE 100 -#define OMPIO_ROOT 0 -#define OMPIO_MAX_NAME 100 #define OMPIO_TAG_GATHER -100 #define OMPIO_TAG_GATHERV -101 #define OMPIO_TAG_BCAST -102 @@ -104,45 +81,8 @@ OMPI_DECLSPEC extern int mca_io_ompio_coll_timing_info; /*---------------------------*/ - -/*AGGREGATOR GROUPING DECISIONS*/ -#define OMPIO_MERGE 1 -#define OMPIO_SPLIT 2 -#define OMPIO_RETAIN 3 - -#define DATA_VOLUME 1 -#define UNIFORM_DISTRIBUTION 2 -#define CONTIGUITY 3 -#define OPTIMIZE_GROUPING 4 -#define SIMPLE 5 -#define NO_REFINEMENT 6 -#define SIMPLE_PLUS 7 - -#define OMPIO_UNIFORM_DIST_THRESHOLD 0.5 -#define OMPIO_CONTG_THRESHOLD 1048576 -#define OMPIO_CONTG_FACTOR 8 -#define OMPIO_DEFAULT_STRIPE_SIZE 1048576 -#define OMPIO_PROCS_PER_GROUP_TAG 0 -#define OMPIO_PROCS_IN_GROUP_TAG 1 -#define OMPIO_MERGE_THRESHOLD 0.5 - - -#define OMPIO_LOCK_ENTIRE_REGION 10 -#define OMPIO_LOCK_SELECTIVE 11 - -/*---------------------------*/ - BEGIN_C_DECLS -enum ompio_fs_type -{ - NONE = 0, - UFS = 1, - PVFS2 = 2, - LUSTRE = 3, - PLFS = 4 -}; - OMPI_DECLSPEC extern mca_io_base_component_2_0_0_t mca_io_ompio_component; /* * global variables, instantiated in module.c @@ -151,22 +91,6 @@ extern opal_mutex_t mca_io_ompio_mutex; extern mca_io_base_module_2_0_0_t mca_io_ompio_module; OMPI_DECLSPEC extern mca_io_base_component_2_0_0_t mca_io_ompio_component; -typedef struct mca_io_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; - - -typedef struct mca_io_ompio_access_array_t{ - OMPI_MPI_OFFSET_TYPE *offsets; - int *lens; - MPI_Aint *mem_ptrs; - int count; -} mca_io_ompio_access_array_t; - /*Used in extracting offset adj-matrix*/ typedef struct mca_io_ompio_offlen_array_t{ OMPI_MPI_OFFSET_TYPE offset; @@ -175,150 +99,13 @@ typedef struct mca_io_ompio_offlen_array_t{ }mca_io_ompio_offlen_array_t; -/* - * Function that takes in a datatype and buffer, and decodes that datatype - * into an iovec using the convertor_raw function - */ - -/* forward declaration to keep the compiler happy. */ -struct mca_io_ompio_file_t; -typedef int (*mca_io_ompio_decode_datatype_fn_t) (struct mca_io_ompio_file_t *fh, - struct ompi_datatype_t *datatype, - int count, - const void *buf, - size_t *max_data, - struct iovec **iov, - uint32_t *iov_count); -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); - -/* 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_io_ompio_set_aggregator_props_fn_t) (struct mca_io_ompio_file_t *fh, - int num_aggregators, - size_t bytes_per_proc); - - -struct mca_common_ompio_print_queue; - -/** - * Back-end structure for MPI_File - */ -struct mca_io_ompio_file_t { - /* General parameters */ - int fd; - struct ompi_file_t *f_fh; /* pointer back to the file_t structure */ - OMPI_MPI_OFFSET_TYPE f_offset; /* byte offset of current position */ - OMPI_MPI_OFFSET_TYPE f_disp; /* file_view displacement */ - int f_rank; - int f_size; - int f_amode; - int f_perm; - ompi_communicator_t *f_comm; - const char *f_filename; - char *f_datarep; - opal_convertor_t *f_convertor; - opal_info_t *f_info; - int32_t f_flags; - void *f_fs_ptr; - int f_fs_block_size; - int f_atomicity; - size_t f_stripe_size; - int f_stripe_count; - size_t f_cc_size; - int f_bytes_per_agg; - enum ompio_fs_type f_fstype; - ompi_request_t *f_split_coll_req; - bool f_split_coll_in_use; - /* Place for selected sharedfp module to hang it's data. - Note: Neither f_sharedfp nor f_sharedfp_component seemed appropriate for this. - */ - void *f_sharedfp_data; - - - /* File View parameters */ - struct iovec *f_decoded_iov; - uint32_t f_iov_count; - ompi_datatype_t *f_iov_type; - size_t f_position_in_file_view; /* in bytes */ - size_t f_total_bytes; /* total bytes read/written within 1 Fview*/ - int f_index_in_file_view; - ptrdiff_t f_view_extent; - size_t f_view_size; - ompi_datatype_t *f_etype; - ompi_datatype_t *f_filetype; - ompi_datatype_t *f_orig_filetype; /* the fileview passed by the user to us */ - size_t f_etype_size; - - /* contains IO requests that needs to be read/written */ - mca_io_ompio_io_array_t *f_io_array; - int f_num_of_io_entries; - - /* Hooks for modules to hang things */ - mca_base_component_t *f_fs_component; - mca_base_component_t *f_fcoll_component; - mca_base_component_t *f_fbtl_component; - mca_base_component_t *f_sharedfp_component; - - /* structure of function pointers */ - mca_fs_base_module_t *f_fs; - mca_fcoll_base_module_t *f_fcoll; - mca_fbtl_base_module_t *f_fbtl; - mca_sharedfp_base_module_t *f_sharedfp; - - /* Timing information */ - struct mca_common_ompio_print_queue *f_coll_write_time; - struct mca_common_ompio_print_queue *f_coll_read_time; - - /*initial list of aggregators and groups*/ - int *f_init_aggr_list; - int f_init_num_aggrs; - int f_init_procs_per_group; - int *f_init_procs_in_group; - - /* final of aggregators and groups*/ - int *f_aggr_list; - int f_num_aggrs; - int *f_procs_in_group; - int f_procs_per_group; - - /* internal ompio functions required by fbtl and fcoll */ - mca_io_ompio_decode_datatype_fn_t f_decode_datatype; - mca_io_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_io_ompio_set_aggregator_props_fn_t f_set_aggregator_props; -}; -typedef struct mca_io_ompio_file_t mca_io_ompio_file_t; - -struct mca_io_ompio_data_t { - mca_io_ompio_file_t ompio_fh; -}; -typedef struct mca_io_ompio_data_t mca_io_ompio_data_t; - - #include "ompi/mca/common/ompio/common_ompio.h" -#include "io_ompio_aggregators.h" +#include "ompi/mca/common/ompio/common_ompio_aggregators.h" /* functions to retrieve the number of aggregators and the size of the temporary buffer on aggregators from the fcoll modules */ OMPI_DECLSPEC int mca_io_ompio_get_mca_parameter_value ( char *mca_parameter_name, int name_length); -/* - * Function that takes in a datatype and buffer, and decodes that datatype - * into an iovec using the convertor_raw function - */ -OMPI_DECLSPEC int ompi_io_ompio_decode_datatype (struct mca_io_ompio_file_t *fh, - struct ompi_datatype_t *datatype, - int count, - const void *buf, - size_t *max_data, - struct iovec **iov, - uint32_t *iov_count); - /* * Function that sorts an io_array according to the offset by filling * up an array of the indices into the array (HEAP SORT) @@ -328,12 +115,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, @@ -363,8 +150,6 @@ int mca_io_ompio_file_open (struct ompi_communicator_t *comm, struct opal_info_t *info, struct ompi_file_t *fh); int mca_io_ompio_file_close (struct ompi_file_t *fh); -int mca_io_ompio_file_delete (const char *filename, - struct opal_info_t *info); int mca_io_ompio_file_set_size (struct ompi_file_t *fh, OMPI_MPI_OFFSET_TYPE size); int mca_io_ompio_file_preallocate (struct ompi_file_t *fh, diff --git a/ompi/mca/io/ompio/io_ompio_aggregators.h b/ompi/mca/io/ompio/io_ompio_aggregators.h deleted file mode 100644 index 3815a16d66..0000000000 --- a/ompi/mca/io/ompio/io_ompio_aggregators.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -*- Mode: C; c-basic-offset:4 ; -*- */ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2013 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, - * University of Stuttgart. All rights reserved. - * 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$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#ifndef MCA_IO_OMPIO_AGGREGATORS_H -#define MCA_IO_OMPIO_AGGREGATORS_H - - -/*AGGREGATOR GROUPING DECISIONS*/ -#define OMPIO_MERGE 1 -#define OMPIO_SPLIT 2 -#define OMPIO_RETAIN 3 - -typedef struct { - int ndims; - int *dims; - int *periods; - int *coords; - int reorder; -} mca_io_ompio_cart_topo_components; - - -typedef struct{ - OMPI_MPI_OFFSET_TYPE contg_chunk_size; - int *procs_in_contg_group; - int procs_per_contg_group; -} mca_io_ompio_contg; - - - -/*Aggregator selection methods*/ -OMPI_DECLSPEC int mca_io_ompio_set_aggregator_props (struct mca_io_ompio_file_t *fh, - int num_aggregators, - size_t bytes_per_proc); - -int mca_io_ompio_forced_grouping ( mca_io_ompio_file_t *fh, - int num_groups, - mca_io_ompio_contg *contg_groups); - -int mca_io_ompio_cart_based_grouping(mca_io_ompio_file_t *ompio_fh, int *num_groups, - mca_io_ompio_contg *contg_groups); - -int mca_io_ompio_fview_based_grouping(mca_io_ompio_file_t *fh, int *num_groups, - mca_io_ompio_contg *contg_groups); -int mca_io_ompio_simple_grouping(mca_io_ompio_file_t *fh, int *num_groups, - mca_io_ompio_contg *contg_groups); - -int mca_io_ompio_finalize_initial_grouping(mca_io_ompio_file_t *fh, int num_groups, - mca_io_ompio_contg *contg_groups); - -int mca_io_ompio_create_groups(mca_io_ompio_file_t *fh, size_t bytes_per_proc); - -int mca_io_ompio_prepare_to_group(mca_io_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, - OMPI_MPI_OFFSET_TYPE *bytes_per_group, - int **decision_list, - size_t bytes_per_proc, - int *is_aggregator, - int *ompio_grouping_flag); - -int mca_io_ompio_retain_initial_groups(mca_io_ompio_file_t *fh); - - -int mca_io_ompio_split_initial_groups(mca_io_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_io_ompio_split_a_group(mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE *start_offsets_lens, - OMPI_MPI_OFFSET_TYPE *end_offsets, - int size_new_group, - OMPI_MPI_OFFSET_TYPE *max_cci, - OMPI_MPI_OFFSET_TYPE *min_cci, - int *num_groups, int *size_smallest_group); - -int mca_io_ompio_finalize_split(mca_io_ompio_file_t *fh, int size_new_group, - int size_last_group); - -int mca_io_ompio_merge_initial_groups(mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE *aggr_bytes_per_group, - int *decision_list, int is_aggregator); - -int mca_io_ompio_merge_groups(mca_io_ompio_file_t *fh, int *merge_aggrs, - int num_merge_aggrs); - - -#endif diff --git a/ompi/mca/io/ompio/io_ompio_component.c b/ompi/mca/io/ompio/io_ompio_component.c index 41a477828c..911ed67f30 100644 --- a/ompi/mca/io/ompio/io_ompio_component.c +++ b/ompi/mca/io/ompio/io_ompio_component.c @@ -13,7 +13,7 @@ * Copyright (c) 2008-2018 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$ @@ -260,7 +260,8 @@ static int open_component(void) mca_common_ompio_request_init (); - return OMPI_SUCCESS; + return mca_common_ompio_set_callbacks(ompi_io_ompio_generate_current_file_view, + mca_io_ompio_get_mca_parameter_value); } @@ -286,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 @@ -323,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; } @@ -367,7 +368,7 @@ static int delete_select(const char *filename, struct opal_info_t *info, int ret; OPAL_THREAD_LOCK (&mca_io_ompio_mutex); - ret = mca_io_ompio_file_delete (filename, info); + ret = mca_common_ompio_file_delete (filename, info); OPAL_THREAD_UNLOCK (&mca_io_ompio_mutex); return ret; diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index 6c71805720..37f7b308b7 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.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 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2016 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2016-2017 IBM Corporation. All rights reserved. * $COPYRIGHT$ * @@ -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; @@ -103,40 +103,16 @@ int mca_io_ompio_file_close (ompi_file_t *fh) return ret; } -int mca_io_ompio_file_delete (const char *filename, - struct opal_info_t *info) -{ - int ret = OMPI_SUCCESS; - - /* No locking required for file_delete according to my understanding. - One thread will succeed, the other ones silently ignore the - error that the file is already deleted. - */ - ret = unlink(filename); - - if (0 > ret ) { - if ( ENOENT == errno ) { - return MPI_ERR_NO_SUCH_FILE; - } else { - opal_output (0, "mca_io_ompio_file_delete: Could not remove file %s errno = %d %s\n", filename, - errno, strerror(errno)); - return MPI_ERR_ACCESS; - } - } - - return OMPI_SUCCESS; -} - int mca_io_ompio_file_preallocate (ompi_file_t *fh, OMPI_MPI_OFFSET_TYPE diskspace) { 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; @@ -251,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); @@ -298,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); @@ -312,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; @@ -336,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) { @@ -368,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; @@ -382,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) ) { @@ -408,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; @@ -456,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); @@ -474,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 * @@ -520,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*/ @@ -546,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/Makefile.am b/ompi/mca/sharedfp/individual/Makefile.am index d0a4ed34ba..acb17a7081 100644 --- a/ompi/mca/sharedfp/individual/Makefile.am +++ b/ompi/mca/sharedfp/individual/Makefile.am @@ -11,6 +11,8 @@ # All rights reserved. # Copyright (c) 2008 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 @@ -34,7 +36,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_sharedfp_individual_la_SOURCES = $(sources) mca_sharedfp_individual_la_LDFLAGS = -module -avoid-version -mca_sharedfp_individual_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la +mca_sharedfp_individual_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_sharedfp_individual_la_SOURCES = $(sources) 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_collaborate_data.c b/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c index 1fc2a388d9..3b44b48505 100644 --- a/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.c +++ b/ompi/mca/sharedfp/individual/sharedfp_individual_collaborate_data.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,6 @@ #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" #include "ompi/mca/common/ompio/common_ompio.h" -#include "ompi/mca/io/ompio/io_ompio.h" #include #include 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/Makefile.am b/ompi/mca/sharedfp/lockedfile/Makefile.am index b0151c5612..8777844675 100644 --- a/ompi/mca/sharedfp/lockedfile/Makefile.am +++ b/ompi/mca/sharedfp/lockedfile/Makefile.am @@ -11,6 +11,8 @@ # All rights reserved. # Copyright (c) 2008 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 @@ -34,7 +36,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_sharedfp_lockedfile_la_SOURCES = $(sources) mca_sharedfp_lockedfile_la_LDFLAGS = -module -avoid-version -mca_sharedfp_lockedfile_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la +mca_sharedfp_lockedfile_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_sharedfp_lockedfile_la_SOURCES = $(sources) 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 190573ab6f..dd671ae960 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iread.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_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 @@ -25,9 +27,9 @@ #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -#include "ompi/mca/io/ompio/io_ompio.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, @@ -88,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) @@ -217,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 bf9fb801be..b3b251f95b 100644 --- a/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_iwrite.c +++ b/ompi/mca/sharedfp/lockedfile/sharedfp_lockedfile_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$ * @@ -27,9 +27,9 @@ #include "ompi/constants.h" #include "ompi/mca/sharedfp/sharedfp.h" #include "ompi/mca/sharedfp/base/base.h" -#include "ompi/mca/io/ompio/io_ompio.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/Makefile.am b/ompi/mca/sharedfp/sm/Makefile.am index 3553cb80c5..62e0ab43f4 100644 --- a/ompi/mca/sharedfp/sm/Makefile.am +++ b/ompi/mca/sharedfp/sm/Makefile.am @@ -11,6 +11,8 @@ # All rights reserved. # Copyright (c) 2008 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 @@ -34,7 +36,7 @@ mcacomponentdir = $(ompilibdir) mcacomponent_LTLIBRARIES = $(component_install) mca_sharedfp_sm_la_SOURCES = $(sources) mca_sharedfp_sm_la_LDFLAGS = -module -avoid-version -mca_sharedfp_sm_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la +mca_sharedfp_sm_la_LIBADD = $(OMPI_TOP_BUILDDIR)/ompi/mca/common/ompio/libmca_common_ompio.la noinst_LTLIBRARIES = $(component_noinst) libmca_sharedfp_sm_la_SOURCES = $(sources) 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,