From 0d2aa87a7a34d67342884c3a2801074527712d1c Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Mon, 14 Jun 2021 16:54:25 -0600 Subject: [PATCH] sessions: remove win_allocate_shared_from_group not part of the MPI 4 standard so removing related to https://github.com/hpc/ompi/issues/54 Signed-off-by: Howard Pritchard --- ompi/include/mpi.h.in | 6 -- ompi/mpi/c/win_allocate_shared_from_group.c | 80 --------------------- ompi/win/win.c | 20 ------ ompi/win/win.h | 3 - 4 files changed, 109 deletions(-) delete mode 100644 ompi/mpi/c/win_allocate_shared_from_group.c diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in index 1c53e8e34a7..6ab047b1df3 100644 --- a/ompi/include/mpi.h.in +++ b/ompi/include/mpi.h.in @@ -1987,9 +1987,6 @@ OMPI_DECLSPEC int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); OMPI_DECLSPEC int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); -OMPI_DECLSPEC int MPI_Win_allocate_shared_from_group (MPI_Aint size, int disp_unit, MPI_Info info, - MPI_Group group, const char *tag, void *baseptr, - MPI_Win *win); OMPI_DECLSPEC int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size); OMPI_DECLSPEC MPI_Fint MPI_Win_c2f(MPI_Win win); OMPI_DECLSPEC int MPI_Win_call_errhandler(MPI_Win win, int errorcode); @@ -2709,9 +2706,6 @@ OMPI_DECLSPEC int PMPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info MPI_Comm comm, void *baseptr, MPI_Win *win); OMPI_DECLSPEC int PMPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); -OMPI_DECLSPEC int PMPI_Win_allocate_shared_from_group (MPI_Aint size, int disp_unit, MPI_Info info, - MPI_Group group, const char *tag, void *baseptr, - MPI_Win *win); OMPI_DECLSPEC int PMPI_Win_attach(MPI_Win win, void *base, MPI_Aint size); OMPI_DECLSPEC MPI_Fint PMPI_Win_c2f(MPI_Win win); OMPI_DECLSPEC int PMPI_Win_call_errhandler(MPI_Win win, int errorcode); diff --git a/ompi/mpi/c/win_allocate_shared_from_group.c b/ompi/mpi/c/win_allocate_shared_from_group.c deleted file mode 100644 index 0d94b8ad953..00000000000 --- a/ompi/mpi/c/win_allocate_shared_from_group.c +++ /dev/null @@ -1,80 +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) 2006 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2014 Los Alamos National Security, LLC. All rights - * reserved. - * Copyright (c) 2015 Research Organization for Information Science - * and Technology (RIST). 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 - -#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/win/win.h" -#include "ompi/memchecker.h" - -#if OMPI_BUILD_MPI_PROFILING -#if OPAL_HAVE_WEAK_SYMBOLS -#pragma weak MPI_Win_allocate_shared_from_group = PMPI_Win_allocate_shared_from_group -#endif -#define MPI_Win_allocate_shared_from_group PMPI_Win_allocate_shared_from_group -#endif - -static const char FUNC_NAME[] = "MPI_Win_allocate_shared_from_group"; - - -int MPI_Win_allocate_shared_from_group (MPI_Aint size, int disp_unit, MPI_Info info, - MPI_Group group, const char *tag, void *baseptr, - MPI_Win *win) -{ - int ret = MPI_SUCCESS; - - /* argument checking */ - if (MPI_PARAM_CHECK) { - OMPI_ERR_INIT_FINALIZE(FUNC_NAME); - - if (NULL == group) { - return MPI_ERR_GROUP; - } else if (NULL == info || ompi_info_is_freed(info)) { - return MPI_ERR_INFO; - } else if (NULL == win) { - return MPI_ERR_WIN; - } else if ( size < 0 ) { - return MPI_ERR_SIZE; - } else if (NULL == tag) { - return MPI_ERR_TAG; - } - } - - /* create window and return */ - ret = ompi_win_allocate_shared_from_group ((size_t)size, disp_unit, &info->super, - group, tag, baseptr, win); - if (OMPI_SUCCESS != ret) { - *win = MPI_WIN_NULL; - } - - return ompi_errcode_get_mpi_code (ret); -} diff --git a/ompi/win/win.c b/ompi/win/win.c index f532f0a1985..c290fa11ac1 100644 --- a/ompi/win/win.c +++ b/ompi/win/win.c @@ -358,26 +358,6 @@ ompi_win_allocate_shared(size_t size, int disp_unit, opal_info_t *info, return OMPI_SUCCESS; } -int ompi_win_allocate_shared_from_group (size_t size, int disp_unit, opal_info_t *info, ompi_group_t *group, - const char *tag, void *baseptr, ompi_win_t** newwin) -{ - /* NTH: dummy implementation until the osc modules are updated for group communicator - * creation. This implemention will probably continue to exist for modules that do - * not provide group-based window creation. */ - ompi_communicator_t *comm; - int rc; - - rc = ompi_comm_create_from_group (group, tag, info, MPI_ERRHANDLER_NULL, &comm); - if (OPAL_UNLIKELY(OMPI_SUCCESS == rc)) { - return rc; - } - - rc = ompi_win_allocate_shared (size, disp_unit, info, comm, baseptr, newwin); - ompi_comm_free (&comm); - return rc; -} - - int ompi_win_create_dynamic(opal_info_t *info, ompi_communicator_t *comm, ompi_win_t **newwin) { diff --git a/ompi/win/win.h b/ompi/win/win.h index 75143cc1243..9cc142f40ce 100644 --- a/ompi/win/win.h +++ b/ompi/win/win.h @@ -144,9 +144,6 @@ int ompi_win_allocate(size_t size, int disp_unit, opal_info_t *info, ompi_communicator_t *comm, void *baseptr, ompi_win_t **newwin); int ompi_win_allocate_shared(size_t size, int disp_unit, opal_info_t *info, ompi_communicator_t *comm, void *baseptr, ompi_win_t **newwin); -int ompi_win_allocate_shared_from_group (size_t size, int disp_unit, opal_info_t *info, - ompi_group_t *group, const char *tag, void *baseptr, - ompi_win_t **newwin); int ompi_win_create_dynamic(opal_info_t *info, ompi_communicator_t *comm, ompi_win_t **newwin); int ompi_win_create_dynamic_from_group (opal_info_t *info, ompi_group_t *group, const char *tag, ompi_win_t **newwin);