Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions ompi/mca/part/base/part_base_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,6 @@ static int mca_part_base_close(void)
}
OBJ_DESTRUCT(&mca_part_base_part);

OBJ_DESTRUCT(&mca_part_base_psend_requests);
OBJ_DESTRUCT(&mca_part_base_precv_requests);

/* Close all remaining available components */
return mca_base_framework_components_close(&ompi_part_base_framework, NULL);
}
Expand All @@ -122,9 +119,6 @@ static int mca_part_base_open(mca_base_open_flag_t flags)
{
OBJ_CONSTRUCT(&mca_part_base_part, opal_pointer_array_t);


OBJ_CONSTRUCT(&mca_part_base_psend_requests, opal_free_list_t);
OBJ_CONSTRUCT(&mca_part_base_precv_requests, opal_free_list_t);
/* Open up all available components */

if (OPAL_SUCCESS !=
Expand All @@ -137,8 +131,8 @@ static int mca_part_base_open(mca_base_open_flag_t flags)

mca_part_base_selected_component.partm_finalize = NULL;

/* Currently this uses a default with no selection criteria as there is only 1 module. */
opal_pointer_array_add(&mca_part_base_part, strdup("persist"));
opal_pointer_array_add(&mca_part_base_part, strdup("persist_aggregated"));

return OMPI_SUCCESS;
}
Expand Down
7 changes: 0 additions & 7 deletions ompi/mca/part/base/part_base_prequest.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@
#include "ompi/mca/part/part.h"
#include "ompi/mca/part/base/part_base_prequest.h"

/**
* If you wonder why these 2 freelists are declared here read the comment
* in the part_base_request.h file.
*/
opal_free_list_t mca_part_base_psend_requests = {{{0}}};
opal_free_list_t mca_part_base_precv_requests = {{{0}}};

static void mca_part_base_prequest_construct(mca_part_base_prequest_t* req)
{
req->req_ompi.req_type = OMPI_REQUEST_PART;
Expand Down
6 changes: 0 additions & 6 deletions ompi/mca/part/base/part_base_prequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
#include "opal/datatype/opal_convertor.h"
BEGIN_C_DECLS

/**
* External list for the partitioned requests.
*/
OMPI_DECLSPEC extern opal_free_list_t mca_part_base_psend_requests;
OMPI_DECLSPEC extern opal_free_list_t mca_part_base_precv_requests;

typedef enum {
MCA_PART_REQUEST_NULL,
MCA_PART_REQUEST_PSEND,
Expand Down
2 changes: 2 additions & 0 deletions ompi/mca/part/persist/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 IBM Corporation. All rights reserved.
# Copyright (c) 2020-2021 Sandia National Laboratories. All rights reserved.
# Copyright (c) 2024 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/part/persist/part_persist.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ mca_part_persist_free_req(struct mca_part_persist_request_t* req)

__opal_attribute_always_inline__ static inline void mca_part_persist_init_lists(void)
{
opal_free_list_init (&mca_part_base_precv_requests,
opal_free_list_init (&mca_part_persist_precv_requests,
sizeof(mca_part_persist_precv_request_t),
opal_cache_line_size,
OBJ_CLASS(mca_part_persist_precv_request_t),
Expand All @@ -122,7 +122,7 @@ __opal_attribute_always_inline__ static inline void mca_part_persist_init_lists(
ompi_part_persist.free_list_max,
ompi_part_persist.free_list_inc,
NULL, 0, NULL, NULL, NULL);
opal_free_list_init (&mca_part_base_psend_requests,
opal_free_list_init (&mca_part_persist_psend_requests,
sizeof(mca_part_persist_psend_request_t),
opal_cache_line_size,
OBJ_CLASS(mca_part_persist_psend_request_t),
Expand Down
9 changes: 9 additions & 0 deletions ompi/mca/part/persist/part_persist_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
* Copyright (c) 2013-2021 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2024 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -22,6 +24,7 @@
#include "ompi_config.h"

#include "ompi/mca/part/persist/part_persist.h"
#include "ompi/mca/part/persist/part_persist_request.h"

#include "ompi/mca/part/persist/part_persist_sendreq.h"
#include "ompi/mca/part/persist/part_persist_recvreq.h"
Expand Down Expand Up @@ -96,6 +99,9 @@ mca_part_persist_component_open(void)

ompi_part_persist.next_send_tag = 0; /**< This is a counter for send tags for the actual data transfer. */
ompi_part_persist.next_recv_tag = 0;

OBJ_CONSTRUCT(&mca_part_persist_psend_requests, opal_free_list_t);
OBJ_CONSTRUCT(&mca_part_persist_precv_requests, opal_free_list_t);

mca_part_persist_init_lists();

Expand All @@ -113,6 +119,9 @@ mca_part_persist_component_open(void)
static int
mca_part_persist_component_close(void)
{
OBJ_DESTRUCT(&mca_part_persist_psend_requests);
OBJ_DESTRUCT(&mca_part_persist_precv_requests);

OBJ_DESTRUCT(&ompi_part_persist.lock);
return OMPI_SUCCESS;
}
Expand Down
2 changes: 2 additions & 0 deletions ompi/mca/part/persist/part_persist_component.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* Copyright (c) 2004-2025 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2020-2021 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2024 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/part/persist/part_persist_recvreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ OBJ_CLASS_DECLARATION(mca_part_persist_precv_request_t);
#define MCA_PART_PERSIST_PRECV_REQUEST_ALLOC(precvreq) \
do { \
precvreq = (mca_part_persist_precv_request_t*) \
opal_free_list_get (&mca_part_base_precv_requests); \
opal_free_list_get (&mca_part_persist_precv_requests); \
precvreq->req_base.req_type = MCA_PART_PERSIST_REQUEST_PRECV; \
} while (0)

Expand Down Expand Up @@ -94,7 +94,7 @@ do { \
OMPI_DATATYPE_RELEASE((recvreq)->req_datatype); \
OMPI_REQUEST_FINI(&(recvreq)->req_ompi); \
opal_convertor_cleanup( &((recvreq)->req_convertor) ); \
opal_free_list_return ( &mca_part_base_precv_requests, \
opal_free_list_return ( &mca_part_persist_precv_requests, \
(opal_free_list_item_t*)(recvreq)); \
}

Expand Down
4 changes: 4 additions & 0 deletions ompi/mca/part/persist/part_persist_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#include "ompi/mca/part/persist/part_persist.h"
#include "ompi/mca/part/persist/part_persist_request.h"

/**
*/
opal_free_list_t mca_part_persist_psend_requests = {{{0}}};
opal_free_list_t mca_part_persist_precv_requests = {{{0}}};

static void mca_part_persist_request_construct( mca_part_persist_request_t* req) {
OBJ_CONSTRUCT(&req->req_convertor, opal_convertor_t);
Expand Down
7 changes: 7 additions & 0 deletions ompi/mca/part/persist/part_persist_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ struct ompi_mca_persist_setup_t {
};


/**
* External list for the partitioned requests.
*/
OMPI_DECLSPEC extern opal_free_list_t mca_part_persist_psend_requests;
OMPI_DECLSPEC extern opal_free_list_t mca_part_persist_precv_requests;


/**
* Base type for PART PERSIST requests
*/
Expand Down
4 changes: 2 additions & 2 deletions ompi/mca/part/persist/part_persist_sendreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ OBJ_CLASS_DECLARATION(mca_part_persist_psend_request_t);
ompi_proc) \
do { \
sendreq = (mca_part_persist_psend_request_t*) \
opal_free_list_wait (&mca_part_base_psend_requests); \
opal_free_list_wait (&mca_part_persist_psend_requests); \
sendreq->req_base.req_type = MCA_PART_PERSIST_REQUEST_PSEND; \
} while(0)

Expand Down Expand Up @@ -87,7 +87,7 @@ do { \
OBJ_RELEASE(sendreq->req_comm); \
OMPI_REQUEST_FINI(&sendreq->req_ompi); \
opal_convertor_cleanup( &(sendreq->req_convertor) ); \
opal_free_list_return ( &mca_part_base_psend_requests, \
opal_free_list_return ( &mca_part_persist_psend_requests, \
(opal_free_list_item_t*)sendreq); \
}

Expand Down
55 changes: 55 additions & 0 deletions ompi/mca/part/persist_aggregated/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# Copyright (c) 2004-2006 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2009 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2017 IBM Corporation. All rights reserved.
# Copyright (c) 2020-2021 Sandia National Laboratories. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).

# EXTRA_DIST = post_configure.sh

if MCA_BUILD_ompi_part_persist_aggregated_DSO
component_noinst =
component_install = mca_part_persist_aggregated.la
else
component_noinst = libmca_part_persist_aggregated.la
component_install =
endif

local_sources = \
part_persist_aggregated.c \
part_persist_aggregated.h \
part_persist_aggregated_component.c \
part_persist_aggregated_component.h \
part_persist_aggregated_recvreq.h \
part_persist_aggregated_recvreq.c \
part_persist_aggregated_request.h \
part_persist_aggregated_request.c \
part_persist_aggregated_sendreq.h \
part_persist_aggregated_sendreq.c \
schemes/part_persist_aggregated_scheme_regular.h \
schemes/part_persist_aggregated_scheme_regular.c

mcacomponentdir = $(ompilibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_part_persist_aggregated_la_SOURCES = $(local_sources)
mca_part_persist_aggregated_la_LIBADD = $(top_builddir)/ompi/lib@[email protected] \
$(part_persist_aggregated_LIBS)
mca_part_persist_aggregated_la_LDFLAGS = -module -avoid-version $(part_persist_aggregated_LDFLAGS)

noinst_LTLIBRARIES = $(component_noinst)
libmca_part_persist_aggregated_la_SOURCES = $(local_sources)
libmca_part_persist_aggregated_la_LIBADD = $(part_persist_aggregated_LIBS)
libmca_part_persist_aggregated_la_LDFLAGS = -module -avoid-version $(part_persist_aggregated_LDFLAGS)

49 changes: 49 additions & 0 deletions ompi/mca/part/persist_aggregated/part_persist_aggregated.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2006-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2007 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2011-2021 Sandia National Laboratories. All rights reserved.
* Copyright (c) 2024 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/

#include "ompi_config.h"

#include "ompi/communicator/communicator.h"
#include "ompi/mca/part/base/part_base_prequest.h"
#include "ompi/mca/part/base/base.h"

#include "ompi/mca/part/persist_aggregated/part_persist_aggregated.h"
#include "ompi/mca/part/persist_aggregated/part_persist_aggregated_sendreq.h"
#include "ompi/mca/part/persist_aggregated/part_persist_aggregated_recvreq.h"

ompi_part_persist_aggregated_t ompi_part_persist_aggregated = {
.super = {
.part_progress = mca_part_persist_aggregated_progress,
.part_precv_init = mca_part_persist_aggregated_precv_init,
.part_psend_init = mca_part_persist_aggregated_psend_init,
.part_start = mca_part_persist_aggregated_start,
.part_pready = mca_part_persist_aggregated_pready,
.part_parrived = mca_part_persist_aggregated_parrived,
}
};


OBJ_CLASS_INSTANCE(mca_part_persist_aggregated_list_t,
opal_list_item_t,
NULL,
NULL);

Loading
Loading