From bc97a331832ecba8ea8851ca0ce48fa3d8116736 Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Fri, 11 Jun 2021 16:17:07 -0600 Subject: [PATCH] sessions: remove MPI_File_open_from_group this didn't make it into the MPI 4.0 standard related to https://github.com/hpc/ompi/issues/52 Signed-off-by: Howard Pritchard --- ompi/include/mpi.h.in | 4 - ompi/mpi/c/Makefile.am | 1 - ompi/mpi/c/file_open_from_group.c | 126 ------------------------------ ompi/mpi/c/profile/Makefile.am | 1 - 4 files changed, 132 deletions(-) delete mode 100644 ompi/mpi/c/file_open_from_group.c diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index 94799970ebd..99d4ada681e 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -1498,8 +1498,6 @@ OMPI_DECLSPEC int MPI_File_set_errhandler( MPI_File file, MPI_Errhandler errhan OMPI_DECLSPEC int MPI_File_get_errhandler( MPI_File file, MPI_Errhandler *errhandler); OMPI_DECLSPEC int MPI_File_open(MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh); -OMPI_DECLSPEC int MPI_File_open_from_group (MPI_Group group, const char *tag, MPI_Errhandler errhandler, - const char *filename, int amode, MPI_Info info, MPI_File *fh); OMPI_DECLSPEC int MPI_File_close(MPI_File *fh); OMPI_DECLSPEC int MPI_File_delete(const char *filename, MPI_Info info); OMPI_DECLSPEC int MPI_File_set_size(MPI_File fh, MPI_Offset size); @@ -2223,8 +2221,6 @@ OMPI_DECLSPEC int PMPI_File_set_errhandler( MPI_File file, MPI_Errhandler errha OMPI_DECLSPEC int PMPI_File_get_errhandler( MPI_File file, MPI_Errhandler *errhandler); OMPI_DECLSPEC int PMPI_File_open(MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh); -OMPI_DECLSPEC int PMPI_File_open_from_group (MPI_Group group, const char *tag, MPI_Errhandler errhandler, - const char *filename, int amode, MPI_Info info, MPI_File *fh); OMPI_DECLSPEC int PMPI_File_close(MPI_File *fh); OMPI_DECLSPEC int PMPI_File_delete(const char *filename, MPI_Info info); OMPI_DECLSPEC int PMPI_File_set_size(MPI_File fh, MPI_Offset size); diff --git a/ompi/mpi/c/Makefile.am b/ompi/mpi/c/Makefile.am index 3b8fe46a1ae..610b080fe43 100644 --- a/ompi/mpi/c/Makefile.am +++ b/ompi/mpi/c/Makefile.am @@ -182,7 +182,6 @@ libmpi_c_mpi_la_SOURCES = \ file_iwrite_all.c \ file_iwrite_shared.c \ file_open.c \ - file_open_from_group.c \ file_preallocate.c \ file_read_all_begin.c \ file_read_all.c \ diff --git a/ompi/mpi/c/file_open_from_group.c b/ompi/mpi/c/file_open_from_group.c deleted file mode 100644 index b6949b098df..00000000000 --- a/ompi/mpi/c/file_open_from_group.c +++ /dev/null @@ -1,126 +0,0 @@ -/* -*- 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) 2013 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2013 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. - * Copyright (c) 2016 University of Houston. All rights reserved. - * Copyright (c) 2017 IBM Corporation. All rights reserved. - * Copyright (c) 2018 Triad National Security, LLC. 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/communicator/communicator.h" -#include "ompi/errhandler/errhandler.h" -#include "ompi/info/info.h" -#include "ompi/file/file.h" -#include "ompi/mca/io/io.h" -#include "ompi/mca/io/base/base.h" -#include "ompi/memchecker.h" - - -extern opal_mutex_t ompi_mpi_file_bootstrap_mutex; - -#if OMPI_BUILD_MPI_PROFILING -#if OPAL_HAVE_WEAK_SYMBOLS -#pragma weak MPI_File_open_from_group = PMPI_File_open_from_group -#endif -#define MPI_File_open_from_group PMPI_File_open_from_group -#endif - -static const char FUNC_NAME[] = "MPI_File_open_from_group"; - - -int MPI_File_open_from_group (MPI_Group group, const char *tag, MPI_Errhandler errhandler, - const char *filename, int amode, MPI_Info info, MPI_File *fh) -{ - ompi_communicator_t *comm; - int rc; - - if (MPI_PARAM_CHECK) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - if (NULL == info || ompi_info_is_freed(info)) { - return ompi_errhandler_invoke (errhandler, MPI_FILE_NULL, errhandler->eh_mpi_object_type, - MPI_ERR_INFO, FUNC_NAME); - } - if (NULL == group) { - return ompi_errhandler_invoke (errhandler, MPI_FILE_NULL, errhandler->eh_mpi_object_type, - MPI_ERR_GROUP, FUNC_NAME); - } - if (NULL == tag) { - return ompi_errhandler_invoke (errhandler, MPI_FILE_NULL, errhandler->eh_mpi_object_type, - MPI_ERR_TAG, FUNC_NAME); - } - } - - /* Note that MPI-2:9.7 (p265 in the ps; p261 in the pdf) says that - errors in MPI_FILE_OPEN_FROM_GROUP (before the file handle is created) - should invoke the default error handler on MPI_FILE_NULL. - Hence, if we get a file handle out of ompi_file_open(), invoke - the error handler on that. If not, invoke the error handler on - MPI_FILE_NULL. */ - - /* The io framework is only initialized lazily. If it hasn't - already been initialized, do so now (note that MPI_FILE_OPEN_FROM_GROUP - and MPI_FILE_DELETE are the only two places that it will be - initialized). */ - - /* For multi-threaded scenarios, initializing the file i/o - framework and mca infrastructure needs to be protected - by a mutex, similarly to the other frameworks in - ompi/runtime/ompi_mpi_init.c - */ - - /* NTH: until we have support for groups down in the io framework just do the - * file open on a temporary communicator. */ - rc = ompi_comm_create_from_group (group, tag, &info->super, MPI_ERRORS_RETURN, &comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS == rc)) { - return ompi_errhandler_invoke (errhandler, MPI_FILE_NULL, errhandler->eh_mpi_object_type, - rc, FUNC_NAME); - } - - opal_mutex_lock(&ompi_mpi_file_bootstrap_mutex); - rc = mca_base_framework_open(&ompi_io_base_framework, 0); - opal_mutex_unlock(&ompi_mpi_file_bootstrap_mutex); - if (OMPI_SUCCESS != rc) { - return ompi_errhandler_invoke (errhandler, MPI_FILE_NULL, errhandler->eh_mpi_object_type, - rc, FUNC_NAME); - } - - /* Create an empty MPI_File handle */ - - *fh = MPI_FILE_NULL; - rc = ompi_file_open(comm, filename, amode, &(info->super), fh); - - /* release the temporary communicator */ - ompi_comm_free (&comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc)) { - return ompi_errhandler_invoke (errhandler, MPI_FILE_NULL, errhandler->eh_mpi_object_type, - rc, FUNC_NAME); - } - - /* Creating the file handle also selects a component to use, - creates a module, and calls file_open() on the module. So - we're good to go. */ - return MPI_SUCCESS; -} diff --git a/ompi/mpi/c/profile/Makefile.am b/ompi/mpi/c/profile/Makefile.am index 9a044ae058f..76c2aeacbc3 100644 --- a/ompi/mpi/c/profile/Makefile.am +++ b/ompi/mpi/c/profile/Makefile.am @@ -162,7 +162,6 @@ nodist_libmpi_c_pmpi_la_SOURCES = \ pfile_iwrite_all.c \ pfile_iwrite_shared.c \ pfile_open.c \ - pfile_open_from_group.c \ pfile_preallocate.c \ pfile_read_all_begin.c \ pfile_read_all.c \