From f2af8e94ff328837ef0d0b50bf193daf30940098 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Mon, 6 Jul 2015 10:39:09 -0500 Subject: [PATCH 1/5] - first cut on the io interface changes - add the C interfaces for the new non-blocking collective I/O functions of MPI 3.1 --- ompi/include/mpi.h.in | 17 ++++ ompi/mca/io/io.h | 25 ++++- ompi/mca/io/ompio/io_ompio_module.c | 4 + ompi/mca/io/romio314/src/io_romio314_module.c | 4 + ompi/mpi/c/Makefile.am | 4 + ompi/mpi/c/file_iread_all.c | 84 +++++++++++++++++ ompi/mpi/c/file_iread_at_all.c | 86 +++++++++++++++++ ompi/mpi/c/file_iwrite_all.c | 89 ++++++++++++++++++ ompi/mpi/c/file_iwrite_at_all.c | 92 +++++++++++++++++++ 9 files changed, 403 insertions(+), 2 deletions(-) create mode 100644 ompi/mpi/c/file_iread_all.c create mode 100644 ompi/mpi/c/file_iread_at_all.c create mode 100644 ompi/mpi/c/file_iwrite_all.c create mode 100644 ompi/mpi/c/file_iwrite_at_all.c diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index 2a6331fa0e..9b5b4a0f36 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -16,6 +16,7 @@ * Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2011-2013 INRIA. All rights reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -1390,6 +1391,10 @@ OMPI_DECLSPEC int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status); OMPI_DECLSPEC int MPI_File_read_all(MPI_File fh, void *buf, int count, @@ -1402,6 +1407,10 @@ OMPI_DECLSPEC int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence); OMPI_DECLSPEC int MPI_File_get_position(MPI_File fh, MPI_Offset *offset); OMPI_DECLSPEC int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, @@ -2082,6 +2091,10 @@ OMPI_DECLSPEC int PMPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status); OMPI_DECLSPEC int PMPI_File_read_all(MPI_File fh, void *buf, int count, @@ -2094,6 +2107,10 @@ OMPI_DECLSPEC int PMPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); +OMPI_DECLSPEC int PMPI_File_iwrite_all(MPI_File fh, const void *buf, int count, + MPI_Datatype datatype, MPI_Request *request); OMPI_DECLSPEC int PMPI_File_seek(MPI_File fh, MPI_Offset offset, int whence); OMPI_DECLSPEC int PMPI_File_get_position(MPI_File fh, MPI_Offset *offset); OMPI_DECLSPEC int PMPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, diff --git a/ompi/mca/io/io.h b/ompi/mca/io/io.h index 08cb1a38ee..2ab40d4460 100644 --- a/ompi/mca/io/io.h +++ b/ompi/mca/io/io.h @@ -13,6 +13,7 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -188,6 +189,15 @@ typedef int (*mca_io_base_module_file_iwrite_at_fn_t) int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iread_at_all_fn_t) + (struct ompi_file_t *fh, MPI_Offset offset, void *buf, + int count, struct ompi_datatype_t *datatype, + struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iwrite_at_all_fn_t) + (struct ompi_file_t *fh, MPI_Offset offset, void *buf, + int count, struct ompi_datatype_t *datatype, + struct ompi_request_t **request); + typedef int (*mca_io_base_module_file_read_fn_t) (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t * datatype, struct ompi_status_public_t *status); @@ -208,6 +218,13 @@ typedef int (*mca_io_base_module_file_iwrite_fn_t) (struct ompi_file_t *fh, void *buf, int count, struct ompi_datatype_t *datatype, struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iread_all_fn_t) + (struct ompi_file_t *fh, void *buf, int count, + struct ompi_datatype_t *datatype, struct ompi_request_t **request); +typedef int (*mca_io_base_module_file_iwrite_all_fn_t) + (struct ompi_file_t *fh, void *buf, int count, + struct ompi_datatype_t *datatype, struct ompi_request_t **request); + typedef int (*mca_io_base_module_file_seek_fn_t) (struct ompi_file_t *fh, MPI_Offset offset, int whence); typedef int (*mca_io_base_module_file_get_position_fn_t) @@ -301,8 +318,10 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_write_at_fn_t io_module_file_write_at; mca_io_base_module_file_write_at_all_fn_t io_module_file_write_at_all; - mca_io_base_module_file_iread_at_fn_t io_module_file_iread_at; - mca_io_base_module_file_iwrite_at_fn_t io_module_file_iwrite_at; + mca_io_base_module_file_iread_at_fn_t io_module_file_iread_at; + mca_io_base_module_file_iwrite_at_fn_t io_module_file_iwrite_at; + mca_io_base_module_file_iread_at_all_fn_t io_module_file_iread_at_all; + mca_io_base_module_file_iwrite_at_all_fn_t io_module_file_iwrite_at_all; mca_io_base_module_file_read_fn_t io_module_file_read; mca_io_base_module_file_read_all_fn_t io_module_file_read_all; @@ -311,6 +330,8 @@ struct mca_io_base_module_2_0_0_t { mca_io_base_module_file_iread_fn_t io_module_file_iread; mca_io_base_module_file_iwrite_fn_t io_module_file_iwrite; + mca_io_base_module_file_iread_all_fn_t io_module_file_iread_all; + mca_io_base_module_file_iwrite_all_fn_t io_module_file_iwrite_all; mca_io_base_module_file_seek_fn_t io_module_file_seek; mca_io_base_module_file_get_position_fn_t io_module_file_get_position; diff --git a/ompi/mca/io/ompio/io_ompio_module.c b/ompi/mca/io/ompio/io_ompio_module.c index 1b6b0f1b92..cbdaf2e0dd 100644 --- a/ompi/mca/io/ompio/io_ompio_module.c +++ b/ompi/mca/io/ompio/io_ompio_module.c @@ -49,6 +49,8 @@ mca_io_base_module_2_0_0_t mca_io_ompio_module = { mca_io_ompio_file_iread_at, mca_io_ompio_file_iwrite_at, + mca_io_ompio_file_iread_at_all, + mca_io_ompio_file_iwrite_at_all, /* non-indexed IO operations */ mca_io_ompio_file_read, @@ -58,6 +60,8 @@ mca_io_base_module_2_0_0_t mca_io_ompio_module = { mca_io_ompio_file_iread, mca_io_ompio_file_iwrite, + mca_io_ompio_file_iread_all, + mca_io_ompio_file_iwrite_all, mca_io_ompio_file_seek, mca_io_ompio_file_get_position, diff --git a/ompi/mca/io/romio314/src/io_romio314_module.c b/ompi/mca/io/romio314/src/io_romio314_module.c index cb46168ae4..3a40046cbd 100644 --- a/ompi/mca/io/romio314/src/io_romio314_module.c +++ b/ompi/mca/io/romio314/src/io_romio314_module.c @@ -59,6 +59,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = { mca_io_romio314_file_write_at_all, mca_io_romio314_file_iread_at, mca_io_romio314_file_iwrite_at, + NULL, /* iread_at_all */ + NULL, /* iwrite_at_all */ /* non-indexed IO operations */ mca_io_romio314_file_read, @@ -67,6 +69,8 @@ mca_io_base_module_2_0_0_t mca_io_romio314_module = { mca_io_romio314_file_write_all, mca_io_romio314_file_iread, mca_io_romio314_file_iwrite, + NULL, /* iread_all */ + NULL, /* iwrite_all */ mca_io_romio314_file_seek, mca_io_romio314_file_get_position, diff --git a/ompi/mpi/c/Makefile.am b/ompi/mpi/c/Makefile.am index d3e47a69d0..8d533a678f 100644 --- a/ompi/mpi/c/Makefile.am +++ b/ompi/mpi/c/Makefile.am @@ -406,10 +406,14 @@ libmpi_c_mpi_la_SOURCES += \ file_get_type_extent.c \ file_get_view.c \ file_iread_at.c \ + file_iread_at_all.c \ file_iread.c \ + file_iread_all.c \ file_iread_shared.c \ file_iwrite_at.c \ + file_iwrite_at_all.c \ file_iwrite.c \ + file_iwrite_all.c \ file_iwrite_shared.c \ file_open.c \ file_preallocate.c \ diff --git a/ompi/mpi/c/file_iread_all.c b/ompi/mpi/c/file_iread_all.c new file mode 100644 index 0000000000..76d0c7198e --- /dev/null +++ b/ompi/mpi/c/file_iread_all.c @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2008 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 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iread_all = PMPI_File_iread_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iread_all"; + + +int MPI_File_iread_all(MPI_File fh, void *buf, int count, + MPI_Datatype datatype, MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_RECV(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iread_all(fh, buf, count, datatype, request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} diff --git a/ompi/mpi/c/file_iread_at_all.c b/ompi/mpi/c/file_iread_at_all.c new file mode 100644 index 0000000000..8ec0adbbca --- /dev/null +++ b/ompi/mpi/c/file_iread_at_all.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2008 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 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iread_at_all = PMPI_File_iread_at_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iread_at_all"; + + +int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, + int count, MPI_Datatype datatype, MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_RECV(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iread_at_all(fh, offset, buf, count, datatype, + request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} diff --git a/ompi/mpi/c/file_iwrite_all.c b/ompi/mpi/c/file_iwrite_all.c new file mode 100644 index 0000000000..8022b28223 --- /dev/null +++ b/ompi/mpi/c/file_iwrite_all.c @@ -0,0 +1,89 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2008 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 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iwrite_all = PMPI_File_iwrite_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iwrite_all"; + + +int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, MPI_Datatype + datatype, MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_SEND(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + /* XXX -- CONST -- do not cast away const -- update mca/io */ + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iwrite_all(fh, (void *) buf, count, datatype, request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} diff --git a/ompi/mpi/c/file_iwrite_at_all.c b/ompi/mpi/c/file_iwrite_at_all.c new file mode 100644 index 0000000000..21fc0affee --- /dev/null +++ b/ompi/mpi/c/file_iwrite_at_all.c @@ -0,0 +1,92 @@ +/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ +/* + * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana + * University Research and Technology + * Corporation. All rights reserved. + * Copyright (c) 2004-2005 The University of Tennessee and The University + * of Tennessee Research Foundation. All rights + * reserved. + * Copyright (c) 2004-2008 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 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2013 Los Alamos National Security, LLC. All rights + * reserved. + * Copyright (c) 2015 University of Houston. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/c/bindings.h" +#include "ompi/runtime/params.h" +#include "ompi/errhandler/errhandler.h" +#include "ompi/datatype/ompi_datatype.h" +#include "ompi/file/file.h" +#include "ompi/mca/io/io.h" +#include "ompi/mca/io/base/io_base_request.h" +#include "ompi/memchecker.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES +#pragma weak MPI_File_iwrite_at_all = PMPI_File_iwrite_at_all +#endif + +#if OMPI_PROFILING_DEFINES +#include "ompi/mpi/c/profile/defines.h" +#endif + +static const char FUNC_NAME[] = "MPI_File_iwrite_at_all"; + + +int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, + int count, MPI_Datatype datatype, + MPI_Request *request) +{ + int rc; + + MEMCHECKER( + memchecker_datatype(datatype); + memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype); + ); + + if (MPI_PARAM_CHECK) { + rc = MPI_SUCCESS; + OMPI_ERR_INIT_FINALIZE(FUNC_NAME); + if (ompi_file_invalid(fh)) { + fh = MPI_FILE_NULL; + rc = MPI_ERR_FILE; + } else if (count < 0) { + rc = MPI_ERR_COUNT; + } else if (NULL == request) { + rc = MPI_ERR_REQUEST; + } else { + OMPI_CHECK_DATATYPE_FOR_SEND(rc, datatype, count); + } + OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME); + } + + OPAL_CR_ENTER_LIBRARY(); + + /* Call the back-end io component function */ + switch (fh->f_io_version) { + case MCA_IO_BASE_V_2_0_0: + /* XXX -- CONST -- do not cast away const -- update mca/io */ + rc = fh->f_io_selected_module.v2_0_0. + io_module_file_iwrite_at_all(fh, offset, (void *) buf, count, datatype, + request); + break; + + default: + rc = MPI_ERR_INTERN; + break; + } + + /* All done */ + + OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME); +} From 01f752a5041187a7000cd1f357e8accac1c4f01e Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 8 Jul 2015 10:50:37 -0500 Subject: [PATCH 2/5] make the c interface functions compile and work and start with the fortran interface functions. --- ompi/mpi/c/profile/Makefile.am | 4 ++++ ompi/mpi/c/profile/defines.h | 4 ++++ ompi/mpi/fortran/mpif-h/Makefile.am | 4 ++++ ompi/mpi/fortran/mpif-h/profile/defines.h | 4 ++++ ompi/mpi/fortran/mpif-h/prototypes_mpi.h | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/ompi/mpi/c/profile/Makefile.am b/ompi/mpi/c/profile/Makefile.am index 46a05da835..7275d17f35 100644 --- a/ompi/mpi/c/profile/Makefile.am +++ b/ompi/mpi/c/profile/Makefile.am @@ -391,9 +391,13 @@ nodist_libmpi_c_pmpi_la_SOURCES += \ pfile_get_view.c \ pfile_iread_at.c \ pfile_iread.c \ + pfile_iread_at_all.c \ + pfile_iread_all.c \ pfile_iread_shared.c \ pfile_iwrite_at.c \ pfile_iwrite.c \ + pfile_iwrite_at_all.c \ + pfile_iwrite_all.c \ pfile_iwrite_shared.c \ pfile_open.c \ pfile_preallocate.c \ diff --git a/ompi/mpi/c/profile/defines.h b/ompi/mpi/c/profile/defines.h index ef948d15b8..4837c880da 100644 --- a/ompi/mpi/c/profile/defines.h +++ b/ompi/mpi/c/profile/defines.h @@ -143,9 +143,13 @@ #define MPI_File_get_view PMPI_File_get_view #define MPI_File_iread_at PMPI_File_iread_at #define MPI_File_iread PMPI_File_iread +#define MPI_File_iread_at_all PMPI_File_iread_at_all +#define MPI_File_iread_all PMPI_File_iread_all #define MPI_File_iread_shared PMPI_File_iread_shared #define MPI_File_iwrite_at PMPI_File_iwrite_at #define MPI_File_iwrite PMPI_File_iwrite +#define MPI_File_iwrite_at_all PMPI_File_iwrite_at_all +#define MPI_File_iwrite_all PMPI_File_iwrite_all #define MPI_File_iwrite_shared PMPI_File_iwrite_shared #define MPI_File_open PMPI_File_open #define MPI_File_preallocate PMPI_File_preallocate diff --git a/ompi/mpi/fortran/mpif-h/Makefile.am b/ompi/mpi/fortran/mpif-h/Makefile.am index bd6abd8476..04355e2c18 100644 --- a/ompi/mpi/fortran/mpif-h/Makefile.am +++ b/ompi/mpi/fortran/mpif-h/Makefile.am @@ -450,9 +450,13 @@ libmpi_mpifh_la_SOURCES += \ file_get_view_f.c \ file_iread_at_f.c \ file_iread_f.c \ + file_iread_at_all_f.c \ + file_iread_all_f.c \ file_iread_shared_f.c \ file_iwrite_at_f.c \ file_iwrite_f.c \ + file_iwrite_at_all_f.c \ + file_iwrite_all_f.c \ file_iwrite_shared_f.c \ file_open_f.c \ file_preallocate_f.c \ diff --git a/ompi/mpi/fortran/mpif-h/profile/defines.h b/ompi/mpi/fortran/mpif-h/profile/defines.h index 1aee937b0f..255ba654f6 100644 --- a/ompi/mpi/fortran/mpif-h/profile/defines.h +++ b/ompi/mpi/fortran/mpif-h/profile/defines.h @@ -128,12 +128,16 @@ #define ompi_file_write_at_f pompi_file_write_at_f #define ompi_file_write_at_all_f pompi_file_write_at_all_f #define ompi_file_iread_at_f pompi_file_iread_at_f +#define ompi_file_iwrite_at_all_f pompi_file_iwrite_at_all_f +#define ompi_file_iread_at_all_f pompi_file_iread_at_all_f #define ompi_file_iwrite_at_f pompi_file_iwrite_at_f #define ompi_file_read_f pompi_file_read_f #define ompi_file_read_all_f pompi_file_read_all_f #define ompi_file_write_f pompi_file_write_f #define ompi_file_write_all_f pompi_file_write_all_f #define ompi_file_iread_f pompi_file_iread_f +#define ompi_file_iwrite_all_f pompi_file_iwrite_all_f +#define ompi_file_iread_all_f pompi_file_iread_all_f #define ompi_file_iwrite_f pompi_file_iwrite_f #define ompi_file_seek_f pompi_file_seek_f #define ompi_file_get_position_f pompi_file_get_position_f diff --git a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h index be68dd6fbf..1241e422e1 100644 --- a/ompi/mpi/fortran/mpif-h/prototypes_mpi.h +++ b/ompi/mpi/fortran/mpif-h/prototypes_mpi.h @@ -187,12 +187,16 @@ PN2(void, MPI_File_write_at, mpi_file_write_at, MPI_FILE_WRITE_AT, (MPI_Fint *fh PN2(void, MPI_File_write_at_all, mpi_file_write_at_all, MPI_FILE_WRITE_AT_ALL, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_iread_at, mpi_file_iread_at, MPI_FILE_IREAD_AT, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_iwrite_at, mpi_file_iwrite_at, MPI_FILE_IWRITE_AT, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iread_at_all, mpi_file_iread_at_all, MPI_FILE_IREAD_AT_ALL, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iwrite_at_all, mpi_file_iwrite_at_all, MPI_FILE_IWRITE_AT_ALL, (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_read, mpi_file_read, MPI_FILE_READ, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_read_all, mpi_file_read_all, MPI_FILE_READ_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_write, mpi_file_write, MPI_FILE_WRITE, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_write_all, mpi_file_write_all, MPI_FILE_WRITE_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *status, MPI_Fint *ierr)); PN2(void, MPI_File_iread, mpi_file_iread, MPI_FILE_IREAD, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_iwrite, mpi_file_iwrite, MPI_FILE_IWRITE, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iread_all, mpi_file_iread_all, MPI_FILE_IREAD_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); +PN2(void, MPI_File_iwrite_all, mpi_file_iwrite_all, MPI_FILE_IWRITE_ALL, (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr)); PN2(void, MPI_File_seek, mpi_file_seek, MPI_FILE_SEEK, (MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *whence, MPI_Fint *ierr)); PN2(void, MPI_File_get_position, mpi_file_get_position, MPI_FILE_GET_POSITION, (MPI_Fint *fh, MPI_Offset *offset, MPI_Fint *ierr)); PN2(void, MPI_File_get_byte_offset, mpi_file_get_byte_offset, MPI_FILE_GET_BYTE_OFFSET, (MPI_Fint *fh, MPI_Offset *offset, MPI_Offset *disp, MPI_Fint *ierr)); From 19994ff60d3d67feca34246ede6fa2da7b1e49d9 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 8 Jul 2015 12:19:49 -0500 Subject: [PATCH 3/5] add fortran interfaces to the new nb collective I/O functions --- ompi/mpi/fortran/mpif-h/file_iread_all_f.c | 84 ++++++++++++ ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c | 87 ++++++++++++ ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c | 83 ++++++++++++ .../mpi/fortran/mpif-h/file_iwrite_at_all_f.c | 86 ++++++++++++ ompi/mpi/fortran/use-mpi-f08/Makefile.am | 4 + .../use-mpi-f08/file_iread_all_f08.F90 | 25 ++++ .../use-mpi-f08/file_iread_at_all_f08.F90 | 27 ++++ .../use-mpi-f08/file_iwrite_all_f08.F90 | 26 ++++ .../use-mpi-f08/file_iwrite_at_all_f08.F90 | 27 ++++ .../mpi-ignore-tkr-file-interfaces.h.in | 124 ++++++++++++++++++ 10 files changed, 573 insertions(+) create mode 100644 ompi/mpi/fortran/mpif-h/file_iread_all_f.c create mode 100644 ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c create mode 100644 ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c create mode 100644 ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 create mode 100644 ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 diff --git a/ompi/mpi/fortran/mpif-h/file_iread_all_f.c b/ompi/mpi/fortran/mpif-h/file_iread_all_f.c new file mode 100644 index 0000000000..9ed3701362 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iread_all_f.c @@ -0,0 +1,84 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IREAD_ALL = ompi_file_iread_all_f +#pragma weak pmpi_file_iread_all = ompi_file_iread_all_f +#pragma weak pmpi_file_iread_all_ = ompi_file_iread_all_f +#pragma weak pmpi_file_iread_all__ = ompi_file_iread_all_f + +#pragma weak PMPI_File_iread_all_f = ompi_file_iread_all_f +#pragma weak PMPI_File_iread_all_f08 = ompi_file_iread_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IREAD_ALL, + pmpi_file_iread_all, + pmpi_file_iread_all_, + pmpi_file_iread_all__, + pompi_file_iread_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IREAD_ALL = ompi_file_iread_all_f +#pragma weak mpi_file_iread_all = ompi_file_iread_all_f +#pragma weak mpi_file_iread_all_ = ompi_file_iread_all_f +#pragma weak mpi_file_iread_all__ = ompi_file_iread_all_f + +#pragma weak MPI_File_iread_all_f = ompi_file_iread_all_f +#pragma weak MPI_File_iread_all_f08 = ompi_file_iread_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IREAD_ALL, + mpi_file_iread_all, + mpi_file_iread_all_, + mpi_file_iread_all__, + ompi_file_iread_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iread_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iread_all(c_fh, OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c b/ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c new file mode 100644 index 0000000000..17a8636385 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iread_at_all_f.c @@ -0,0 +1,87 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IREAD_AT_ALL = ompi_file_iread_at_all_f +#pragma weak pmpi_file_iread_at_all = ompi_file_iread_at_all_f +#pragma weak pmpi_file_iread_at_all_ = ompi_file_iread_at_all_f +#pragma weak pmpi_file_iread_at_all__ = ompi_file_iread_at_all_f + +#pragma weak PMPI_File_iread_at_all_f = ompi_file_iread_at_all_f +#pragma weak PMPI_File_iread_at_all_f08 = ompi_file_iread_at_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IREAD_AT_ALL, + pmpi_file_iread_at_all, + pmpi_file_iread_at_all_, + pmpi_file_iread_at_all__, + pompi_file_iread_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IREAD_AT_ALL = ompi_file_iread_at_all_f +#pragma weak mpi_file_iread_at_all = ompi_file_iread_at_all_f +#pragma weak mpi_file_iread_at_all_ = ompi_file_iread_at_all_f +#pragma weak mpi_file_iread_at_all__ = ompi_file_iread_at_all_f + +#pragma weak MPI_File_iread_at_all_f = ompi_file_iread_at_all_f +#pragma weak MPI_File_iread_at_all_f08 = ompi_file_iread_at_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER + OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IREAD_AT_ALL, + mpi_file_iread_at_all, + mpi_file_iread_at_all_, + mpi_file_iread_at_all__, + ompi_file_iread_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iread_at_all_f(MPI_Fint *fh, MPI_Offset *offset, + char *buf, MPI_Fint *count, + MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iread_at_all(c_fh, (MPI_Offset) *offset, + OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, + &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c b/ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c new file mode 100644 index 0000000000..cd515de163 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iwrite_all_f.c @@ -0,0 +1,83 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IWRITE_ALL = ompi_file_iwrite_all_f +#pragma weak pmpi_file_iwrite_all = ompi_file_iwrite_all_f +#pragma weak pmpi_file_iwrite_all_ = ompi_file_iwrite_all_f +#pragma weak pmpi_file_iwrite_all__ = ompi_file_iwrite_all_f + +#pragma weak PMPI_File_iwrite_all_f = ompi_file_iwrite_all_f +#pragma weak PMPI_File_iwrite_all_f08 = ompi_file_iwrite_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IWRITE_ALL, + pmpi_file_iwrite_all, + pmpi_file_iwrite_all_, + pmpi_file_iwrite_all__, + pompi_file_iwrite_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IWRITE_ALL = ompi_file_iwrite_all_f +#pragma weak mpi_file_iwrite_all = ompi_file_iwrite_all_f +#pragma weak mpi_file_iwrite_all_ = ompi_file_iwrite_all_f +#pragma weak mpi_file_iwrite_all__ = ompi_file_iwrite_all_f + +#pragma weak MPI_File_iwrite_all_f = ompi_file_iwrite_all_f +#pragma weak MPI_File_iwrite_all_f08 = ompi_file_iwrite_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IWRITE_ALL, + mpi_file_iwrite_all, + mpi_file_iwrite_all_, + mpi_file_iwrite_all__, + ompi_file_iwrite_all_f, + (MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iwrite_all_f(MPI_Fint *fh, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iwrite_all(c_fh, OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c b/ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c new file mode 100644 index 0000000000..d4a252f553 --- /dev/null +++ b/ompi/mpi/fortran/mpif-h/file_iwrite_at_all_f.c @@ -0,0 +1,86 @@ +/* + * 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) 2011-2012 Cisco Systems, Inc. All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * $HEADER$ + */ + +#include "ompi_config.h" + +#include "ompi/mpi/fortran/mpif-h/bindings.h" +#include "ompi/mpi/fortran/base/constants.h" + +#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER +#pragma weak PMPI_FILE_IWRITE_AT_ALL = ompi_file_iwrite_at_all_f +#pragma weak pmpi_file_iwrite_at_all = ompi_file_iwrite_at_all_f +#pragma weak pmpi_file_iwrite_at_all_ = ompi_file_iwrite_at_all_f +#pragma weak pmpi_file_iwrite_at_all__ = ompi_file_iwrite_at_all_f + +#pragma weak PMPI_File_iwrite_at_all_f = ompi_file_iwrite_at_all_f +#pragma weak PMPI_File_iwrite_at_all_f08 = ompi_file_iwrite_at_all_f +#elif OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (PMPI_FILE_IWRITE_AT_ALL, + pmpi_file_iwrite_at_all, + pmpi_file_iwrite_at_all_, + pmpi_file_iwrite_at_all__, + pompi_file_iwrite_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + +#if OPAL_HAVE_WEAK_SYMBOLS +#pragma weak MPI_FILE_IWRITE_AT_ALL = ompi_file_iwrite_at_all_f +#pragma weak mpi_file_iwrite_at_all = ompi_file_iwrite_at_all_f +#pragma weak mpi_file_iwrite_at_all_ = ompi_file_iwrite_at_all_f +#pragma weak mpi_file_iwrite_at_all__ = ompi_file_iwrite_at_all_f + +#pragma weak MPI_File_iwrite_at_all_f = ompi_file_iwrite_at_all_f +#pragma weak MPI_File_iwrite_at_all_f08 = ompi_file_iwrite_at_all_f +#endif + +#if ! OPAL_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER +OMPI_GENERATE_F77_BINDINGS (MPI_FILE_IWRITE_AT_ALL, + mpi_file_iwrite_at_all, + mpi_file_iwrite_at_all_, + mpi_file_iwrite_at_all__, + ompi_file_iwrite_at_all_f, + (MPI_Fint *fh, MPI_Offset *offset, char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *request, MPI_Fint *ierr), + (fh, offset, buf, count, datatype, request, ierr) ) +#endif + + +#if OMPI_PROFILE_LAYER && ! OPAL_HAVE_WEAK_SYMBOLS +#include "ompi/mpi/fortran/mpif-h/profile/defines.h" +#endif + +void ompi_file_iwrite_at_all_f(MPI_Fint *fh, MPI_Offset *offset, char *buf, + MPI_Fint *count, MPI_Fint *datatype, + MPI_Fint *request, MPI_Fint *ierr) +{ + int c_ierr; + MPI_File c_fh = MPI_File_f2c(*fh); + MPI_Datatype c_type = MPI_Type_f2c(*datatype); + MPI_Request c_request; + + c_ierr = MPI_File_iwrite_at_all(c_fh, (MPI_Offset) *offset, + OMPI_F2C_BOTTOM(buf), + OMPI_FINT_2_INT(*count), + c_type, &c_request); + if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr); + + if (MPI_SUCCESS == c_ierr) { + *request = MPI_Request_c2f(c_request); + } +} diff --git a/ompi/mpi/fortran/use-mpi-f08/Makefile.am b/ompi/mpi/fortran/use-mpi-f08/Makefile.am index 8a894cdd00..de0fb10e9b 100644 --- a/ompi/mpi/fortran/use-mpi-f08/Makefile.am +++ b/ompi/mpi/fortran/use-mpi-f08/Makefile.am @@ -396,9 +396,13 @@ mpi_api_files += \ file_get_view_f08.F90 \ file_iread_at_f08.F90 \ file_iread_f08.F90 \ + file_iread_at_all_f08.F90 \ + file_iread_all_f08.F90 \ file_iread_shared_f08.F90 \ file_iwrite_at_f08.F90 \ file_iwrite_f08.F90 \ + file_iwrite_at_all_f08.F90 \ + file_iwrite_all_f08.F90 \ file_iwrite_shared_f08.F90 \ file_open_f08.F90 \ file_preallocate_f08.F90 \ diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 new file mode 100644 index 0000000000..f280e911c3 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_all_f08.F90 @@ -0,0 +1,25 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iread_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + use :: mpi_f08, only : ompi_file_iread_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iread_all_f(fh%MPI_VAL,buf,count,datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iread_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 new file mode 100644 index 0000000000..9cc7f317df --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iread_at_all_f08.F90 @@ -0,0 +1,27 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + use :: mpi_f08, only : ompi_file_iread_at_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iread_at_all_f(fh%MPI_VAL,offset,buf,count,& + datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iread_at_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 new file mode 100644 index 0000000000..c36c68abf1 --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_all_f08.F90 @@ -0,0 +1,26 @@ +! -*- f90 -*- +! +! Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + use :: mpi_f08, only : ompi_file_iwrite_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iwrite_all_f(fh%MPI_VAL,buf,count,& + datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iwrite_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 new file mode 100644 index 0000000000..315b466ffe --- /dev/null +++ b/ompi/mpi/fortran/use-mpi-f08/file_iwrite_at_all_f08.F90 @@ -0,0 +1,27 @@ +! -*- f90 -*- +! +! Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved. +! Copyright (c) 2009-2012 Los Alamos National Security, LLC. +! All Rights reserved. +! $COPYRIGHT$ + +#include "ompi/mpi/fortran/configure-fortran-output.h" + +subroutine MPI_File_iwrite_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + use :: mpi_f08, only : ompi_file_iwrite_at_all_f + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror + integer :: c_ierror + + call ompi_file_iwrite_at_all_f(fh%MPI_VAL,offset,buf,count,& + datatype%MPI_VAL,request%MPI_VAL,c_ierror) + if (present(ierror)) ierror = c_ierror + +end subroutine MPI_File_iwrite_at_all_f08 diff --git a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in index 09b15caa20..bc5d667bd4 100644 --- a/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in +++ b/ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h.in @@ -377,6 +377,35 @@ end subroutine PMPI_File_iread end interface +interface MPI_File_iread_all + +subroutine MPI_File_iread_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iread_all + +end interface + +interface PMPI_File_iread_all + +subroutine PMPI_File_iread_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iread_all + +end interface interface MPI_File_iread_at @@ -412,6 +441,39 @@ end subroutine PMPI_File_iread_at end interface +interface MPI_File_iread_at_all + +subroutine MPI_File_iread_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iread_at_all + +end interface + +interface PMPI_File_iread_at_all + +subroutine PMPI_File_iread_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@ :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iread_at_all + +end interface interface MPI_File_iread_shared @@ -474,6 +536,35 @@ end subroutine PMPI_File_iwrite end interface +interface MPI_File_iwrite_all + +subroutine MPI_File_iwrite_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iwrite_all + +end interface + +interface PMPI_File_iwrite_all + +subroutine PMPI_File_iwrite_all(fh, buf, count, datatype, request& + , ierror) + integer, intent(in) :: fh + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iwrite_all + +end interface interface MPI_File_iwrite_at @@ -509,6 +600,39 @@ end subroutine PMPI_File_iwrite_at end interface +interface MPI_File_iwrite_at_all + +subroutine MPI_File_iwrite_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine MPI_File_iwrite_at_all + +end interface + +interface PMPI_File_iwrite_at_all + +subroutine PMPI_File_iwrite_at_all(fh, offset, buf, count, datatype, & + request, ierror) + include 'mpif-config.h' + integer, intent(in) :: fh + integer(kind=MPI_OFFSET_KIND), intent(in) :: offset + @OMPI_FORTRAN_IGNORE_TKR_PREDECL@ buf + @OMPI_FORTRAN_IGNORE_TKR_TYPE@, intent(in) :: buf + integer, intent(in) :: count + integer, intent(in) :: datatype + integer, intent(out) :: request + integer, intent(out) :: ierror +end subroutine PMPI_File_iwrite_at_all + +end interface interface MPI_File_iwrite_shared From 601e5efca8cae2fa61618c866b7119bfc797df46 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Wed, 8 Jul 2015 13:27:05 -0500 Subject: [PATCH 4/5] add the manpages for the new MPI-3.1 non-blocking collective I/O operations. --- ompi/mpi/man/man3/MPI_File_iread_all.3in | 86 ++++++++++++++ ompi/mpi/man/man3/MPI_File_iread_at_all.3in | 112 ++++++++++++++++++ ompi/mpi/man/man3/MPI_File_iwrite_all.3in | 91 +++++++++++++++ ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in | 114 +++++++++++++++++++ ompi/mpi/man/man3/Makefile.extra | 4 + 5 files changed, 407 insertions(+) create mode 100644 ompi/mpi/man/man3/MPI_File_iread_all.3in create mode 100644 ompi/mpi/man/man3/MPI_File_iread_at_all.3in create mode 100644 ompi/mpi/man/man3/MPI_File_iwrite_all.3in create mode 100644 ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in diff --git a/ompi/mpi/man/man3/MPI_File_iread_all.3in b/ompi/mpi/man/man3/MPI_File_iread_all.3in new file mode 100644 index 0000000000..79df566711 --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iread_all.3in @@ -0,0 +1,86 @@ +.\" -*- nroff -*- +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iread_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iread_all\fP \- Reads a file starting at the location specified by the individual file pointer (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iread_all(MPI_File \fIfh\fP, void \fI*buf\fP, int \fIcount\fP, + MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax +.nf + INCLUDE 'mpif.h' + MPI_FILE_IREAD_ALL(\fIFH\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP,\fI IERROR\fP) + BUF(*) + INTEGER FH, COUNT, DATATYPE, REQUEST, IERROR + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iread(void* \fIbuf\fP, int \fIcount\fP, + const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT/OUTPUT PARAMETER +.ft R +.TP 1i +fh +File handle (handle). + +.SH INPUT PARAMETERS +.ft R +.TP 1i +count +Number of elements in the buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETERS +.ft R +.TP 1i +buf +Initial address of buffer (choice). +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iread_all is a nonblocking version of MPI_File_read_all. It attempts to read from the file associated with +.I fh +at the current individual file pointer position maintained by the system in which a total number of +.I count +data items having +.I datatype +type are read into the user's buffer +.I buf. +The data is taken out of those parts of the +file specified by the current view. MPI_File_iread_all stores the +number of data-type elements actually read in +.I status. +All other fields of +.I status +are undefined. It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was opened. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/MPI_File_iread_at_all.3in b/ompi/mpi/man/man3/MPI_File_iread_at_all.3in new file mode 100644 index 0000000000..0a6891e7b7 --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iread_at_all.3in @@ -0,0 +1,112 @@ +.\" -*- nroff -*- +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iread_at_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iread_at_all\fP \- Reads a file at an explicitly specified offset (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iread_at_all(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, + MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax (see FORTRAN 77 NOTES) +.nf + INCLUDE 'mpif.h' + MPI_FILE_IREAD_AT_ALL(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP, \fIIERROR\fP) + \fIBUF\fP(*) + INTEGER \fIFH, COUNT, DATATYPE, REQUEST, IERROR\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iread_at(MPI::Offset \fIoffset\fP, void* \fIbuf\fP, + int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT PARAMETERS +.ft R +.TP 1i +fh +File handle (handle). +.ft R +.TP 1i +offset +File offset (integer). +.ft R +.TP 1i +count +Number of elements in the buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETERS +.ft R +.TP 1i +buf +Initial address of the buffer (choice). +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iread_at_all is the nonblocking version of MPI_File_read_at_all. + +MPI_File_iread_at_all is a nonblocking routine that attempts to read from the file associated with +.I fh +at the +.I offset +position a total number of +.I count +data items having +.I datatype +type into the user's buffer +.I buf. +The +.I offset +is in etype units relative to the current view. That is, holes are not counted +when locating an offset. The data is taken out of those parts of the +file specified by the current view. MPI_File_iread_at_all stores the +number of +.I datatype +elements actually read in +.I status. +All other fields of +.I status +are undefined. + +.SH FORTRAN 77 NOTES +.ft R +The MPI standard prescribes portable Fortran syntax for +the \fIOFFSET\fP argument only for Fortran 90. Sun FORTRAN 77 +users may use the non-portable syntax +.sp +.nf + INTEGER*MPI_OFFSET_KIND \fIOFFSET\fP +.fi +.sp +where MPI_OFFSET_KIND is a constant defined in mpif.h +and gives the length of the declared integer in bytes. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_all.3in b/ompi/mpi/man/man3/MPI_File_iwrite_all.3in new file mode 100644 index 0000000000..c5310cea34 --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iwrite_all.3in @@ -0,0 +1,91 @@ +.\" -*- nroff -*- +.\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved. +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iwrite_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iwrite_all\fP \- Writes a file starting at the location specified by the individual file pointer (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iwrite_all(MPI_File \fIfh\fP, const void \fI*buf\fP, int \fIcount\fP, + MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax +.nf + INCLUDE 'mpif.h' + MPI_FILE_IWRITE_ALL(\fIFH\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP,\fI IERROR\fP) + BUF(*) + INTEGER FH, COUNT, DATATYPE, REQUEST, IERROR + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iwrite(const void* \fIbuf\fP, int \fIcount\fP, + const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT/OUTPUT PARAMETER +.ft R +.TP 1i +fh +File handle (handle). + +.SH INPUT PARAMETERS +.ft R +.TP 1i +buf +Initial address of buffer (choice). +.ft R +.TP 1i +count +Number of elements in buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETER +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iwrite_all is a nonblocking version of the MPI_File_write_all interface. It attempts to write into the file associated with +.I fh +(at the current individual file pointer position maintained by the system) a total number of +.I count +data items having +.I datatype +type from the user's buffer +.I buf. +The data is written into those parts of the +file specified by the current view. MPI_File_iwrite_all stores the +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status +are undefined. +.sp +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in b/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in new file mode 100644 index 0000000000..4fc63814f3 --- /dev/null +++ b/ompi/mpi/man/man3/MPI_File_iwrite_at_all.3in @@ -0,0 +1,114 @@ +.\" -*- nroff -*- +.\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved. +.\" Copyright 2010 Cisco Systems, Inc. All rights reserved. +.\" Copyright 2006-2008 Sun Microsystems, Inc. +.\" Copyright (c) 1996 Thinking Machines Corporation +.\" $COPYRIGHT$ +.TH MPI_File_iwrite_at_all 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#" +.SH NAME +\fBMPI_File_iwrite_at_all\fP \- Writes a file at an explicitly specified offset (nonblocking, collective). + +.SH SYNTAX +.ft R +.nf +C Syntax + #include + int MPI_File_iwrite_at_all(MPI_File \fIfh\fP, MPI_Offset \fIoffset\fP, + const void \fI*buf\fP, int \fIcount\fP, MPI_Datatype \fIdatatype\fP, MPI_Request \fI*request\fP) + +.fi +.SH Fortran Syntax (see FORTRAN 77 NOTES) +.nf + INCLUDE 'mpif.h' + MPI_FILE_IWRITE_AT_ALL(\fIFH\fP, \fIOFFSET\fP, \fIBUF\fP, \fICOUNT\fP, \fIDATATYPE\fP, \fIREQUEST\fP, \fIIERROR\fP) + \fIBUF\fP(*) + INTEGER \fIFH, COUNT, DATATYPE, REQUEST, IERROR\fP + INTEGER(KIND=MPI_OFFSET_KIND) \fIOFFSET\fP + +.fi +.SH C++ Syntax +.nf +#include +MPI::Request MPI::File::Iwrite_at(MPI::Offset \fIoffset\fP, const void* \fIbuf\fP, + int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP) + +.fi +.SH INPUT/OUTPUT PARAMETER +.ft R +.TP 1i +fh +File handle (handle). + +.SH INPUT PARAMETERS +.ft R +.TP 1i +offset +File offset (integer). +.ft R +.TP 1i +buf +Initial address of buffer (choice). +.ft R +.TP 1i +count +Number of elements in buffer (integer). +.ft R +.TP 1i +datatype +Data type of each buffer element (handle). + +.SH OUTPUT PARAMETERS +.ft R +.TP 1i +request +Request object (handle). +.TP 1i +IERROR +Fortran only: Error status (integer). + +.SH DESCRIPTION +.ft R +MPI_File_iwrite_at_all is a nonblocking version of MPI_File_write_at_all. It attempts to write into the file associated with +.I fh +(at the +.I offset +position) a total number of +.I count +data items having +.I datatype +type from the user's buffer +.I buf. +The offset is in +.I etype +units relative to the current view. That is, holes are not counted +when locating an offset. The data is written into those parts of the +file specified by the current view. MPI_File_iwrite_at_all stores the +number of +.I datatype +elements actually written in +.I status. +All other fields of +.I status +are undefined. The request structure can be passed to MPI_Wait or MPI_Test, which will return a status with the number of bytes actually accessed. +.sp +It is erroneous to call this function if MPI_MODE_SEQUENTIAL mode was specified when the file was open. + +.SH FORTRAN 77 NOTES +.ft R +The MPI standard prescribes portable Fortran syntax for +the \fIOFFSET\fP argument only for Fortran 90. FORTRAN 77 +users may use the non-portable syntax +.sp +.nf + INTEGER*MPI_OFFSET_KIND \fIOFFSET\fP +.fi +.sp +where MPI_OFFSET_KIND is a constant defined in mpif.h +and gives the length of the declared integer in bytes. + +.SH ERRORS +Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI::Exception object. +.sp +Before the error value is returned, the current MPI error handler is +called. For MPI I/O function errors, the default error handler is set to MPI_ERRORS_RETURN. The error handler may be changed with MPI_File_set_errhandler; the predefined error handler MPI_ERRORS_ARE_FATAL may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error. + diff --git a/ompi/mpi/man/man3/Makefile.extra b/ompi/mpi/man/man3/Makefile.extra index c15e674777..a6152f7e8e 100644 --- a/ompi/mpi/man/man3/Makefile.extra +++ b/ompi/mpi/man/man3/Makefile.extra @@ -126,9 +126,13 @@ mpi_api_man_pages = \ mpi/man/man3/MPI_File_get_view.3 \ mpi/man/man3/MPI_File_iread.3 \ mpi/man/man3/MPI_File_iread_at.3 \ + mpi/man/man3/MPI_File_iread_all.3 \ + mpi/man/man3/MPI_File_iread_at_all.3 \ mpi/man/man3/MPI_File_iread_shared.3 \ mpi/man/man3/MPI_File_iwrite.3 \ mpi/man/man3/MPI_File_iwrite_at.3 \ + mpi/man/man3/MPI_File_iwrite_all.3 \ + mpi/man/man3/MPI_File_iwrite_at_all.3 \ mpi/man/man3/MPI_File_iwrite_shared.3 \ mpi/man/man3/MPI_File_open.3 \ mpi/man/man3/MPI_File_preallocate.3 \ From 95c144c4b6f2346f534a739cd06ba02fb7d4c915 Mon Sep 17 00:00:00 2001 From: Edgar Gabriel Date: Thu, 9 Jul 2015 10:54:44 -0500 Subject: [PATCH 5/5] make the f08 interface actually compile. --- .../use-mpi-f08/mpi-f-interfaces-bind.h | 48 ++++++++++++ .../use-mpi-f08/mpi-f08-interfaces.F90 | 74 +++++++++++++++++++ .../use-mpi-f08/pmpi-f-interfaces-bind.h | 48 ++++++++++++ .../use-mpi-f08/pmpi-f08-interfaces.F90 | 74 +++++++++++++++++++ 4 files changed, 244 insertions(+) diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h index 17537d803a..d1a155b858 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f-interfaces-bind.h @@ -2750,6 +2750,30 @@ subroutine ompi_file_iread_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_file_iread_at_f +subroutine ompi_file_iread_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iread_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iread_all_f + +subroutine ompi_file_iread_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iread_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iread_at_all_f + subroutine ompi_file_iread_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="ompi_file_iread_shared_f") implicit none @@ -2785,6 +2809,30 @@ subroutine ompi_file_iwrite_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine ompi_file_iwrite_at_f +subroutine ompi_file_iwrite_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iwrite_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iwrite_all_f + +subroutine ompi_file_iwrite_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="ompi_file_iwrite_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine ompi_file_iwrite_at_all_f + subroutine ompi_file_iwrite_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="ompi_file_iwrite_shared_f") implicit none diff --git a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 index d843838eb7..edb15b72ef 100644 --- a/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/mpi-f08-interfaces.F90 @@ -3697,6 +3697,43 @@ subroutine MPI_File_iread_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine MPI_File_iread_at_f08 end interface MPI_File_iread_at +interface MPI_File_iread_all +subroutine MPI_File_iread_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iread_all_f08 +end interface MPI_File_iread_all + +interface MPI_File_iread_at_all +subroutine MPI_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iread_at_all_f08 +end interface MPI_File_iread_at_all + interface MPI_File_iread_shared subroutine MPI_File_iread_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request @@ -3752,6 +3789,43 @@ subroutine MPI_File_iwrite_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine MPI_File_iwrite_at_f08 end interface MPI_File_iwrite_at +interface MPI_File_iwrite_all +subroutine MPI_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iwrite_all_f08 +end interface MPI_File_iwrite_all + +interface MPI_File_iwrite_at_all +subroutine MPI_File_iwrite_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine MPI_File_iwrite_at_all_f08 +end interface MPI_File_iwrite_at_all + interface MPI_File_iwrite_shared subroutine MPI_File_iwrite_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request diff --git a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h index 643da3d032..b3e9c34369 100644 --- a/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h +++ b/ompi/mpi/fortran/use-mpi-f08/pmpi-f-interfaces-bind.h @@ -2537,6 +2537,30 @@ subroutine pompi_file_iread_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine pompi_file_iread_at_f +subroutine pompi_file_iread_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iread_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iread_all_f + +subroutine pompi_file_iread_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iread_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iread_at_all_f + subroutine pompi_file_iread_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="pompi_file_iread_shared_f") implicit none @@ -2572,6 +2596,30 @@ subroutine pompi_file_iwrite_at_f(fh,offset,buf,count,datatype,request,ierror) & INTEGER, INTENT(OUT) :: ierror end subroutine pompi_file_iwrite_at_f +subroutine pompi_file_iwrite_all_f(fh,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iwrite_all_f") + implicit none + INTEGER, INTENT(IN) :: fh + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iwrite_all_f + +subroutine pompi_file_iwrite_at_all_f(fh,offset,buf,count,datatype,request,ierror) & + BIND(C, name="pompi_file_iwrite_at_all_f") + use :: mpi_f08_types, only : MPI_OFFSET_KIND + implicit none + INTEGER, INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) :: buf + INTEGER, INTENT(IN) :: count + INTEGER, INTENT(IN) :: datatype + INTEGER, INTENT(OUT) :: request + INTEGER, INTENT(OUT) :: ierror +end subroutine pompi_file_iwrite_at_all_f + subroutine pompi_file_iwrite_shared_f(fh,buf,count,datatype,request,ierror) & BIND(C, name="pompi_file_iwrite_shared_f") implicit none diff --git a/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 b/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 index 8e478347ec..a0a62996df 100644 --- a/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 +++ b/ompi/mpi/fortran/use-mpi-f08/pmpi-f08-interfaces.F90 @@ -3594,6 +3594,43 @@ subroutine PMPI_File_iread_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine PMPI_File_iread_at_f08 end interface PMPI_File_iread_at +interface PMPI_File_iread_all +subroutine PMPI_File_iread_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iread_all_f08 +end interface PMPI_File_iread_all + +interface PMPI_File_iread_at_all +subroutine PMPI_File_iread_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iread_at_all_f08 +end interface PMPI_File_iread_at_all + interface PMPI_File_iread_shared subroutine PMPI_File_iread_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request @@ -3649,6 +3686,43 @@ subroutine PMPI_File_iwrite_at_f08(fh,offset,buf,count,datatype,request,ierror) end subroutine PMPI_File_iwrite_at_f08 end interface PMPI_File_iwrite_at +interface PMPI_File_iwrite_all +subroutine PMPI_File_iwrite_all_f08(fh,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iwrite_all_f08 +end interface PMPI_File_iwrite_all + +interface PMPI_File_iwrite_at_all +subroutine PMPI_File_iwrite_at_all_f08(fh,offset,buf,count,datatype,request,ierror) + use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request, MPI_OFFSET_KIND + implicit none + TYPE(MPI_File), INTENT(IN) :: fh + INTEGER(MPI_OFFSET_KIND), INTENT(IN) :: offset + !DEC$ ATTRIBUTES NO_ARG_CHECK :: buf + !GCC$ ATTRIBUTES NO_ARG_CHECK :: buf + !$PRAGMA IGNORE_TKR buf + !DIR$ IGNORE_TKR buf + !IBM* IGNORE_TKR buf + OMPI_FORTRAN_IGNORE_TKR_TYPE, INTENT(IN) OMPI_ASYNCHRONOUS :: buf + INTEGER, INTENT(IN) :: count + TYPE(MPI_Datatype), INTENT(IN) :: datatype + TYPE(MPI_Request), INTENT(OUT) :: request + INTEGER, OPTIONAL, INTENT(OUT) :: ierror +end subroutine PMPI_File_iwrite_at_all_f08 +end interface PMPI_File_iwrite_at_all + interface PMPI_File_iwrite_shared subroutine PMPI_File_iwrite_shared_f08(fh,buf,count,datatype,request,ierror) use :: mpi_f08_types, only : MPI_File, MPI_Datatype, MPI_Request