Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created the part direct module #12796

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions ompi/mca/part/base/part_base_frame.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ 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("direct"));
opal_pointer_array_add(&mca_part_base_part, strdup("persist"));

return OMPI_SUCCESS;
Expand Down
5 changes: 3 additions & 2 deletions ompi/mca/part/base/part_base_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ int mca_part_base_select(bool enable_progress_threads,
continue;
}


opal_output_verbose( 10, ompi_part_base_framework.framework_output,
"select: init returned priority %d", priority );
if (priority > best_priority) {
Expand Down Expand Up @@ -216,7 +217,7 @@ int mca_part_base_select(bool enable_progress_threads,
/* This base function closes, unloads, and removes from the
available list all unselected components. The available list will
contain only the selected component. */

mca_base_components_close(ompi_part_base_framework.framework_output,
&ompi_part_base_framework.framework_components,
(mca_base_component_t *) best_component);
Expand All @@ -227,7 +228,7 @@ int mca_part_base_select(bool enable_progress_threads,
}

/* All done */

return OMPI_SUCCESS;
}

53 changes: 53 additions & 0 deletions ompi/mca/part/direct/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# 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_direct_DSO
component_noinst =
component_install = mca_part_direct.la
else
component_noinst = libmca_part_direct.la
component_install =
endif

local_sources = \
part_direct.c \
part_direct.h \
part_direct_component.c \
part_direct_component.h \
part_direct_recvreq.h \
part_direct_recvreq.c \
part_direct_request.h \
part_direct_request.c \
part_direct_sendreq.h \
part_direct_sendreq.c

mcacomponentdir = $(ompilibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_part_direct_la_SOURCES = $(local_sources)
mca_part_direct_la_LIBADD = $(top_builddir)/ompi/lib@[email protected] \
$(part_direct_LIBS)
mca_part_direct_la_LDFLAGS = -module -avoid-version $(part_direct_LDFLAGS)

noinst_LTLIBRARIES = $(component_noinst)
libmca_part_direct_la_SOURCES = $(local_sources)
libmca_part_direct_la_LIBADD = $(part_direct_LIBS)
libmca_part_direct_la_LDFLAGS = -module -avoid-version $(part_direct_LDFLAGS)

47 changes: 47 additions & 0 deletions ompi/mca/part/direct/part_direct.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* -*- 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$
*
* 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/direct/part_direct.h"
#include "ompi/mca/part/direct/part_direct_sendreq.h"
#include "ompi/mca/part/direct/part_direct_recvreq.h"

ompi_part_direct_t ompi_part_direct = {
.super = {
.part_progress = mca_part_direct_progress,
.part_precv_init = mca_part_direct_precv_init,
.part_psend_init = mca_part_direct_psend_init,
.part_start = mca_part_direct_start,
.part_pready = mca_part_direct_pready,
.part_parrived = mca_part_direct_parrived,
}
};


OBJ_CLASS_INSTANCE(mca_part_direct_list_t,
opal_list_item_t,
NULL,
NULL);

Loading
Loading