diff --git a/ompi/mca/fcoll/dynamic/Makefile.am b/ompi/mca/fcoll/dynamic/Makefile.am index ded959c98d8..c983c24d840 100644 --- a/ompi/mca/fcoll/dynamic/Makefile.am +++ b/ompi/mca/fcoll/dynamic/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # 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) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # @@ -23,11 +23,7 @@ sources = \ fcoll_dynamic_module.c \ fcoll_dynamic_component.c \ fcoll_dynamic_file_read_all.c \ - fcoll_dynamic_file_read_all_begin.c \ - fcoll_dynamic_file_read_all_end.c \ - fcoll_dynamic_file_write_all.c \ - fcoll_dynamic_file_write_all_begin.c \ - fcoll_dynamic_file_write_all_end.c + fcoll_dynamic_file_write_all.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic.h b/ompi/mca/fcoll/dynamic/fcoll_dynamic.h index 99b8a2a4d02..62c70606bd8 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic.h +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic.h @@ -54,14 +54,6 @@ int mca_fcoll_dynamic_file_read_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_dynamic_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_dynamic_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); int mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, void *buf, @@ -69,14 +61,6 @@ int mca_fcoll_dynamic_file_write_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_dynamic_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_dynamic_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); END_C_DECLS diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all_begin.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all_begin.c deleted file mode 100644 index 1faffe7c6db..00000000000 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_dynamic.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_dynamic_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("DYNAMIC READ ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all_end.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all_end.c deleted file mode 100644 index e4ecd3b4c75..00000000000 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_read_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_dynamic.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_dynamic_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("DYNAMIC READ ALL END\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all_begin.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all_begin.c deleted file mode 100644 index af59fae369b..00000000000 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_dynamic.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_dynamic_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("DYNAMIC WRITE ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all_end.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all_end.c deleted file mode 100644 index 9a6a554d824..00000000000 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_file_write_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_dynamic.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_dynamic_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("DYNAMIC WRITE ALL END\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c b/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c index f27bacc82e1..85b2b7afd12 100644 --- a/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c +++ b/ompi/mca/fcoll/dynamic/fcoll_dynamic_module.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,11 +36,11 @@ static mca_fcoll_base_module_1_0_0_t dynamic = { mca_fcoll_dynamic_module_init, mca_fcoll_dynamic_module_finalize, mca_fcoll_dynamic_file_read_all, - mca_fcoll_dynamic_file_read_all_begin, - mca_fcoll_dynamic_file_read_all_end, + NULL, /* iread_all */ mca_fcoll_dynamic_file_write_all, - mca_fcoll_dynamic_file_write_all_begin, - mca_fcoll_dynamic_file_write_all_end + NULL, /*iwrite_all */ + NULL, /* progress */ + NULL /* request_free */ }; int diff --git a/ompi/mca/fcoll/fcoll.h b/ompi/mca/fcoll/fcoll.h index d04174fa037..ec0a6fc23ee 100644 --- a/ompi/mca/fcoll/fcoll.h +++ b/ompi/mca/fcoll/fcoll.h @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. * $COPYRIGHT$ @@ -27,10 +27,12 @@ #include "mpi.h" #include "ompi/mca/mca.h" #include "opal/mca/base/base.h" +#include "ompi/request/request.h" BEGIN_C_DECLS struct mca_io_ompio_file_t; +struct mca_fcoll_request_t; /* * Macro for use in components that are of type coll @@ -115,16 +117,12 @@ typedef int (*mca_fcoll_base_module_file_read_all_fn_t) struct ompi_datatype_t *datatype, ompi_status_public_t *status); -typedef int (*mca_fcoll_base_module_file_read_all_begin_fn_t) +typedef int (*mca_fcoll_base_module_file_iread_all_fn_t) (struct mca_io_ompio_file_t *fh, void *buf, int count, - struct ompi_datatype_t *datatype); - -typedef int (*mca_fcoll_base_module_file_read_all_end_fn_t) -(struct mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status); + 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, @@ -133,16 +131,18 @@ typedef int (*mca_fcoll_base_module_file_write_all_fn_t) struct ompi_datatype_t *datatype, ompi_status_public_t *status); -typedef int (*mca_fcoll_base_module_file_write_all_begin_fn_t) +typedef int (*mca_fcoll_base_module_file_iwrite_all_fn_t) (struct mca_io_ompio_file_t *fh, void *buf, int count, - struct ompi_datatype_t *datatype); + struct ompi_datatype_t *datatype, + ompi_request_t **request); -typedef int (*mca_fcoll_base_module_file_write_all_end_fn_t) -(struct mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status); +typedef bool (*mca_fcoll_base_module_progress_fn_t) +( struct mca_fcoll_request_t *request); + +typedef void (*mca_fcoll_base_module_request_free_fn_t) +( struct mca_fcoll_request_t *request); /* * *********************************************************************** @@ -160,11 +160,12 @@ struct mca_fcoll_base_module_1_0_0_t { /* FCOLL function pointers */ mca_fcoll_base_module_file_read_all_fn_t fcoll_file_read_all; - mca_fcoll_base_module_file_read_all_begin_fn_t fcoll_file_read_all_begin; - mca_fcoll_base_module_file_read_all_end_fn_t fcoll_file_read_all_end; + mca_fcoll_base_module_file_iread_all_fn_t fcoll_file_iread_all; mca_fcoll_base_module_file_write_all_fn_t fcoll_file_write_all; - mca_fcoll_base_module_file_write_all_begin_fn_t fcoll_file_write_all_begin; - mca_fcoll_base_module_file_write_all_end_fn_t fcoll_file_write_all_end; + mca_fcoll_base_module_file_iwrite_all_fn_t fcoll_file_iwrite_all; + mca_fcoll_base_module_progress_fn_t fcoll_progress; + mca_fcoll_base_module_request_free_fn_t fcoll_request_free; + }; typedef struct mca_fcoll_base_module_1_0_0_t mca_fcoll_base_module_1_0_0_t; typedef mca_fcoll_base_module_1_0_0_t mca_fcoll_base_module_t; diff --git a/ompi/mca/fcoll/individual/Makefile.am b/ompi/mca/fcoll/individual/Makefile.am index 1f976f594fa..727e3f52f37 100644 --- a/ompi/mca/fcoll/individual/Makefile.am +++ b/ompi/mca/fcoll/individual/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # 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) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # @@ -23,11 +23,7 @@ sources = \ fcoll_individual_module.c \ fcoll_individual_component.c \ fcoll_individual_file_read_all.c \ - fcoll_individual_file_read_all_begin.c \ - fcoll_individual_file_read_all_end.c \ - fcoll_individual_file_write_all.c \ - fcoll_individual_file_write_all_begin.c \ - fcoll_individual_file_write_all_end.c + fcoll_individual_file_write_all.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/fcoll/individual/fcoll_individual.h b/ompi/mca/fcoll/individual/fcoll_individual.h index c9c9e6d2d75..9ae1f967854 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual.h +++ b/ompi/mca/fcoll/individual/fcoll_individual.h @@ -54,14 +54,6 @@ int mca_fcoll_individual_file_read_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_individual_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_individual_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, void *buf, @@ -69,14 +61,6 @@ int mca_fcoll_individual_file_write_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_individual_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_individual_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); END_C_DECLS diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all_begin.c b/ompi/mca/fcoll/individual/fcoll_individual_file_read_all_begin.c deleted file mode 100644 index 311574f0ec3..00000000000 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_individual.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_individual_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("INDIVIDUAL READ ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all_end.c b/ompi/mca/fcoll/individual/fcoll_individual_file_read_all_end.c deleted file mode 100644 index d9b1f7a08dd..00000000000 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_read_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_individual.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_individual_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("INDIVIDUAL READ ALL END\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all_begin.c b/ompi/mca/fcoll/individual/fcoll_individual_file_write_all_begin.c deleted file mode 100644 index 75050387d27..00000000000 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_individual.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_individual_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("INDIVIDUAL WRITE ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all_end.c b/ompi/mca/fcoll/individual/fcoll_individual_file_write_all_end.c deleted file mode 100644 index b080e801a5d..00000000000 --- a/ompi/mca/fcoll/individual/fcoll_individual_file_write_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_individual.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_individual_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("INDIVIDUAL WRITE ALL END\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/individual/fcoll_individual_module.c b/ompi/mca/fcoll/individual/fcoll_individual_module.c index 677c32c3e2e..b9c95a86bae 100644 --- a/ompi/mca/fcoll/individual/fcoll_individual_module.c +++ b/ompi/mca/fcoll/individual/fcoll_individual_module.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,11 +36,11 @@ static mca_fcoll_base_module_1_0_0_t individual = { mca_fcoll_individual_module_init, mca_fcoll_individual_module_finalize, mca_fcoll_individual_file_read_all, - mca_fcoll_individual_file_read_all_begin, - mca_fcoll_individual_file_read_all_end, + NULL, /* iread_all */ mca_fcoll_individual_file_write_all, - mca_fcoll_individual_file_write_all_begin, - mca_fcoll_individual_file_write_all_end + NULL, /* iwrite_all */ + NULL, /* progress */ + NULL /* request_free */ }; int diff --git a/ompi/mca/fcoll/static/Makefile.am b/ompi/mca/fcoll/static/Makefile.am index 4b4e8f451a1..ee01ac7ec26 100644 --- a/ompi/mca/fcoll/static/Makefile.am +++ b/ompi/mca/fcoll/static/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # 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) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # @@ -23,11 +23,7 @@ sources = \ fcoll_static_module.c \ fcoll_static_component.c \ fcoll_static_file_read_all.c \ - fcoll_static_file_read_all_begin.c \ - fcoll_static_file_read_all_end.c \ - fcoll_static_file_write_all.c \ - fcoll_static_file_write_all_begin.c \ - fcoll_static_file_write_all_end.c + fcoll_static_file_write_all.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/fcoll/static/fcoll_static.h b/ompi/mca/fcoll/static/fcoll_static.h index 3d461f0f709..be03c032ea6 100644 --- a/ompi/mca/fcoll/static/fcoll_static.h +++ b/ompi/mca/fcoll/static/fcoll_static.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -53,14 +53,6 @@ int mca_fcoll_static_file_read_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_static_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_static_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); int mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, void *buf, @@ -68,14 +60,6 @@ int mca_fcoll_static_file_write_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_static_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_static_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); END_C_DECLS diff --git a/ompi/mca/fcoll/static/fcoll_static_file_read_all_begin.c b/ompi/mca/fcoll/static/fcoll_static_file_read_all_begin.c deleted file mode 100644 index a383ce9b76f..00000000000 --- a/ompi/mca/fcoll/static/fcoll_static_file_read_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_static.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_static_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("STATIC READ ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/static/fcoll_static_file_read_all_end.c b/ompi/mca/fcoll/static/fcoll_static_file_read_all_end.c deleted file mode 100644 index 7d3101cd2f6..00000000000 --- a/ompi/mca/fcoll/static/fcoll_static_file_read_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_static.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_static_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("STATIC READ ALL END\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/static/fcoll_static_file_write_all_begin.c b/ompi/mca/fcoll/static/fcoll_static_file_write_all_begin.c deleted file mode 100644 index 5828974b3cf..00000000000 --- a/ompi/mca/fcoll/static/fcoll_static_file_write_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_static.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_static_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("STATIC WRITE ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/static/fcoll_static_file_write_all_end.c b/ompi/mca/fcoll/static/fcoll_static_file_write_all_end.c deleted file mode 100644 index 3c36d19c8b4..00000000000 --- a/ompi/mca/fcoll/static/fcoll_static_file_write_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_static.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_static_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("STATIC WRITE ALL END\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/static/fcoll_static_module.c b/ompi/mca/fcoll/static/fcoll_static_module.c index 11462bff4b6..f88253ec641 100644 --- a/ompi/mca/fcoll/static/fcoll_static_module.c +++ b/ompi/mca/fcoll/static/fcoll_static_module.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,11 +36,11 @@ static mca_fcoll_base_module_1_0_0_t static_t = { mca_fcoll_static_module_init, mca_fcoll_static_module_finalize, mca_fcoll_static_file_read_all, - mca_fcoll_static_file_read_all_begin, - mca_fcoll_static_file_read_all_end, + NULL, /* iread_all */ mca_fcoll_static_file_write_all, - mca_fcoll_static_file_write_all_begin, - mca_fcoll_static_file_write_all_end + NULL, /* iwrite_all */ + NULL, /* progress */ + NULL /* request_free */ }; int diff --git a/ompi/mca/fcoll/two_phase/Makefile.am b/ompi/mca/fcoll/two_phase/Makefile.am index 08003efc734..5a14494700a 100644 --- a/ompi/mca/fcoll/two_phase/Makefile.am +++ b/ompi/mca/fcoll/two_phase/Makefile.am @@ -9,7 +9,7 @@ # University of Stuttgart. All rights reserved. # 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) 2008-2015 University of Houston. All rights reserved. # Copyright (c) 2012 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # @@ -23,12 +23,8 @@ sources = \ fcoll_two_phase_module.c \ fcoll_two_phase_component.c \ fcoll_two_phase_file_read_all.c \ - fcoll_two_phase_file_read_all_begin.c \ - fcoll_two_phase_file_read_all_end.c \ fcoll_two_phase_file_write_all.c \ - fcoll_two_phase_file_write_all_begin.c \ - fcoll_two_phase_support_fns.c \ - fcoll_two_phase_file_write_all_end.c + fcoll_two_phase_support_fns.c # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase.h b/ompi/mca/fcoll/two_phase/fcoll_two_phase.h index 8619903e0ed..61c88f86581 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase.h +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase.h @@ -54,14 +54,6 @@ int mca_fcoll_two_phase_file_read_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_two_phase_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_two_phase_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); int mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, void *buf, @@ -69,14 +61,6 @@ int mca_fcoll_two_phase_file_write_all (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype, ompi_status_public_t * status); -int mca_fcoll_two_phase_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype); - -int mca_fcoll_two_phase_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status); int mca_fcoll_two_phase_calc_aggregator (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE off, diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all_begin.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all_begin.c deleted file mode 100644 index e41ac3d6582..00000000000 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_two_phase.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_two_phase_file_read_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("DYNAMIC READ ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all_end.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all_end.c deleted file mode 100644 index d4dbaf42293..00000000000 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_read_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_two_phase.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_two_phase_file_read_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("DYNAMIC READ ALL END\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all_begin.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all_begin.c deleted file mode 100644 index 05f057e9654..00000000000 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all_begin.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_two_phase.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_two_phase_file_write_all_begin (mca_io_ompio_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) -{ - printf ("DYNAMIC WRITE ALL BEGIN\n"); - return OMPI_SUCCESS; -} diff --git a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all_end.c b/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all_end.c deleted file mode 100644 index 687ef8a0547..00000000000 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_file_write_all_end.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana - * University Research and Technology - * Corporation. All rights reserved. - * Copyright (c) 2004-2005 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * 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-2011 University of Houston. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "ompi_config.h" -#include "fcoll_two_phase.h" - -#include "mpi.h" -#include "ompi/constants.h" -#include "ompi/mca/fcoll/fcoll.h" - - -int -mca_fcoll_two_phase_file_write_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t *status) -{ - printf ("DYNAMIC WRITE ALL END\n"); - return OMPI_SUCCESS; -} 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 47780136489..b6e1cb65199 100644 --- a/ompi/mca/fcoll/two_phase/fcoll_two_phase_module.c +++ b/ompi/mca/fcoll/two_phase/fcoll_two_phase_module.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -36,11 +36,11 @@ static mca_fcoll_base_module_1_0_0_t two_phase = { mca_fcoll_two_phase_module_init, mca_fcoll_two_phase_module_finalize, mca_fcoll_two_phase_file_read_all, - mca_fcoll_two_phase_file_read_all_begin, - mca_fcoll_two_phase_file_read_all_end, + NULL, /* iread_all */ mca_fcoll_two_phase_file_write_all, - mca_fcoll_two_phase_file_write_all_begin, - mca_fcoll_two_phase_file_write_all_end + NULL, /* iwrite_all */ + NULL, /* progress */ + NULL /* request_free */ }; int diff --git a/ompi/mca/io/ompio/io_ompio.h b/ompi/mca/io/ompio/io_ompio.h index 6da5cfef774..0649f7a01e6 100644 --- a/ompi/mca/io/ompio/io_ompio.h +++ b/ompi/mca/io/ompio/io_ompio.h @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -50,13 +50,13 @@ 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_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 QUEUESIZE 2048 #define OMPIO_MIN(a, b) (((a) < (b)) ? (a) : (b)) @@ -297,7 +297,8 @@ struct mca_io_ompio_file_t { 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. */ @@ -350,7 +351,8 @@ struct mca_io_ompio_file_t { int *f_init_procs_in_group; int f_final_num_aggrs; - + + /* 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; @@ -786,6 +788,18 @@ int mca_io_ompio_file_read_all (struct ompi_file_t *fh, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); +int mca_io_ompio_file_iread_all (ompi_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request); +int mca_io_ompio_file_iread_at_all (ompi_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request); + int mca_io_ompio_file_write (struct ompi_file_t *fh, void *buf, int count, @@ -796,6 +810,17 @@ int mca_io_ompio_file_write_all (struct ompi_file_t *fh, int count, struct ompi_datatype_t *datatype, ompi_status_public_t *status); +int mca_io_ompio_file_iwrite_all (ompi_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request); +int mca_io_ompio_file_iwrite_at_all (ompi_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request); int mca_io_ompio_file_iread (struct ompi_file_t *fh, void *buf, int count, diff --git a/ompi/mca/io/ompio/io_ompio_file_open.c b/ompi/mca/io/ompio/io_ompio_file_open.c index e25ef5fe6e3..a6f45683a43 100644 --- a/ompi/mca/io/ompio/io_ompio_file_open.c +++ b/ompi/mca/io/ompio/io_ompio_file_open.c @@ -122,6 +122,9 @@ ompio_io_ompio_file_open (ompi_communicator_t *comm, ompi_io_ompio_set_file_defaults (ompio_fh); ompio_fh->f_filename = filename; + ompio_fh->f_split_coll_req = NULL; + ompio_fh->f_split_coll_in_use = false; + /*Initialize the print_queues queues here!*/ coll_write_time = (print_queue *) malloc (sizeof(print_queue)); coll_read_time = (print_queue *) malloc (sizeof(print_queue)); diff --git a/ompi/mca/io/ompio/io_ompio_file_read.c b/ompi/mca/io/ompio/io_ompio_file_read.c index 4dfd875179f..2cf699c53f5 100644 --- a/ompi/mca/io/ompio/io_ompio_file_read.c +++ b/ompi/mca/io/ompio/io_ompio_file_read.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -379,6 +379,36 @@ int mca_io_ompio_file_read_all (ompi_file_t *fh, return ret; } +int mca_io_ompio_file_iread_all (ompi_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request) +{ + int ret = OMPI_SUCCESS; + mca_io_ompio_data_t *data=NULL; + mca_io_ompio_file_t *fp=NULL; + + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + fp = &data->ompio_fh; + + if ( NULL != fp->f_fcoll->fcoll_file_iread_all ) { + ret = fp->f_fcoll->fcoll_file_iread_all (&data->ompio_fh, + buf, + count, + datatype, + request); + } + else { + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with + individual non-blocking I/O operations. */ + ret = ompio_io_ompio_file_iread ( fp, buf, count, datatype, request ); + } + + return ret; +} + int mca_io_ompio_file_read_at_all (ompi_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, @@ -418,6 +448,41 @@ int ompio_io_ompio_file_read_at_all (mca_io_ompio_file_t *fh, return ret; } +int mca_io_ompio_file_iread_at_all (ompi_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request) +{ + int ret = OMPI_SUCCESS; + mca_io_ompio_data_t *data; + mca_io_ompio_file_t *fp=NULL; + OMPI_MPI_OFFSET_TYPE prev_offset; + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + fp = &data->ompio_fh; + + ompio_io_ompio_file_get_position (fp, &prev_offset ); + ompi_io_ompio_set_explicit_offset (fp, offset); + + if ( NULL != fp->f_fcoll->fcoll_file_iread_all ) { + ret = fp->f_fcoll->fcoll_file_iread_all (&data->ompio_fh, + buf, + count, + datatype, + request); + } + else { + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with + individual non-blocking I/O operations. */ + ret = ompio_io_ompio_file_iread ( fp, buf, count, datatype, request ); + } + + + ompi_io_ompio_set_explicit_offset (fp, prev_offset); + return ret; +} /* Infrastructure for shared file pointer operations ** (individual and ordered)*/ @@ -553,15 +618,17 @@ 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; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - - ret = data->ompio_fh. - f_fcoll->fcoll_file_read_all_begin (&data->ompio_fh, - buf, - count, - datatype); + 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"); + return MPI_ERR_OTHER; + } + ret = mca_io_ompio_file_iread_all ( fh, buf, count, datatype, &fp->f_split_coll_req ); + fp->f_split_coll_in_use = true; return ret; } @@ -571,15 +638,15 @@ 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; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + fp = &data->ompio_fh; + ret = ompi_request_wait ( &fp->f_split_coll_req, status ); - ret = data->ompio_fh. - f_fcoll->fcoll_file_read_all_end (&data->ompio_fh, - buf, - status); - + /* remove the flag again */ + fp->f_split_coll_in_use = false; return ret; } @@ -593,8 +660,7 @@ int mca_io_ompio_file_read_at_all_begin (ompi_file_t *fh, mca_io_ompio_data_t *data; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_read_at_all_begin(&data->ompio_fh,offset,buf,count,datatype); - + ret = ompio_io_ompio_file_read_at_all_begin ( &data->ompio_fh, offset, buf, count, datatype ); return ret; } @@ -605,21 +671,13 @@ int ompio_io_ompio_file_read_at_all_begin (mca_io_ompio_file_t *fh, struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE prev_offset; - ompio_io_ompio_file_get_position (fh, &prev_offset ); - ompi_io_ompio_set_explicit_offset (fh, offset); - ret = fh->f_fcoll->fcoll_file_read_all_begin (fh, - buf, - count, - datatype); - - /* It is OK to reset the position already here, althgouth - ** the operation might still be pending/ongoing, since - ** the entire array of have - ** already been constructed in the file_read_all_begin operation - */ - ompi_io_ompio_set_explicit_offset (fh, prev_offset); + if ( true == fh->f_split_coll_in_use ) { + printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + return MPI_ERR_REQUEST; + } + ret = mca_io_ompio_file_iread_at_all ( fh->f_fh, offset, buf, count, datatype, &fh->f_split_coll_req ); + fh->f_split_coll_in_use = true; return ret; } @@ -631,8 +689,7 @@ int mca_io_ompio_file_read_at_all_end (ompi_file_t *fh, mca_io_ompio_data_t *data; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_read_at_all_end(&data->ompio_fh,buf,status); - + ret = ompio_io_ompio_file_read_at_all_end ( &data->ompio_fh, buf, status ); return ret; } @@ -641,10 +698,9 @@ int ompio_io_ompio_file_read_at_all_end (mca_io_ompio_file_t *ompio_fh, ompi_status_public_t * status) { int ret = OMPI_SUCCESS; + ret = ompi_request_wait ( &ompio_fh->f_split_coll_req, status ); - ret = ompio_fh->f_fcoll->fcoll_file_read_all_end (ompio_fh, - buf, - status); - + /* remove the flag again */ + ompio_fh->f_split_coll_in_use = false; return ret; } diff --git a/ompi/mca/io/ompio/io_ompio_file_write.c b/ompi/mca/io/ompio/io_ompio_file_write.c index 06f364dea58..1cc22ef7366 100644 --- a/ompi/mca/io/ompio/io_ompio_file_write.c +++ b/ompi/mca/io/ompio/io_ompio_file_write.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * 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) 2008-2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -507,6 +507,36 @@ int mca_io_ompio_file_write_at_all (ompi_file_t *fh, return ret; } +int mca_io_ompio_file_iwrite_all (ompi_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request) +{ + int ret = OMPI_SUCCESS; + mca_io_ompio_data_t *data=NULL; + mca_io_ompio_file_t *fp=NULL; + + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + fp = &data->ompio_fh; + + if ( NULL != fp->f_fcoll->fcoll_file_iwrite_all ) { + ret = fp->f_fcoll->fcoll_file_iwrite_all (&data->ompio_fh, + buf, + count, + datatype, + request); + } + else { + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with + individual non-blocking I/O operations. */ + ret = ompio_io_ompio_file_iwrite ( fp, buf, count, datatype, request ); + } + + return ret; +} + int ompio_io_ompio_file_write_at_all (mca_io_ompio_file_t *fh, OMPI_MPI_OFFSET_TYPE offset, void *buf, @@ -529,6 +559,43 @@ int ompio_io_ompio_file_write_at_all (mca_io_ompio_file_t *fh, return ret; } +int mca_io_ompio_file_iwrite_at_all (ompi_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype, + ompi_request_t **request) +{ + int ret = OMPI_SUCCESS; + mca_io_ompio_data_t *data; + mca_io_ompio_file_t *fp=NULL; + OMPI_MPI_OFFSET_TYPE prev_offset; + + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + fp = &data->ompio_fh; + ompio_io_ompio_file_get_position (fp, &prev_offset ); + + ompi_io_ompio_set_explicit_offset (fp, offset); + + if ( NULL != fp->f_fcoll->fcoll_file_iwrite_all ) { + ret = fp->f_fcoll->fcoll_file_iwrite_all (&data->ompio_fh, + buf, + count, + datatype, + request); + } + else { + /* this fcoll component does not support non-blocking + collective I/O operations. WE fake it with + individual non-blocking I/O operations. */ + ret = ompio_io_ompio_file_iwrite ( fp, buf, count, datatype, request ); + } + + + ompi_io_ompio_set_explicit_offset (fp, prev_offset); + return ret; +} + /* Infrastructure for shared file pointer operations */ /* (Individual and collective */ @@ -659,103 +726,97 @@ int mca_io_ompio_file_write_ordered_end (ompi_file_t *fp, /* Split collectives . Not really used but infrastructure is in place */ /**********************************************************************/ -int mca_io_ompio_file_write_at_all_begin (ompi_file_t *fh, - OMPI_MPI_OFFSET_TYPE offset, - void *buf, - int count, - struct ompi_datatype_t *datatype) +int mca_io_ompio_file_write_all_begin (ompi_file_t *fh, + void *buf, + int count, + struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; + mca_io_ompio_file_t *fp; mca_io_ompio_data_t *data; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_write_at_all_begin(&data->ompio_fh,offset,buf,count,datatype); + 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"); + return MPI_ERR_OTHER; + } + ret = mca_io_ompio_file_iwrite_all ( fh, buf, count, datatype, &fp->f_split_coll_req ); + fp->f_split_coll_in_use = true; return ret; } -int ompio_io_ompio_file_write_at_all_begin (mca_io_ompio_file_t *fh, - OMPI_MPI_OFFSET_TYPE offset, - void *buf, - int count, - struct ompi_datatype_t *datatype) +int mca_io_ompio_file_write_all_end (ompi_file_t *fh, + void *buf, + ompi_status_public_t *status) { int ret = OMPI_SUCCESS; - OMPI_MPI_OFFSET_TYPE prev_offset; - ompio_io_ompio_file_get_position (fh, &prev_offset ); + mca_io_ompio_file_t *fp; + mca_io_ompio_data_t *data; - ompi_io_ompio_set_explicit_offset (fh, offset); - ret = fh->f_fcoll->fcoll_file_write_all_begin (fh, - buf, - count, - datatype); + data = (mca_io_ompio_data_t *) fh->f_io_selected_data; + fp = &data->ompio_fh; + ret = ompi_request_wait ( &fp->f_split_coll_req, status ); - /* It is OK to reset the position already here, althgouth - ** the operation might still be pending/ongoing, since - ** the entire array of have - ** already been constructed in the file_write_all_begin operation - */ - ompi_io_ompio_set_explicit_offset (fh, prev_offset); + /* remove the flag again */ + fp->f_split_coll_in_use = false; return ret; } -int mca_io_ompio_file_write_at_all_end (ompi_file_t *fh, - void *buf, - ompi_status_public_t * status) + +int mca_io_ompio_file_write_at_all_begin (ompi_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = ompio_io_ompio_file_write_at_all_end(&data->ompio_fh,buf,status); - + ret = ompio_io_ompio_file_write_at_all_begin ( &data->ompio_fh, offset, buf, count, datatype ); return ret; } -int ompio_io_ompio_file_write_at_all_end (mca_io_ompio_file_t *fh, - void *buf, - ompi_status_public_t * status) +int ompio_io_ompio_file_write_at_all_begin (mca_io_ompio_file_t *fh, + OMPI_MPI_OFFSET_TYPE offset, + void *buf, + int count, + struct ompi_datatype_t *datatype) { int ret = OMPI_SUCCESS; - - ret = fh->f_fcoll->fcoll_file_write_all_end (fh, - buf, - status); + if ( true == fh->f_split_coll_in_use ) { + printf("Only one split collective I/O operation allowed per file handle at any given point in time!\n"); + return MPI_ERR_REQUEST; + } + ret = mca_io_ompio_file_iwrite_at_all ( fh->f_fh, offset, buf, count, datatype, &fh->f_split_coll_req ); + fh->f_split_coll_in_use = true; return ret; } -int mca_io_ompio_file_write_all_begin (ompi_file_t *fh, - void *buf, - int count, - struct ompi_datatype_t *datatype) +int mca_io_ompio_file_write_at_all_end (ompi_file_t *fh, + void *buf, + ompi_status_public_t * status) { int ret = OMPI_SUCCESS; mca_io_ompio_data_t *data; data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = data->ompio_fh. - f_fcoll->fcoll_file_write_all_begin (&data->ompio_fh, - buf, - count, - datatype); - + ret = ompio_io_ompio_file_read_at_all_end ( &data->ompio_fh, buf, status ); return ret; } -int mca_io_ompio_file_write_all_end (ompi_file_t *fh, - void *buf, - ompi_status_public_t *status) +int ompio_io_ompio_file_write_at_all_end (mca_io_ompio_file_t *fh, + void *buf, + ompi_status_public_t * status) { int ret = OMPI_SUCCESS; - mca_io_ompio_data_t *data; + ret = ompi_request_wait ( &fh->f_split_coll_req, status ); - data = (mca_io_ompio_data_t *) fh->f_io_selected_data; - ret = data->ompio_fh. - f_fcoll->fcoll_file_write_all_end (&data->ompio_fh, - buf, - status); - + /* remove the flag again */ + fh->f_split_coll_in_use = false; return ret; }