1
1

Complete implementation of the --without-rte-support configure option. Working with Brian, this has been tested on RedStorm.

Some minor changes to help facilitate debugger support so that both mpirun and yod can operate with it. Still to be completed.

This commit was SVN r18664.
Этот коммит содержится в:
Ralph Castain 2008-06-18 03:15:56 +00:00
родитель d0cfca5990
Коммит 0532d799d6
87 изменённых файлов: 1131 добавлений и 466 удалений

Просмотреть файл

@ -530,21 +530,26 @@ AC_DEFINE_UNQUOTED([OPAL_ENABLE_TRACE], [$opal_want_trace],
#
# Minimal RTE support
#
AC_MSG_CHECKING([if want full RTE support])
AC_ARG_ENABLE([rte],
[AC_HELP_STRING([--disable-rte-support],
[Disable RTE support for systems that do not require it (default: full RTE support enabled)])])
if test "$enable_rte_support" = "no"; then
AC_ARG_WITH([rte],
[AC_HELP_STRING([--without-rte-support],
[Build without RTE support for systems that do not require it (default: full RTE support built)])])
if test "$with_rte_support" = "no"; then
AC_MSG_RESULT([no])
orte_disable_full_support=1
orte_without_full_support=1
list_of_frameworks="errmgr,ess-singleton,ess-hnp,ess-tool,ess-env,filem,grpcomm-basic,iof,odls,oob,plm,ras,rmaps,rml,routed,snapc,btl-sm,coll-sm,common-sm,mpool-sm,dpm-orte,pubsub-orte"
if test -z $enable_mca_no_build ; then
enable_mca_no_build="$list_of_frameworks"
else
enable_mca_no_build="$enable_mca_no_build,$list_of_frameworks"
fi
else
AC_MSG_RESULT([yes])
orte_disable_full_support=0
orte_without_full_support=0
fi
AC_DEFINE_UNQUOTED([ORTE_DISABLE_FULL_SUPPORT], [$orte_disable_full_support],
[Enable full RTE support])
AM_CONDITIONAL(ORTE_DISABLE_FULL_SUPPORT, test "$enable_rte_support" = "no")
AC_DEFINE_UNQUOTED([ORTE_DISABLE_FULL_SUPPORT], [$orte_without_full_support],
[Build full RTE support])
AM_CONDITIONAL(ORTE_DISABLE_FULL_SUPPORT, test "$with_rte_support" = "no")
#
# Cross-compile data

Просмотреть файл

@ -2,16 +2,19 @@
# RTE, to closely match the real machine's setup. You need a number of env
# variables set for each process before you even *think* of starting to use
# the results of this configure script.
enable_f77=no
enable_io_romio=no
enable_static=yes
enable_shared=no
with_threads=posix
enable_pretty_print_stacktrace=yes
enable_dlopen=no
with_portals_config=utcp
with_grpcomm_cnos=utcp
with_memory_manager=no
enable_heterogeneous=no
enable_mca_no_build=maffinity,paffinity,timer,errmgr,iof,odls,oob,plm,ras,rmaps,rml,routed,btl-sm,mpool-sm,btl-self,coll-hierarch,coll-sm,pml-dr,btl-tcp,common-sm
enable_mca_no_build=carto-file,maffinity,paffinity,timer,btl-sm,mpool-sm,btl-self,coll-hierarch,coll-sm,pml-dr,btl-tcp,common-sm,mtl-portals
with_rte_support=no
enable_heterogeneous=no
enable_mem_debug=no
enable_mem_profile=no
with_openib=no
with_gm=no
with_mx=no

Просмотреть файл

@ -6,7 +6,7 @@ enable_pretty_print_stacktrace=no
enable_dlopen=no
with_portals_config=redstorm
with_memory_manager=none
enable_mca_no_build=carto-file,maffinity,paffinity,timer,errmgr,iof,odls,oob,plm,ras,rmaps,rml,routed,filem,btl-sm,btl-self,coll-hierarch,coll-sm,common-sm,mpool-sm,pml-dr,libnbc,vt
enable_mca_no_build=carto-file,maffinity,paffinity,timer,btl-sm,btl-self,coll-hierarch,coll-sm,common-sm,mpool-sm,pml-dr,libnbc,vt
with_rte_support=no
enable_heterogeneous=no
enable_pty_support=no

Просмотреть файл

@ -32,11 +32,12 @@
#include "opal/class/opal_list.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/mca/coll/base/base.h"
#include "orte/mca/rml/rml.h"
#include "ompi/request/request.h"
#include "ompi/runtime/mpiruntime.h"
#include "ompi/mca/dpm/dpm.h"
#include "orte/mca/rml/rml.h"
BEGIN_C_DECLS
/**
@ -785,12 +786,20 @@ static int ompi_comm_allreduce_intra_oob (int *inbuf, int *outbuf,
}
if ( send_first ) {
rc = orte_rml.send_buffer(remote_leader, sbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0);
rc = orte_rml.recv_buffer(remote_leader, rbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0);
if (0 > (rc = orte_rml.send_buffer(remote_leader, sbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0))) {
goto exit;
}
if (0 > (rc = orte_rml.recv_buffer(remote_leader, rbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0))) {
goto exit;
}
}
else {
rc = orte_rml.recv_buffer(remote_leader, rbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0);
rc = orte_rml.send_buffer(remote_leader, sbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0);
if (0 > (rc = orte_rml.recv_buffer(remote_leader, rbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0))) {
goto exit;
}
if (0 > (rc = orte_rml.send_buffer(remote_leader, sbuf, OMPI_RML_TAG_COMM_CID_INTRA, 0))) {
goto exit;
}
}
if (ORTE_SUCCESS != (rc = opal_dss.unpack(rbuf, outbuf, &size_count, OPAL_INT))) {

Просмотреть файл

@ -53,6 +53,7 @@
* Open MPI debug library.
*/
#include "opal/class/opal_list.h"
#include "ompi/class/ompi_free_list.h"
#include "ompi/request/request.h"
#include "ompi/mca/pml/base/pml_base_request.h"
@ -64,8 +65,6 @@
#include "ompi/datatype/datatype.h"
#include "ompi/include/mpi.h"
#include "orte/util/totalview.h"
#if defined(OMPI_MSGQ_DLL)
/* This variable is old/deprecated -- the mpimsgq_dll_locations[]
method is preferred because it's more flexible */
@ -106,6 +105,8 @@ OMPI_DECLSPEC ompi_group_t* ompi_group_t_type_inclusion = NULL;
OMPI_DECLSPEC ompi_status_public_t* ompi_status_public_t_type_inclusion = NULL;
OMPI_DECLSPEC ompi_datatype_t* ompi_datatype_t_type_inclusion = NULL;
OMPI_DECLSPEC volatile int MPIR_debug_gate=0;
/* Check for a file in few dirrect ways for portability */
static void check(char *dir, char *file, char **locations)
{
@ -147,13 +148,13 @@ void ompi_wait_for_debugger(void)
char *a, *b, **dirs;
/* Do we need to wait for a TotalView-like debugger? */
mca_base_param_reg_int_name("orte",
mca_base_param_reg_int_name("ompi",
"mpi_wait_for_debugger",
"Whether the MPI application "
"should wait for a debugger or not",
false, false, (int) false,
&wait_for_debugger);
mca_base_param_reg_int_name("orte",
mca_base_param_reg_int_name("ompi",
"mpi_wait_for_totalview",
"Deprecated synonym for mpi_wait_for_debugger",
false, false, (int) false,
@ -178,11 +179,18 @@ void ompi_wait_for_debugger(void)
/* If we're waiting for the debugger, then, well, wait for it. :-) */
if (wait_for_debugger) {
/* RHC: the following is a temporary hack until we figure
* out how to resolve the problem of where to
* instance the MPIR* variables so that multiple
* launchers can access them
*/
while (MPIR_debug_gate == 0) {
#if defined(__WINDOWS__)
Sleep(100); /* milliseconds */
#else
#elif defined(HAVE_USLEEP)
usleep(100000); /* microseconds */
#else
sleep(1); /* seconds */
#endif
}
}

Просмотреть файл

@ -25,5 +25,9 @@ libmca_dpm_la_SOURCES += \
base/dpm_base_open.c \
base/dpm_base_close.c \
base/dpm_base_select.c \
base/dpm_base_common_fns.c
base/dpm_base_null_fns.c
if !ORTE_DISABLE_FULL_SUPPORT
libmca_dpm_la_SOURCES += \
base/dpm_base_common_fns.c
endif

Просмотреть файл

@ -67,6 +67,8 @@ OMPI_DECLSPEC int ompi_dpm_base_select(void);
*/
OMPI_DECLSPEC int ompi_dpm_base_close(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/* Internal support functions */
OMPI_DECLSPEC char* ompi_dpm_base_dyn_init (void);
OMPI_DECLSPEC int ompi_dpm_base_dyn_finalize (void);
@ -74,6 +76,24 @@ OMPI_DECLSPEC void ompi_dpm_base_mark_dyncomm (ompi_communicator_t *comm);
OMPI_DECLSPEC ompi_dpm_base_disconnect_obj *ompi_dpm_base_disconnect_init ( ompi_communicator_t *comm);
OMPI_DECLSPEC void ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj **objs);
#endif
/* NULL component functions */
OMPI_DECLSPEC int ompi_dpm_base_null_connect_accept (ompi_communicator_t *comm, int root,
char *port_string, bool send_first,
ompi_communicator_t **newcomm);
OMPI_DECLSPEC void ompi_dpm_base_null_disconnect(ompi_communicator_t *comm);
OMPI_DECLSPEC int ompi_dpm_base_null_spawn(int count, char **array_of_commands,
char ***array_of_argv,
int *array_of_maxprocs,
MPI_Info *array_of_info,
char *port_name);
OMPI_DECLSPEC int ompi_dpm_base_null_dyn_init(void);
OMPI_DECLSPEC int ompi_dpm_base_null_dyn_finalize (void);
OMPI_DECLSPEC void ompi_dpm_base_null_mark_dyncomm (ompi_communicator_t *comm);
OMPI_DECLSPEC int ompi_dpm_base_null_open_port(char *port_name, orte_rml_tag_t given_tag);
OMPI_DECLSPEC char* ompi_dpm_base_null_parse_port (char *port_name, orte_rml_tag_t *tag);
OMPI_DECLSPEC int ompi_dpm_base_null_close_port(char *port_name);
/* useful globals */
OMPI_DECLSPEC extern int ompi_dpm_base_output;

81
ompi/mca/dpm/base/dpm_base_null_fns.c Обычный файл
Просмотреть файл

@ -0,0 +1,81 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2005 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-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) 2006-2007 University of Houston. All rights reserved.
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2007 Cisco, Inc. All rights reserved.
*
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include <string.h>
#include <stdio.h>
#include "ompi/mca/dpm/dpm.h"
#include "ompi/mca/dpm/base/base.h"
int ompi_dpm_base_null_connect_accept (ompi_communicator_t *comm, int root,
char *port_string, bool send_first,
ompi_communicator_t **newcomm)
{
return OMPI_ERR_NOT_SUPPORTED;
}
void ompi_dpm_base_null_disconnect(ompi_communicator_t *comm)
{
return;
}
int ompi_dpm_base_null_spawn(int count, char **array_of_commands,
char ***array_of_argv,
int *array_of_maxprocs,
MPI_Info *array_of_info,
char *port_name)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int ompi_dpm_base_null_dyn_init(void)
{
return OMPI_SUCCESS;
}
int ompi_dpm_base_null_dyn_finalize (void)
{
return OMPI_SUCCESS;
}
void ompi_dpm_base_null_mark_dyncomm (ompi_communicator_t *comm)
{
return;
}
int ompi_dpm_base_null_open_port(char *port_name, orte_rml_tag_t given_tag)
{
return OMPI_ERR_NOT_SUPPORTED;
}
char* ompi_dpm_base_null_parse_port (char *port_name, orte_rml_tag_t *tag)
{
return NULL;
}
int ompi_dpm_base_null_close_port(char *port_name)
{
return OMPI_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -33,7 +33,19 @@
* Globals
*/
OMPI_DECLSPEC int ompi_dpm_base_output = -1;
OMPI_DECLSPEC ompi_dpm_base_module_t ompi_dpm;
OMPI_DECLSPEC ompi_dpm_base_module_t ompi_dpm = {
NULL,
ompi_dpm_base_null_connect_accept,
ompi_dpm_base_null_disconnect,
ompi_dpm_base_null_spawn,
ompi_dpm_base_null_dyn_init,
ompi_dpm_base_null_dyn_finalize,
ompi_dpm_base_null_mark_dyncomm,
ompi_dpm_base_null_open_port,
ompi_dpm_base_null_parse_port,
ompi_dpm_base_null_close_port,
NULL
};
opal_list_t ompi_dpm_base_components_available;
ompi_dpm_base_component_t ompi_dpm_base_selected_component;

Просмотреть файл

@ -29,19 +29,21 @@
int ompi_dpm_base_select(void)
{
int ret, exit_status = OPAL_SUCCESS;
int ret;
ompi_dpm_base_component_t *best_component = NULL;
ompi_dpm_base_module_t *best_module = NULL;
/*
* Select the best component
*/
if( OPAL_SUCCESS != mca_base_select("dpm", ompi_dpm_base_output,
if( OPAL_SUCCESS != (ret = mca_base_select("dpm", ompi_dpm_base_output,
&ompi_dpm_base_components_available,
(mca_base_module_t **) &best_module,
(mca_base_component_t **) &best_component) ) {
/* This will only happen if no component was selected */
exit_status = OMPI_ERR_NOT_FOUND;
(mca_base_component_t **) &best_component))) {
/* it is okay not to find any executable components */
if (OMPI_ERR_NOT_FOUND == ret) {
ret = OPAL_SUCCESS;
}
goto cleanup;
}
@ -51,12 +53,9 @@ int ompi_dpm_base_select(void)
/* init the selected module */
if (NULL != ompi_dpm.init) {
if (OMPI_SUCCESS != (ret = ompi_dpm.init())) {
exit_status = ret;
goto cleanup;
}
ret = ompi_dpm.init();
}
cleanup:
return exit_status;
return ret;
}

Просмотреть файл

@ -22,5 +22,6 @@ headers += \
libmca_pubsub_la_SOURCES += \
base/pubsub_base_open.c \
base/pubsub_base_close.c \
base/pubsub_base_select.c
base/pubsub_base_select.c \
base/pubsub_base_null_fns.c

Просмотреть файл

@ -60,6 +60,11 @@ OMPI_DECLSPEC int ompi_pubsub_base_select(void);
OMPI_DECLSPEC int ompi_pubsub_base_close(void);
/* NULL functions */
OMPI_DECLSPEC int ompi_pubsub_base_null_publish(char *service, ompi_info_t *info, char *port);
OMPI_DECLSPEC int ompi_pubsub_base_null_unpublish(char *service, ompi_info_t *info);
OMPI_DECLSPEC char* ompi_pubsub_base_null_lookup(char *service, ompi_info_t *info);
/* useful globals */
OMPI_DECLSPEC extern int ompi_pubsub_base_output;
OMPI_DECLSPEC extern opal_list_t ompi_pubsub_base_components_available;

35
ompi/mca/pubsub/base/pubsub_base_null_fns.c Обычный файл
Просмотреть файл

@ -0,0 +1,35 @@
/*
* Copyright (c) 2004-2007 The Trustees of Indiana University.
* All rights reserved.
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
* 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$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "ompi/mca/pubsub/pubsub.h"
#include "ompi/mca/pubsub/base/base.h"
int ompi_pubsub_base_null_publish(char *service, ompi_info_t *info, char *port)
{
return OMPI_ERR_NOT_SUPPORTED;
}
int ompi_pubsub_base_null_unpublish(char *service, ompi_info_t *info)
{
return OMPI_ERR_NOT_SUPPORTED;
}
char* ompi_pubsub_base_null_lookup(char *service, ompi_info_t *info)
{
return NULL;
}

Просмотреть файл

@ -33,7 +33,13 @@
* Globals
*/
OMPI_DECLSPEC int ompi_pubsub_base_output = -1;
OMPI_DECLSPEC ompi_pubsub_base_module_t ompi_pubsub;
OMPI_DECLSPEC ompi_pubsub_base_module_t ompi_pubsub={
NULL,
ompi_pubsub_base_null_publish,
ompi_pubsub_base_null_unpublish,
ompi_pubsub_base_null_lookup,
NULL
};
opal_list_t ompi_pubsub_base_components_available;
ompi_pubsub_base_component_t ompi_pubsub_base_selected_component;

Просмотреть файл

@ -29,19 +29,21 @@
int ompi_pubsub_base_select(void)
{
int ret, exit_status = OPAL_SUCCESS;
int ret;
ompi_pubsub_base_component_t *best_component = NULL;
ompi_pubsub_base_module_t *best_module = NULL;
/*
* Select the best component
*/
if( OPAL_SUCCESS != mca_base_select("pubsub", ompi_pubsub_base_output,
if( OPAL_SUCCESS != (ret = mca_base_select("pubsub", ompi_pubsub_base_output,
&ompi_pubsub_base_components_available,
(mca_base_module_t **) &best_module,
(mca_base_component_t **) &best_component) ) {
/* This will only happen if no component was selected */
exit_status = OMPI_ERR_NOT_FOUND;
(mca_base_component_t **) &best_component))) {
/* it is okay not to find any executable components */
if (OMPI_ERR_NOT_FOUND == ret) {
ret = OPAL_SUCCESS;
}
goto cleanup;
}
@ -51,12 +53,9 @@ int ompi_pubsub_base_select(void)
/* init the selected module */
if (NULL != ompi_pubsub.init) {
if (OMPI_SUCCESS != (ret = ompi_pubsub.init())) {
exit_status = ret;
goto cleanup;
}
ret = ompi_pubsub.init();
}
cleanup:
return exit_status;
return ret;
}

Просмотреть файл

@ -28,7 +28,6 @@
#include "orte/mca/rml/rml.h"
#include "orte/mca/rml/rml_types.h"
int
ompi_init_preconnect_mpi(void)
{
@ -90,9 +89,9 @@ ompi_init_preconnect_mpi(void)
int
ompi_init_preconnect_oob(void)
{
int param, ret, value = 0;
size_t world_size, next, prev, i, j, world_rank, simultaneous;
ompi_proc_t **procs;
int ret, param, value = 0;
struct iovec inmsg[1], outmsg[1];
param = mca_base_param_find("mpi", NULL, "preconnect_oob");

Просмотреть файл

@ -31,4 +31,5 @@ DIST_SUBDIRS += \
tools/ompi_info \
tools/wrappers \
tools/ortetools \
tools/ompi-server
tools/ompi-server

Просмотреть файл

@ -18,6 +18,7 @@
#
if OMPI_INSTALL_BINARIES
if !ORTE_DISABLE_FULL_SUPPORT
bin_PROGRAMS = ompi-server
@ -25,7 +26,8 @@ dist_pkgdata_DATA = help-ompi-server.txt
dist_man_MANS = ompi-server.1
endif
endif # !ORTE_DISABLE_FULL_SUPPORT
endif # OMPI_INSTALL_BINARIES
ompi_server_SOURCES = ompi-server.c
ompi_server_LDADD = $(top_builddir)/ompi/libmpi.la

Просмотреть файл

@ -88,6 +88,10 @@
#include "orte/mca/errmgr/base/base.h"
#include "orte/mca/grpcomm/grpcomm.h"
#include "orte/mca/grpcomm/base/base.h"
#include "orte/mca/ess/ess.h"
#include "orte/mca/ess/base/base.h"
#include "orte/util/show_help.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "orte/mca/iof/iof.h"
#include "orte/mca/iof/base/base.h"
#include "orte/mca/oob/oob.h"
@ -104,15 +108,13 @@
#include "orte/mca/routed/base/base.h"
#include "orte/mca/plm/plm.h"
#include "orte/mca/plm/base/base.h"
#include "orte/mca/ess/ess.h"
#include "orte/mca/ess/base/base.h"
#if OPAL_ENABLE_FT == 1
#include "orte/mca/snapc/snapc.h"
#include "orte/mca/snapc/base/base.h"
#endif
#include "orte/mca/filem/filem.h"
#include "orte/mca/filem/base/base.h"
#include "orte/util/show_help.h"
#endif
using namespace std;
using namespace ompi_info;
@ -235,18 +237,22 @@ void ompi_info::open_components()
// open components
orte_process_info.hnp = true;
orte_errmgr_base_open();
component_map["errmgr"] = &orte_errmgr_base_components_available;
orte_grpcomm_base_open();
component_map["grpcomm"] = &mca_grpcomm_base_components_available;
orte_ess_base_open();
component_map["ess"] = &orte_ess_base_components_available;
#if !ORTE_DISABLE_FULL_SUPPORT
mca_oob_base_open();
component_map["oob"] = &mca_oob_base_components;
orte_odls_base_open();
component_map["odls"] = &orte_odls_base.available_components;
orte_errmgr_base_open();
component_map["errmgr"] = &orte_errmgr_base_components_available;
orte_grpcomm_base_open();
component_map["grpcomm"] = &mca_grpcomm_base_components_available;
orte_iof_base_open();
component_map["iof"] = &orte_iof_base.iof_components_opened;
@ -265,9 +271,6 @@ void ompi_info::open_components()
orte_plm_base_open();
component_map["plm"] = &orte_plm_base.available_components;
orte_ess_base_open();
component_map["ess"] = &orte_ess_base_components_available;
#if OPAL_ENABLE_FT == 1
orte_snapc_base_open();
component_map["snapc"] = &orte_snapc_base_components_available;
@ -275,6 +278,7 @@ void ompi_info::open_components()
orte_filem_base_open();
component_map["filem"] = &orte_filem_base_components_available;
#endif
// MPI frameworks
@ -366,22 +370,25 @@ void ompi_info::close_components()
mca_allocator_base_close();
ompi_osc_base_close();
orte_grpcomm_base_close();
orte_ess_base_close();
orte_show_help_finalize();
#if !ORTE_DISABLE_FULL_SUPPORT
#if OPAL_ENABLE_FT == 1
orte_snapc_base_close();
#endif
orte_filem_base_close();
orte_iof_base_close();
orte_ess_base_close();
orte_plm_base_close();
orte_odls_base_close();
orte_rmaps_base_close();
orte_ras_base_close();
orte_grpcomm_base_close();
orte_errmgr_base_close();
orte_rml_base_close();
orte_routed_base_close();
mca_oob_base_close();
#endif
orte_errmgr_base_close();
opal_backtrace_base_close();
opal_memory_base_close();
opal_memchecker_base_close();

Просмотреть файл

@ -193,7 +193,6 @@ int main(int argc, char *argv[])
#endif
ompi_info::mca_types.push_back("dpm");
ompi_info::mca_types.push_back("pubsub");
ompi_info::mca_types.push_back("allocator");
ompi_info::mca_types.push_back("coll");
ompi_info::mca_types.push_back("io");
@ -210,12 +209,10 @@ int main(int argc, char *argv[])
ompi_info::mca_types.push_back("crcp");
#endif
ompi_info::mca_types.push_back("errmgr");
ompi_info::mca_types.push_back("grpcomm");
#if !ORTE_DISABLE_FULL_SUPPORT
ompi_info::mca_types.push_back("iof");
ompi_info::mca_types.push_back("oob");
ompi_info::mca_types.push_back("odls");
ompi_info::mca_types.push_back("ess");
ompi_info::mca_types.push_back("ras");
ompi_info::mca_types.push_back("rmaps");
ompi_info::mca_types.push_back("rml");
@ -225,7 +222,12 @@ int main(int argc, char *argv[])
ompi_info::mca_types.push_back("snapc");
#endif
ompi_info::mca_types.push_back("filem");
#endif
/* these are always included */
ompi_info::mca_types.push_back("errmgr");
ompi_info::mca_types.push_back("ess");
ompi_info::mca_types.push_back("grpcomm");
// Execute the desired action(s)
if (opal_cmd_line_is_taken(cmd_line, "pretty")) {

Просмотреть файл

@ -18,6 +18,7 @@
#
if OMPI_INSTALL_BINARIES
if !ORTE_DISABLE_FULL_SUPPORT
dist_man_MANS =\
mpirun.1 \
@ -37,6 +38,7 @@ uninstall-local:
$(DESTDIR)$(bindir)/ompi-ps$(EXEEXT) \
$(DESTDIR)$(bindir)/ompi-clean$(EXEEXT)
endif # !ORTE_DISABLE_FULL_SUPPORT
endif # OMPI_INSTALL_BINARIES
mpirun.1: $(top_srcdir)/orte/tools/orterun/orterun.1

Просмотреть файл

@ -114,7 +114,7 @@ int mca_base_select(const char *type_name, int output_id,
mca_base_components_close(0, /* Pass 0 to keep this from closing the output handle */
components_available,
NULL);
return OPAL_ERROR;
return OPAL_ERR_NOT_FOUND;
}
opal_output_verbose(5, output_id,

Просмотреть файл

@ -67,6 +67,12 @@ static int rte_init(char flags)
int ret;
char *error = NULL;
/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
error = "orte_ess_base_std_prolog";
goto error;
}
/* Start by getting a unique name */
alps_set_name();

Просмотреть файл

@ -24,11 +24,17 @@ headers += \
libmca_ess_la_SOURCES += \
base/ess_base_close.c \
base/ess_base_open.c \
base/ess_base_select.c \
base/ess_base_select.c
if !ORTE_DISABLE_FULL_SUPPORT
libmca_ess_la_SOURCES += \
base/ess_base_get.c \
base/ess_base_put.c \
base/ess_base_std_tool.c \
base/ess_base_std_app.c \
base/ess_base_std_orted.c \
base/ess_base_build_nidmap.c
base/ess_base_build_nidmap.c \
base/ess_base_std_prolog.c
endif

Просмотреть файл

@ -58,11 +58,17 @@ ORTE_DECLSPEC int orte_ess_base_close(void);
*/
ORTE_DECLSPEC extern int orte_ess_base_output;
ORTE_DECLSPEC extern opal_list_t orte_ess_base_components_available;
#if !ORTE_DISABLE_FULL_SUPPORT
/*
* Internal helper functions used by components
*/
ORTE_DECLSPEC int orte_ess_env_get(void);
ORTE_DECLSPEC int orte_ess_base_std_prolog(void);
ORTE_DECLSPEC int orte_ess_base_app_setup(void);
ORTE_DECLSPEC int orte_ess_base_app_finalize(void);
ORTE_DECLSPEC void orte_ess_base_app_abort(int status, bool report) __opal_attribute_noreturn__;
@ -84,7 +90,7 @@ ORTE_DECLSPEC int orte_ess_env_put(orte_std_cntr_t num_procs,
orte_std_cntr_t num_local_procs,
char ***env);
ORTE_DECLSPEC extern opal_list_t orte_ess_base_components_available;
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS

84
orte/mca/ess/base/ess_base_std_prolog.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$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h"
#include "orte/constants.h"
#include <sys/types.h>
#include <stdio.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "orte/mca/errmgr/errmgr.h"
#include "orte/util/show_help.h"
#include "orte/runtime/orte_wait.h"
#include "orte/runtime/orte_locks.h"
#include "orte/runtime/runtime_internals.h"
#include "orte/mca/ess/base/base.h"
int orte_ess_base_std_prolog(void)
{
int ret;
char *error = NULL;
/* setup the locks */
if (ORTE_SUCCESS != (ret = orte_locks_init())) {
error = "orte_locks_init";
goto error;
}
/* Initialize the ORTE data type support */
if (ORTE_SUCCESS != (ret = orte_dt_init())) {
error = "orte_dt_init";
goto error;
}
/* if I'm the HNP, make sure that the daemon flag is NOT set so that
* components unique to non-HNP orteds can be selected and init
* my basic storage elements
*/
if (orte_process_info.hnp) {
if (ORTE_SUCCESS != (ret = orte_hnp_globals_init())) {
error = "orte_hnp_globals_init";
goto error;
}
}
/*
* Internal startup
*/
if (ORTE_SUCCESS != (ret = orte_wait_init())) {
ORTE_ERROR_LOG(ret);
error = "orte_wait_init";
goto error;
}
return ORTE_SUCCESS;
error:
orte_show_help("help-orte-runtime",
"orte_init:startup:internal-failure",
true, error, ORTE_ERROR_NAME(ret), ret);
return ret;
}

6
orte/mca/ess/env/ess_env_module.c поставляемый
Просмотреть файл

@ -116,6 +116,12 @@ static int rte_init(char flags)
int ret;
char *error = NULL;
/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
error = "orte_ess_base_std_prolog";
goto error;
}
/* Start by getting a unique name from the enviro */
env_set_name();

Просмотреть файл

@ -95,6 +95,12 @@ static int rte_init(char flags)
orte_node_t *node;
orte_proc_t *proc;
/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
error = "orte_ess_base_std_prolog";
goto error;
}
/* Since we are the HNP, then responsibility for
* defining the name falls to the PLM component for our
* respective environment - hence, we have to open the PLM
@ -229,8 +235,7 @@ static int rte_init(char flags)
goto error;
}
#if ORTE_DISABLE_FULL_SUPPORT
#else
#if !ORTE_DISABLE_FULL_SUPPORT
/* setup the orte_show_help system to recv remote output */
ret = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_SHOW_HELP,
ORTE_RML_NON_PERSISTENT, orte_show_help_recv, NULL);

Просмотреть файл

@ -76,6 +76,12 @@ static int rte_init(char flags)
int ret;
char *error = NULL;
/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
error = "orte_ess_base_std_prolog";
goto error;
}
/* Start by getting a unique name */
lsf_set_name();

Просмотреть файл

@ -29,6 +29,7 @@
#include "orte/util/name_fns.h"
#include "orte/util/proc_info.h"
#include "orte/runtime/orte_globals.h"
#include "orte/mca/grpcomm/base/base.h"
#include "orte/mca/ess/ess.h"
#include "orte/mca/ess/base/base.h"
@ -59,9 +60,9 @@ static char **nidmap=NULL;
static int rte_init(char flags)
{
int rc, i, len, num_procs;
int rc;
orte_vpid_t vpid;
char *vpid_string, *jobid_str;
char *vpid_string;
char *nidmap_string;
vpid_string = getenv("PTL_MY_RID");
@ -106,44 +107,6 @@ static int rte_init(char flags)
ORTE_ERROR_LOG(rc);
return rc;
}
/* we also want our session directory for shared memory support */
if (ORTE_SUCCESS != (rc = orte_util_convert_jobid_to_string(&jobid_str, ORTE_PROC_MY_NAME->jobid))) {
ORTE_ERROR_LOG(rc);
return rc;
}
if (ORTE_SUCCESS != (rc = orte_util_convert_vpid_to_string(&vpid_string, ORTE_PROC_MY_NAME->vpid))) {
ORTE_ERROR_LOG(rc);
return rc;
}
OPAL_OUTPUT_VERBOSE((2, orte_debug_output,
"%s setting up session dir with\n\ttmpdir: %s\n\tuser %s\n\thost %s\n\tjobid %s\n\tprocid %s",
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
(NULL == orte_process_info.tmpdir_base) ? "UNDEF" : orte_process_info.tmpdir_base,
orte_process_info.nodename, jobid_str, vpid_string));
if (ORTE_SUCCESS != (rc = orte_session_dir(true,
orte_process_info.tmpdir_base,
orte_process_info.nodename, NULL,
jobid_str, vpid_string))) {
if (jobid_str != NULL) free(jobid_str);
if (vpid_string != NULL) free(vpid_string);
ORTE_ERROR_LOG(rc);
return rc;
}
if (NULL != jobid_str) {
free(jobid_str);
}
if (NULL != vpid_string) {
free(vpid_string);
}
/* Once the session directory location has been established, set
the opal_output env file location to be in the
proc-specific session directory. */
opal_output_set_output_file_info(orte_process_info.proc_session_dir,
"output-", NULL, NULL);
/* that's all we need here */
return ORTE_SUCCESS;
@ -157,7 +120,6 @@ static int rte_finalize(void)
/* just cleanup the things we used */
orte_grpcomm_base_close();
orte_session_dir_finalize(ORTE_PROC_MY_NAME);
/* clean out the global structures */
orte_proc_info_finalize();
@ -172,9 +134,9 @@ static void rte_abort(int status, bool report)
static bool proc_is_local(orte_process_name_t *proc)
{
if (NULL != nidmap[proc->name.vpid] &&
if (NULL != nidmap[proc->vpid] &&
NULL != nidmap[ORTE_PROC_MY_NAME->vpid] &&
0 == strcmp(nidmap[proc->name.vpid],
0 == strcmp(nidmap[proc->vpid],
nidmap[ORTE_PROC_MY_NAME->vpid])) {
return true;
}
@ -184,12 +146,12 @@ static bool proc_is_local(orte_process_name_t *proc)
static char* proc_get_hostname(orte_process_name_t *proc)
{
return nidmap[proc->name.vpid];
return nidmap[proc->vpid];
}
static uint32_t proc_get_arch(orte_process_name_t *proc)
{
return 0;
return orte_process_info.arch;
}
static uint8_t proc_get_local_rank(orte_process_name_t *proc)

Просмотреть файл

@ -92,6 +92,12 @@ static int rte_init(char flags)
{
int rc;
/* run the prolog */
if (ORTE_SUCCESS != (rc = orte_ess_base_std_prolog())) {
ORTE_ERROR_LOG(rc);
return rc;
}
/*
* If we are the selected module, then we must be a singleton
* as it means that no other method for discovering a name

Просмотреть файл

@ -78,6 +78,12 @@ static int rte_init(char flags)
int ret;
char *error = NULL;
/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
error = "orte_ess_base_std_prolog";
goto error;
}
/* Start by getting a unique name */
slurm_set_name();

Просмотреть файл

@ -64,6 +64,12 @@ static int rte_init(char flags)
int ret;
char *error = NULL;
/* run the prolog */
if (ORTE_SUCCESS != (ret = orte_ess_base_std_prolog())) {
error = "orte_ess_base_std_prolog";
goto error;
}
/* If we are a tool with no name, then responsibility for
* defining the name falls to the PLM component for our
* respective environment - hence, we have to open the PLM
@ -103,8 +109,6 @@ static int rte_init(char flags)
goto error;
}
/* All done */
orte_initialized = true;
return ORTE_SUCCESS;
error:

Просмотреть файл

@ -16,14 +16,19 @@
# $HEADER$
#
dist_pkgdata_DATA = base/help-orte-filem-base.txt
headers += \
base/base.h
libmca_filem_la_SOURCES += \
base/filem_base_open.c \
base/filem_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
dist_pkgdata_DATA = base/help-orte-filem-base.txt
libmca_filem_la_SOURCES += \
base/filem_base_close.c \
base/filem_base_select.c \
base/filem_base_receive.c \
base/filem_base_fns.c
endif

Просмотреть файл

@ -20,9 +20,12 @@
#include "orte_config.h"
#include "orte/mca/rml/rml.h"
#include "opal/dss/dss.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "orte/mca/rml/rml.h"
#endif
#include "orte/mca/filem/filem.h"
/*
@ -31,6 +34,17 @@
BEGIN_C_DECLS
/**
* Initialize the FILEM MCA framework
*
* @retval ORTE_SUCCESS Upon success
* @retval ORTE_ERROR Upon failures
*
* This function is invoked during orte_init();
*/
ORTE_DECLSPEC int orte_filem_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/*
* cmds for base receive
*/
@ -51,15 +65,6 @@ typedef uint8_t orte_filem_cmd_flag_t;
ORTE_DECLSPEC void orte_filem_base_construct(orte_filem_base_request_t *obj);
ORTE_DECLSPEC void orte_filem_base_destruct( orte_filem_base_request_t *obj);
/**
* Initialize the FILEM MCA framework
*
* @retval ORTE_SUCCESS Upon success
* @retval ORTE_ERROR Upon failures
*
* This function is invoked during orte_init();
*/
ORTE_DECLSPEC int orte_filem_base_open(void);
/**
* Select an available component.
@ -132,6 +137,8 @@ typedef uint8_t orte_filem_cmd_flag_t;
*/
ORTE_DECLSPEC int orte_filem_base_prepare_request(orte_filem_base_request_t *request, int move_type);
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif /* ORTE_FILEM_BASE_H */

Просмотреть файл

@ -29,6 +29,18 @@
#include "orte/mca/filem/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_filem_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Globals
*/
@ -80,3 +92,5 @@ int orte_filem_base_open(void)
return ORTE_SUCCESS;
}
#endif

Просмотреть файл

@ -22,6 +22,11 @@ headers += \
libmca_grpcomm_la_SOURCES += \
base/grpcomm_base_close.c \
base/grpcomm_base_select.c \
base/grpcomm_base_open.c \
base/grpcomm_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
libmca_grpcomm_la_SOURCES += \
base/grpcomm_base_allgather.c \
base/grpcomm_base_modex.c
endif

Просмотреть файл

@ -17,7 +17,14 @@
#
headers += \
base/base.h \
base/base.h
libmca_iof_la_SOURCES += \
base/iof_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
headers += \
base/iof_base_header.h \
base/iof_base_endpoint.h \
base/iof_base_fragment.h \
@ -25,9 +32,10 @@ headers += \
libmca_iof_la_SOURCES += \
base/iof_base_close.c \
base/iof_base_open.c \
base/iof_base_select.c \
base/iof_base_flush.c \
base/iof_base_endpoint.c \
base/iof_base_fragment.c \
base/iof_base_select.c \
base/iof_base_setup.c
endif

Просмотреть файл

@ -41,10 +41,15 @@
#include "opal/class/opal_free_list.h"
#include "opal/threads/condition.h"
#include "opal/mca/mca.h"
#include "orte/mca/iof/iof.h"
BEGIN_C_DECLS
ORTE_DECLSPEC int orte_iof_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
struct orte_iof_base_t {
int iof_output;
opal_list_t iof_components_opened;
@ -61,13 +66,14 @@ typedef struct orte_iof_base_t orte_iof_base_t;
ORTE_DECLSPEC int orte_iof_base_open(void);
ORTE_DECLSPEC int orte_iof_base_close(void);
ORTE_DECLSPEC int orte_iof_base_select(void);
ORTE_DECLSPEC int orte_iof_base_flush(void);
ORTE_DECLSPEC extern orte_iof_base_t orte_iof_base;
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif /* MCA_IOF_BASE_H */

Просмотреть файл

@ -25,16 +25,18 @@
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/show_help.h"
#include "orte/util/name_fns.h"
#include "orte/runtime/orte_globals.h"
#include "orte/util/show_help.h"
#include "orte/mca/iof/iof.h"
#include "orte/mca/iof/base/base.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "orte/mca/iof/base/iof_base_header.h"
#include "orte/mca/iof/base/iof_base_fragment.h"
#include "orte/util/name_fns.h"
#include "orte/runtime/orte_globals.h"
#endif
/*
* The following file was created by configure. It contains extern
@ -44,6 +46,17 @@
#include "orte/mca/iof/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_iof_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Global variables
@ -108,4 +121,4 @@ int orte_iof_base_open(void)
/* All done */
return ORTE_SUCCESS;
}
#endif

Просмотреть файл

@ -16,15 +16,22 @@
# $HEADER$
#
dist_pkgdata_DATA += base/help-orte-odls-base.txt
headers += \
base/odls_private.h \
base/base.h
libmca_odls_la_SOURCES += \
base/odls_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
dist_pkgdata_DATA += base/help-orte-odls-base.txt
headers += \
base/odls_private.h
libmca_odls_la_SOURCES += \
base/odls_base_close.c \
base/odls_base_default_fns.c \
base/odls_base_open.c \
base/odls_base_select.c \
base/odls_base_default_fns.c \
base/odls_base_state.c
endif

Просмотреть файл

@ -32,49 +32,50 @@
#include "orte/mca/odls/odls.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/**
* Struct to hold globals for the odls framework
*/
typedef struct orte_odls_base_t {
/* components are available */
bool components_available;
/* component has been selected */
bool selected;
/** List of opened components */
opal_list_t available_components;
/** selected component */
orte_odls_base_component_t selected_component;
} orte_odls_base_t;
/**
* Global instance of odls-wide framework data
*/
ORTE_DECLSPEC extern orte_odls_base_t orte_odls_base;
/*
* Global functions for MCA overall collective open and close
*/
/**
* Open the odls framework
*/
ORTE_DECLSPEC int orte_odls_base_open(void);
/**
* Select an odls module
*/
ORTE_DECLSPEC int orte_odls_base_select(void);
/**
* Close the odls framework
*/
ORTE_DECLSPEC int orte_odls_base_finalize(void);
ORTE_DECLSPEC int orte_odls_base_close(void);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
BEGIN_C_DECLS
/**
* Open the odls framework
*/
ORTE_DECLSPEC int orte_odls_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/**
* Struct to hold globals for the odls framework
*/
typedef struct orte_odls_base_t {
/* components are available */
bool components_available;
/* component has been selected */
bool selected;
/** List of opened components */
opal_list_t available_components;
/** selected component */
orte_odls_base_component_t selected_component;
} orte_odls_base_t;
/**
* Global instance of odls-wide framework data
*/
ORTE_DECLSPEC extern orte_odls_base_t orte_odls_base;
/*
* Global functions for MCA overall collective open and close
*/
/**
* Select an odls module
*/
ORTE_DECLSPEC int orte_odls_base_select(void);
/**
* Close the odls framework
*/
ORTE_DECLSPEC int orte_odls_base_finalize(void);
ORTE_DECLSPEC int orte_odls_base_close(void);
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif

Просмотреть файл

@ -20,10 +20,10 @@
#include "orte_config.h"
#include "orte/constants.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/show_help.h"
#include "opal/util/trace.h"
#include "opal/util/argv.h"
#include "opal/class/opal_value_array.h"
@ -36,9 +36,12 @@
#include "orte/runtime/orte_globals.h"
#include "orte/util/show_help.h"
#include "orte/mca/odls/base/base.h"
#include "orte/mca/odls/base/odls_private.h"
#endif
#include "orte/mca/odls/base/base.h"
/*
* The following file was created by configure. It contains extern
@ -48,6 +51,18 @@
#include "orte/mca/odls/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_odls_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Instantiate globals
*/
@ -181,3 +196,4 @@ int orte_odls_base_open(void)
return ORTE_SUCCESS;
}
#endif

Просмотреть файл

@ -20,6 +20,11 @@ headers += \
base/base.h
libmca_oob_la_SOURCES += \
base/oob_base_close.c \
base/oob_base_init.c \
base/oob_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
libmca_oob_la_SOURCES += \
base/oob_base_close.c \
base/oob_base_init.c
endif

Просмотреть файл

@ -42,6 +42,10 @@
BEGIN_C_DECLS
ORTE_DECLSPEC int mca_oob_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/*
* global flag for use in timing tests
*/
@ -83,7 +87,6 @@ ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_info_t);
/*
* Global functions for MCA overall collective open and close
*/
ORTE_DECLSPEC int mca_oob_base_open(void);
ORTE_DECLSPEC int mca_oob_base_init(void);
ORTE_DECLSPEC int mca_oob_base_module_init(void);
ORTE_DECLSPEC int mca_oob_base_close(void);
@ -98,6 +101,8 @@ extern char* mca_oob_base_exclude;
ORTE_DECLSPEC extern opal_list_t mca_oob_base_components;
ORTE_DECLSPEC extern opal_list_t mca_oob_base_modules;
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif

Просмотреть файл

@ -23,7 +23,6 @@
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/util/show_help.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/show_help.h"
@ -38,6 +37,17 @@
#include "orte/mca/oob/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int mca_oob_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Global variables
@ -84,3 +94,5 @@ int mca_oob_base_open(void)
return ORTE_SUCCESS;
}
#endif /* ORTE_DISABLE_FULL_SUPPORT */

Просмотреть файл

@ -16,20 +16,26 @@
# $HEADER$
#
dist_pkgdata_DATA += base/help-plm-base.txt
headers += \
base/plm_private.h \
base/base.h
libmca_plm_la_SOURCES += \
base/plm_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
dist_pkgdata_DATA += base/help-plm-base.txt
headers += \
base/plm_private.h
libmca_plm_la_SOURCES += \
base/plm_base_close.c \
base/plm_base_open.c \
base/plm_base_receive.c \
base/plm_base_select.c \
base/plm_base_receive.c \
base/plm_base_launch_support.c \
base/plm_base_jobid.c \
base/plm_base_proxy.c \
base/plm_base_orted_cmds.c \
base/plm_base_heartbeat.c
endif

Просмотреть файл

@ -34,6 +34,13 @@
BEGIN_C_DECLS
/**
* Open the plm framework
*/
ORTE_DECLSPEC int orte_plm_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/**
* Struct to hold data for public access
*/
@ -55,10 +62,6 @@ ORTE_DECLSPEC extern orte_plm_base_t orte_plm_base;
* Global functions for MCA overall collective open and close
*/
/**
* Open the plm framework
*/
ORTE_DECLSPEC int orte_plm_base_open(void);
/**
* Select a plm module
*/
@ -79,6 +82,8 @@ ORTE_DECLSPEC int orte_plm_base_close(void);
ORTE_DECLSPEC void orte_plm_base_app_report_launch(int fd, short event, void *data);
ORTE_DECLSPEC void orte_plm_base_receive_process_msg(int fd, short event, void *data);
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif

Просмотреть файл

@ -23,13 +23,12 @@
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/util/show_help.h"
#include "orte/util/proc_info.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/plm/base/plm_private.h"
#include "orte/mca/plm/base/base.h"
#include "orte/mca/plm/base/plm_private.h"
int orte_plm_base_finalize(void)
{
@ -68,4 +67,3 @@ int orte_plm_base_close(void)
return ORTE_SUCCESS;
}

Просмотреть файл

@ -21,7 +21,8 @@
#include "orte/constants.h"
#include "orte/types.h"
#include "orte/util/show_help.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "opal/util/argv.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
@ -30,9 +31,11 @@
#include "orte/util/show_help.h"
#include "orte/mca/plm/plm.h"
#include "orte/mca/plm/base/base.h"
#include "orte/mca/plm/base/plm_private.h"
#endif
#include "orte/mca/plm/base/base.h"
/*
* The following file was created by configure. It contains extern
@ -42,6 +45,19 @@
#include "orte/mca/plm/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_plm_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Global public variables
*/
@ -100,3 +116,5 @@ int orte_plm_base_open(void)
return ORTE_SUCCESS;
}
#endif

Просмотреть файл

@ -17,17 +17,20 @@
#
headers += \
base/base.h \
base/base.h
libmca_ras_la_SOURCES += \
base/ras_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
headers += \
base/ras_private.h
libmca_ras_la_SOURCES += \
base/ras_base_close.c \
base/ras_base_select.c \
base/ras_base_open.c
if ORTE_DISABLE_FULL_SUPPORT
else
libmca_ras_la_SOURCES += \
base/ras_base_allocate.c \
base/ras_base_node.c
endif

Просмотреть файл

@ -33,6 +33,9 @@
BEGIN_C_DECLS
ORTE_DECLSPEC int orte_ras_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/*
* globals that might be needed
*/
@ -51,11 +54,11 @@ ORTE_DECLSPEC extern orte_ras_base_t orte_ras_base;
/*
* function definitions
*/
ORTE_DECLSPEC int orte_ras_base_open(void);
ORTE_DECLSPEC int orte_ras_base_select(void);
ORTE_DECLSPEC int orte_ras_base_finalize(void);
ORTE_DECLSPEC int orte_ras_base_close(void);
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS

Просмотреть файл

@ -24,48 +24,22 @@
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/util/proc_info.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/ras/base/ras_private.h"
#include "orte/mca/ras/base/base.h"
#include "orte/mca/ras/base/ras_private.h"
int orte_ras_base_finalize(void)
{
#ifdef ORTE_WANT_NO_RAS_SUPPORT
/* some systems require no allocation support - they handle
* the allocation internally themselves. In those cases, memory
* footprint is often a consideration. Hence, we provide a means
* for someone to transparently configure out all RAS support.
*/
return ORTE_SUCCESS;
#else
/* For all other systems, provide the following support */
if (NULL != orte_ras_base.active_module) {
orte_ras_base.active_module->finalize();
}
return ORTE_SUCCESS;
#endif
}
int orte_ras_base_close(void)
{
#ifdef ORTE_WANT_NO_RAS_SUPPORT
/* some systems require no allocation support - they handle
* the allocation internally themselves. In those cases, memory
* footprint is often a consideration. Hence, we provide a means
* for someone to transparently configure out all RAS support.
*/
return ORTE_SUCCESS;
#else
/* For all other systems, provide the following support */
/* Close all remaining available components (may be one if this is a
Open RTE program, or [possibly] multiple if this is ompi_info) */
@ -73,6 +47,4 @@ int orte_ras_base_close(void)
&orte_ras_base.ras_opened, NULL);
return ORTE_SUCCESS;
#endif
}

Просмотреть файл

@ -20,19 +20,16 @@
#include "orte_config.h"
#include "orte/constants.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/show_help.h"
#include "opal/util/os_path.h"
#include "opal/mca/installdirs/installdirs.h"
#include "opal/threads/mutex.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/util/proc_info.h"
#include "orte/util/show_help.h"
#include "orte/mca/ras/base/ras_private.h"
#endif
#include "orte/mca/ras/base/base.h"
@ -49,6 +46,18 @@
#include "orte/mca/ras/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_ras_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Global variables
*/
@ -58,6 +67,7 @@ orte_ras_t orte_ras = {
orte_ras_base_t orte_ras_base;
/**
* Function for finding and opening either all MCA components, or the one
* that was specifically requested via a MCA parameter.
@ -98,3 +108,4 @@ int orte_ras_base_open(void)
return ORTE_SUCCESS;
}
#endif /* ORTE_DISABLE_FULL_SUPPORT */

Просмотреть файл

@ -37,15 +37,6 @@
*/
int orte_ras_base_select(void)
{
#ifdef ORTE_WANT_NO_RAS_SUPPORT
/* some systems require no allocation support - they handle
* the allocation internally themselves. In those cases, memory
* footprint is often a consideration. Hence, we provide a means
* for someone to transparently configure out all RAS support.
*/
return ORTE_SUCCESS;
#else
/* For all other systems, provide the following support */
orte_ras_base_component_t *best_component = NULL;
@ -68,5 +59,4 @@ int orte_ras_base_select(void)
orte_ras_base.active_module = best_module;
return ORTE_SUCCESS;
#endif
}

Просмотреть файл

@ -16,16 +16,23 @@
# $HEADER$
#
headers += \
base/base.h
libmca_rmaps_la_SOURCES += \
base/rmaps_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
dist_pkgdata_DATA = base/help-orte-rmaps-base.txt
headers += \
base/base.h \
base/rmaps_private.h
libmca_rmaps_la_SOURCES += \
base/rmaps_base_close.c \
base/rmaps_base_select.c \
base/rmaps_base_map_job.c \
base/rmaps_base_get_job_map.c \
base/rmaps_base_support_fns.c \
base/rmaps_base_open.c \
base/rmaps_base_select.c
base/rmaps_base_support_fns.c
endif

Просмотреть файл

@ -35,6 +35,13 @@
BEGIN_C_DECLS
/**
* Open the rmaps framework
*/
ORTE_DECLSPEC int orte_rmaps_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/*
* Global functions for MCA overall collective open and close
*/
@ -71,11 +78,6 @@ typedef struct {
*/
ORTE_DECLSPEC extern orte_rmaps_base_t orte_rmaps_base;
/**
* Open the rmaps framework
*/
ORTE_DECLSPEC int orte_rmaps_base_open(void);
/**
* Select an rmaps component / module
*/
@ -95,6 +97,8 @@ ORTE_DECLSPEC int orte_rmaps_base_set_vpid_range(orte_jobid_t jobid,
*/
ORTE_DECLSPEC int orte_rmaps_base_close(void);
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif

Просмотреть файл

@ -21,7 +21,6 @@
#include <stdio.h>
#include "orte/util/show_help.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
@ -34,4 +33,3 @@ int orte_rmaps_base_close(void)
return ORTE_SUCCESS;
}

Просмотреть файл

@ -20,15 +20,19 @@
#include "orte_config.h"
#include "orte/constants.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/show_help.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/util/show_help.h"
#include "orte/mca/rmaps/base/rmaps_private.h"
#endif
#include "orte/mca/rmaps/base/base.h"
@ -40,6 +44,17 @@
#include "orte/mca/rmaps/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_rmaps_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Global variables
@ -160,3 +175,5 @@ int orte_rmaps_base_open(void)
return ORTE_SUCCESS;
}
#endif /* ORTE_DISABLE_FULL_SUPPORT */

Просмотреть файл

@ -21,17 +21,11 @@
#include <string.h>
#include "orte/util/show_help.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/util/name_fns.h"
#include "orte/runtime/orte_globals.h"
#include "orte/mca/rmaps/base/base.h"
/*
* Function for selecting one component from all those that are
* available.

Просмотреть файл

@ -17,10 +17,18 @@
#
headers += \
base/base.h \
base/rml_contact.h
base/base.h
libmca_rml_la_SOURCES += \
base/rml_base_components.c \
base/rml_base_null_fns.c
if !ORTE_DISABLE_FULL_SUPPORT
headers += \
base/rml_contact.h
libmca_rml_la_SOURCES += \
base/rml_base_receive.c \
base/rml_base_contact.c
endif

Просмотреть файл

@ -59,7 +59,6 @@ BEGIN_C_DECLS
*/
ORTE_DECLSPEC int orte_rml_base_open(void);
/**
* Select an active RML component
*
@ -159,6 +158,52 @@ ORTE_DECLSPEC extern orte_rml_component_t *orte_rml_component;
*/
#define RML_SELECT_WRAPPER_PRIORITY -128
/* null functions */
ORTE_DECLSPEC int orte_rml_base_null_send(struct orte_process_name_t* peer,
struct iovec *msg,
int count,
int tag,
int flags);
ORTE_DECLSPEC int orte_rml_base_null_send_nb(struct orte_process_name_t* peer,
struct iovec* msg,
int count,
orte_rml_tag_t tag,
int flags,
orte_rml_callback_fn_t cbfunc,
void* cbdata);
ORTE_DECLSPEC int orte_rml_base_null_send_buffer(struct orte_process_name_t* peer,
struct opal_buffer_t* buffer,
orte_rml_tag_t tag,
int flags);
ORTE_DECLSPEC int orte_rml_base_null_send_buffer_nb(struct orte_process_name_t* peer,
struct opal_buffer_t* buffer,
orte_rml_tag_t tag,
int flags,
orte_rml_buffer_callback_fn_t cbfunc,
void* cbdata);
ORTE_DECLSPEC int orte_rml_base_null_recv(struct orte_process_name_t* peer,
struct iovec *msg,
int count,
orte_rml_tag_t tag,
int flags);
ORTE_DECLSPEC int orte_rml_base_null_recv_nb(struct orte_process_name_t* peer,
struct iovec* msg,
int count,
orte_rml_tag_t tag,
int flags,
orte_rml_callback_fn_t cbfunc,
void* cbdata);
ORTE_DECLSPEC int orte_rml_base_null_recv_buffer(struct orte_process_name_t* peer,
struct opal_buffer_t *buf,
orte_rml_tag_t tag,
int flags);
ORTE_DECLSPEC int orte_rml_base_null_recv_buffer_nb(struct orte_process_name_t* peer,
orte_rml_tag_t tag,
int flags,
orte_rml_buffer_callback_fn_t cbfunc,
void* cbdata);
ORTE_DECLSPEC int orte_rml_base_null_recv_cancel(orte_process_name_t* peer,
orte_rml_tag_t tag);
END_C_DECLS

Просмотреть файл

@ -9,31 +9,51 @@
#include "orte_config.h"
#include "opal/mca/mca.h"
#include "orte/util/show_help.h"
#include "opal/mca/base/mca_base_component_repository.h"
#include "orte/util/show_help.h"
#include "orte/mca/rml/rml.h"
#include "orte/mca/rml/base/base.h"
#if !ORTE_DISABLE_FULL_SUPPORT
#include "orte/util/show_help.h"
#include "orte/mca/errmgr/errmgr.h"
#endif
#include "orte/mca/rml/base/base.h"
/* The following file was created by configure. It contains extern
* statements and the definition of an array of pointers to each
* component's public mca_base_component_t struct. */
#include "orte/mca/rml/base/static-components.h"
orte_rml_module_t orte_rml = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
orte_rml_base_null_send,
orte_rml_base_null_send_nb,
orte_rml_base_null_send_buffer,
orte_rml_base_null_send_buffer_nb,
orte_rml_base_null_recv,
orte_rml_base_null_recv_nb,
orte_rml_base_null_recv_buffer,
orte_rml_base_null_recv_buffer_nb,
orte_rml_base_null_recv_cancel,
NULL,
NULL,
NULL
};
int orte_rml_base_output = -1;
opal_list_t orte_rml_base_subscriptions;
orte_rml_module_t orte_rml = {
NULL,
};
opal_list_t orte_rml_base_components;
orte_rml_component_t *orte_rml_component = NULL;
static bool component_open_called = false;
static bool component_open_called = false;
int
orte_rml_base_open(void)

107
orte/mca/rml/base/rml_base_null_fns.c Обычный файл
Просмотреть файл

@ -0,0 +1,107 @@
/*
* 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-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$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file */
#include "orte_config.h"
#include "orte/constants.h"
#include "orte/types.h"
#include "orte/mca/rml/base/base.h"
int orte_rml_base_null_send(struct orte_process_name_t* peer,
struct iovec *msg,
int count,
int tag,
int flags)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_send_nb(struct orte_process_name_t* peer,
struct iovec* msg,
int count,
orte_rml_tag_t tag,
int flags,
orte_rml_callback_fn_t cbfunc,
void* cbdata)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_send_buffer(struct orte_process_name_t* peer,
struct opal_buffer_t* buffer,
orte_rml_tag_t tag,
int flags)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_send_buffer_nb(struct orte_process_name_t* peer,
struct opal_buffer_t* buffer,
orte_rml_tag_t tag,
int flags,
orte_rml_buffer_callback_fn_t cbfunc,
void* cbdata)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_recv(struct orte_process_name_t* peer,
struct iovec *msg,
int count,
orte_rml_tag_t tag,
int flags)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_recv_nb(struct orte_process_name_t* peer,
struct iovec* msg,
int count,
orte_rml_tag_t tag,
int flags,
orte_rml_callback_fn_t cbfunc,
void* cbdata)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_recv_buffer(struct orte_process_name_t* peer,
struct opal_buffer_t *buf,
orte_rml_tag_t tag,
int flags)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_recv_buffer_nb(struct orte_process_name_t* peer,
orte_rml_tag_t tag,
int flags,
orte_rml_buffer_callback_fn_t cbfunc,
void* cbdata)
{
return ORTE_ERR_NOT_SUPPORTED;
}
int orte_rml_base_null_recv_cancel(orte_process_name_t* peer,
orte_rml_tag_t tag)
{
return ORTE_ERR_NOT_SUPPORTED;
}

Просмотреть файл

@ -12,6 +12,11 @@ headers += \
base/base.h
libmca_routed_la_SOURCES += \
base/routed_base_components.c \
base/routed_base_components.c
if !ORTE_DISABLE_FULL_SUPPORT
libmca_routed_la_SOURCES += \
base/routed_base_register_sync.c \
base/routed_base_receive.c
endif

Просмотреть файл

@ -18,11 +18,14 @@
BEGIN_C_DECLS
ORTE_DECLSPEC int orte_routed_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/*
* Global functions for the ROUTED
*/
ORTE_DECLSPEC int orte_routed_base_open(void);
ORTE_DECLSPEC int orte_routed_base_select(void);
ORTE_DECLSPEC int orte_routed_base_close(void);
@ -38,6 +41,7 @@ ORTE_DECLSPEC extern void orte_routed_base_recv(int status, orte_process_name_t*
opal_buffer_t* buffer, orte_rml_tag_t tag,
void* cbdata);
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS

Просмотреть файл

@ -13,7 +13,6 @@
#include "orte_config.h"
#include "orte/util/show_help.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/mca_base_component_repository.h"
@ -29,6 +28,17 @@
* component's public mca_base_component_t struct. */
#include "orte/mca/routed/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_routed_base_open(void)
{
return ORTE_SUCCESS;
}
#else
int orte_routed_base_output = -1;
orte_routed_module_t orte_routed;
@ -59,7 +69,6 @@ orte_routed_base_open(void)
return ret;
}
int
orte_routed_base_select(void)
{
@ -115,3 +124,5 @@ orte_routed_base_close(void)
return ORTE_SUCCESS;
}
#endif /* ORTE_DISABLE_FULL_SUPPORT */

Просмотреть файл

@ -25,6 +25,7 @@
#include "orte/util/name_fns.h"
#include "orte/runtime/orte_globals.h"
#include "orte/runtime/orte_wait.h"
#include "orte/runtime/runtime.h"
#include "orte/mca/rml/base/rml_contact.h"

Просмотреть файл

@ -24,6 +24,7 @@
#include "orte/util/name_fns.h"
#include "orte/runtime/orte_globals.h"
#include "orte/runtime/orte_wait.h"
#include "orte/runtime/runtime.h"
#include "orte/mca/rml/base/rml_contact.h"

Просмотреть файл

@ -16,14 +16,18 @@
# $HEADER$
#
dist_pkgdata_DATA = base/help-orte-snapc-base.txt
headers += \
base/base.h
libmca_snapc_la_SOURCES += \
base/snapc_base_open.c \
base/snapc_base_open.c
if !ORTE_DISABLE_FULL_SUPPORT
dist_pkgdata_DATA = base/help-orte-snapc-base.txt
libmca_snapc_la_SOURCES += \
base/snapc_base_close.c \
base/snapc_base_select.c \
base/snapc_base_fns.c
endif

Просмотреть файл

@ -23,7 +23,6 @@
#include "orte_config.h"
#include "orte/types.h"
#include "orte/mca/rml/rml.h"
#include "opal/dss/dss.h"
#include "orte/mca/snapc/snapc.h"
@ -34,6 +33,18 @@
BEGIN_C_DECLS
/**
* Initialize the SNAPC MCA framework
*
* @retval ORTE_SUCCESS Upon success
* @retval ORTE_ERROR Upon failures
*
* This function is invoked during orte_init();
*/
ORTE_DECLSPEC int orte_snapc_base_open(void);
#if !ORTE_DISABLE_FULL_SUPPORT
/*
* Commands for command line tool and SnapC interaction
*/
@ -71,16 +82,6 @@ ORTE_DECLSPEC extern orte_snapc_coord_type_t orte_snapc_coord_type;
void orte_snapc_base_global_snapshot_construct(orte_snapc_base_global_snapshot_t *obj);
void orte_snapc_base_global_snapshot_destruct( orte_snapc_base_global_snapshot_t *obj);
/**
* Initialize the SNAPC MCA framework
*
* @retval ORTE_SUCCESS Upon success
* @retval ORTE_ERROR Upon failures
*
* This function is invoked during orte_init();
*/
ORTE_DECLSPEC int orte_snapc_base_open(void);
/**
* Select an available component.
*
@ -166,6 +167,8 @@ ORTE_DECLSPEC extern orte_snapc_coord_type_t orte_snapc_coord_type;
int seq_num,
int ckpt_status);
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS
#endif /* ORTE_SNAPC_BASE_H */

Просмотреть файл

@ -19,10 +19,15 @@
#include "orte_config.h"
#include "orte/constants.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "orte/util/show_help.h"
#include "opal/mca/base/mca_base_param.h"
#include "opal/util/opal_environ.h"
@ -32,6 +37,18 @@
#include "orte/mca/snapc/base/static-components.h"
#if ORTE_DISABLE_FULL_SUPPORT
/* have to include a bogus function here so that
* the build system sees at least one function
* in the library
*/
int orte_snapc_base_open(void)
{
return ORTE_SUCCESS;
}
#else
/*
* Globals
*/
@ -189,3 +206,5 @@ int orte_snapc_base_open(void)
return ORTE_SUCCESS;
}
#endif /* ORTE_DISABLE_FULL_SUPPORT */

Просмотреть файл

@ -19,6 +19,8 @@
# This makefile.am does not stand on its own - it is included from orte/Makefile.am
if !ORTE_DISABLE_FULL_SUPPORT
dist_pkgdata_DATA += orted/help-orted.txt
headers += \
@ -27,4 +29,5 @@ headers += \
libopen_rte_la_SOURCES += \
orted/orted_main.c \
orted/orted_comm.c
endif

Просмотреть файл

@ -22,10 +22,21 @@
dist_pkgdata_DATA += runtime/help-orte-runtime.txt
headers += \
runtime/runtime.h \
runtime/orte_locks.h
libopen_rte_la_SOURCES += \
runtime/orte_finalize.c \
runtime/orte_init.c \
runtime/orte_locks.c \
runtime/orte_mca_params.c
if !ORTE_DISABLE_FULL_SUPPORT
headers += \
runtime/runtime_internals.h \
runtime/orte_wait.h \
runtime/orte_wakeup.h \
runtime/orte_locks.h \
runtime/runtime.h \
runtime/orte_globals.h \
runtime/orte_globals_class_instances.h \
runtime/orte_cr.h \
@ -33,8 +44,6 @@ headers += \
runtime/data_type_support/orte_dt_support.h
libopen_rte_la_SOURCES += \
runtime/orte_finalize.c \
runtime/orte_init.c \
runtime/orte_globals.c \
runtime/data_type_support/orte_dt_compare_fns.c \
runtime/data_type_support/orte_dt_copy_fns.c \
@ -45,8 +54,6 @@ libopen_rte_la_SOURCES += \
runtime/data_type_support/orte_dt_unpacking_fns.c \
runtime/orte_wait.c \
runtime/orte_wakeup.c \
runtime/orte_locks.c \
runtime/orte_cr.c \
runtime/orte_data_server.c \
runtime/orte_mca_params.c
runtime/orte_data_server.c
endif

Просмотреть файл

@ -35,6 +35,7 @@
#include "orte/util/show_help.h"
#include "orte/runtime/runtime.h"
#include "orte/runtime/runtime_internals.h"
#include "orte/runtime/orte_globals.h"
/* need the data type support functions here */
@ -45,18 +46,13 @@
/* globals used by RTE */
bool orte_timing;
bool orte_debug_flag = false;
bool orte_debug_daemons_flag = false;
bool orte_debug_daemons_file_flag = false;
bool orte_do_not_launch = false;
bool orted_spin_flag = false;
bool orte_static_ports = false;
bool orte_keep_fqdn_hostnames = false;
bool orte_help_want_aggregate = true;
bool orte_help_show_recursions;
bool orte_xml_output;
bool orte_params_set = false;
int orte_debug_verbosity;
int orted_debug_failure;
int orted_debug_failure_delay;
@ -79,19 +75,10 @@ char *orte_default_hostfile;
opal_buffer_t *orte_tree_launch_cmd = NULL;
orte_process_name_t orte_globals_name_wildcard = {ORTE_JOBID_WILDCARD, ORTE_VPID_WILDCARD};
orte_process_name_t orte_globals_name_invalid = {ORTE_JOBID_INVALID, ORTE_VPID_INVALID};
/* global arrays for data storage */
opal_pointer_array_t *orte_job_data;
opal_pointer_array_t *orte_node_pool;
/*
* Whether we have completed orte_init or we are in orte_finalize
*/
bool orte_initialized = false;
bool orte_finalizing = false;
int orte_dt_init(void)
{
int rc;

Просмотреть файл

@ -41,7 +41,7 @@
#include "orte/mca/plm/plm_types.h"
#include "orte/mca/rmaps/rmaps_types.h"
#include "orte/util/proc_info.h"
#include "orte/runtime/runtime.h"
#define ORTE_GLOBAL_ARRAY_BLOCK_SIZE 64
#define ORTE_GLOBAL_ARRAY_MAX_SIZE INT_MAX
@ -51,6 +51,25 @@
BEGIN_C_DECLS
ORTE_DECLSPEC extern bool orte_help_want_aggregate;
#define ORTE_PROC_MY_NAME (&orte_process_info.my_name)
/* define a special name that belongs to orterun */
#define ORTE_PROC_MY_HNP (&orte_process_info.my_hnp)
/* define the name of my daemon */
#define ORTE_PROC_MY_DAEMON (&orte_process_info.my_daemon)
/*
* Shortcut for some commonly used names
*/
#define ORTE_NAME_WILDCARD (&orte_name_wildcard)
ORTE_DECLSPEC extern orte_process_name_t orte_name_wildcard; /** instantiated in orte/runtime/orte_init.c */
#define ORTE_NAME_INVALID (&orte_name_invalid)
ORTE_DECLSPEC extern orte_process_name_t orte_name_invalid; /** instantiated in orte/runtime/orte_init.c */
/* global type definitions used by RTE - instanced in orte_globals.c */
/************
@ -287,6 +306,8 @@ typedef struct {
uint8_t node_rank;
} orte_pmap_t;
#if !ORTE_DISABLE_FULL_SUPPORT
/**
* Get a job data object
* We cannot just reference a job data object with its jobid as
@ -297,36 +318,15 @@ typedef struct {
*/
ORTE_DECLSPEC orte_job_t* orte_get_job_data_object(orte_jobid_t job);
/*
* Shortcut for some commonly used names
*/
#define ORTE_NAME_WILDCARD (&orte_globals_name_wildcard)
ORTE_DECLSPEC extern orte_process_name_t orte_globals_name_wildcard; /** instantiated in orte/runtime/orte_globals.c */
#define ORTE_NAME_INVALID (&orte_globals_name_invalid)
ORTE_DECLSPEC extern orte_process_name_t orte_globals_name_invalid; /** instantiated in orte/runtime/orte_globals.c */
#define ORTE_PROC_MY_NAME (&orte_process_info.my_name)
/* define a special name that belongs to orterun */
#define ORTE_PROC_MY_HNP (&orte_process_info.my_hnp)
/* define the name of my daemon */
#define ORTE_PROC_MY_DAEMON (&orte_process_info.my_daemon)
/* global variables used by RTE - instanced in orte_globals.c */
ORTE_DECLSPEC extern bool orte_debug_flag, orte_reuse_daemons, orte_timing;
ORTE_DECLSPEC extern bool orte_reuse_daemons, orte_timing;
ORTE_DECLSPEC extern bool orte_debug_daemons_flag, orte_debug_daemons_file_flag;
ORTE_DECLSPEC extern bool orte_do_not_launch;
ORTE_DECLSPEC extern bool orted_spin_flag;
ORTE_DECLSPEC extern bool orte_static_ports;
ORTE_DECLSPEC extern int32_t orte_contiguous_nodes;
ORTE_DECLSPEC extern int orte_debug_output;
ORTE_DECLSPEC extern bool orte_keep_fqdn_hostnames;
ORTE_DECLSPEC extern bool orte_help_want_aggregate;
ORTE_DECLSPEC extern bool orte_help_show_recursions;
ORTE_DECLSPEC extern bool orte_xml_output;
ORTE_DECLSPEC extern bool orte_params_set;
ORTE_DECLSPEC extern int orte_debug_verbosity;
ORTE_DECLSPEC extern int orted_debug_failure;
ORTE_DECLSPEC extern int orted_debug_failure_delay;
@ -354,11 +354,7 @@ ORTE_DECLSPEC extern opal_buffer_t *orte_tree_launch_cmd;
ORTE_DECLSPEC extern opal_pointer_array_t *orte_job_data;
ORTE_DECLSPEC extern opal_pointer_array_t *orte_node_pool;
/**
* Whether ORTE is initialized or we are in orte_finalize
*/
ORTE_DECLSPEC extern bool orte_initialized;
ORTE_DECLSPEC extern bool orte_finalizing;
#endif /* ORTE_DISABLE_FULL_SUPPORT */
END_C_DECLS

Просмотреть файл

@ -41,11 +41,18 @@
#include "orte/util/proc_info.h"
#include "orte/runtime/runtime.h"
#include "orte/runtime/orte_wait.h"
#include "orte/runtime/orte_globals.h"
#include "orte/runtime/orte_locks.h"
#include "orte/runtime/orte_cr.h"
/*
* Whether we have completed orte_init or we are in orte_finalize
*/
bool orte_initialized = false;
bool orte_finalizing = false;
bool orte_debug_flag = false;
int orte_debug_verbosity;
orte_process_name_t orte_name_wildcard = {ORTE_JOBID_WILDCARD, ORTE_VPID_WILDCARD};
orte_process_name_t orte_name_invalid = {ORTE_JOBID_INVALID, ORTE_VPID_INVALID};
#if OMPI_CC_USE_PRAGMA_IDENT
#pragma ident ORTE_IDENT_STRING
@ -94,44 +101,12 @@ int orte_init(char flags)
/* register handler for errnum -> string conversion */
opal_error_register("ORTE", ORTE_ERR_BASE, ORTE_ERR_MAX, orte_err2str);
/* setup the locks */
if (ORTE_SUCCESS != (ret = orte_locks_init())) {
error = "orte_locks_init";
goto error;
}
/* Initialize the ORTE data type support */
if (ORTE_SUCCESS != (ret = orte_dt_init())) {
error = "orte_dt_init";
goto error;
}
/* Ensure the rest of the process info structure is initialized */
if (ORTE_SUCCESS != (ret = orte_proc_info())) {
error = "orte_proc_info";
goto error;
}
/* if I'm the HNP, make sure that the daemon flag is NOT set so that
* components unique to non-HNP orteds can be selected and init
* my basic storage elements
*/
if (orte_process_info.hnp) {
if (ORTE_SUCCESS != (ret = orte_hnp_globals_init())) {
error = "orte_hnp_globals_init";
goto error;
}
}
/*
* Internal startup
*/
if (ORTE_SUCCESS != (ret = orte_wait_init())) {
ORTE_ERROR_LOG(ret);
error = "orte_wait_init";
goto error;
}
/* open the ESS and select the correct module for this environment */
if (ORTE_SUCCESS != (ret = orte_ess_base_open())) {
ORTE_ERROR_LOG(ret);

Просмотреть файл

@ -33,6 +33,8 @@
#include "orte/runtime/runtime.h"
#include "orte/runtime/orte_globals.h"
static bool orte_params_set=false;
int orte_register_params(void)
{
int value;
@ -41,6 +43,17 @@ int orte_register_params(void)
return ORTE_SUCCESS;
}
mca_base_param_reg_int_name("orte", "base_help_aggregate",
"If orte_base_help_aggregate is true, duplicate help messages will be aggregated rather than displayed individually. This can be helpful for parallel jobs that experience multiple identical failures; rather than print out the same help/failure message N times, display it once with a count of how many processes sent the same message.",
false, false,
(int) true, &value);
orte_help_want_aggregate = OPAL_INT_TO_BOOL(value);
mca_base_param_reg_string_name("orte", "tmpdir_base",
"Base of the session directory tree",
false, false, NULL, &(orte_process_info.tmpdir_base));
#if !ORTE_DISABLE_FULL_SUPPORT
mca_base_param_reg_int_name("orte", "debug",
"Top-level ORTE debug switch (default verbosity: 1)",
false, false, (int)false, &value);
@ -130,29 +143,12 @@ int orte_register_params(void)
"Number of nodes after which contiguous nodename encoding will automatically be used [default: INT_MAX]",
false, false, INT32_MAX, &orte_contiguous_nodes);
mca_base_param_reg_int_name("orte", "base_help_aggregate",
"If orte_base_help_aggregate is true, duplicate help messages will be aggregated rather than displayed individually. This can be helpful for parallel jobs that experience multiple identical failures; rather than print out the same help/failure message N times, display it once with a count of how many processes sent the same message.",
false, false,
(int) orte_help_want_aggregate, &value);
orte_help_want_aggregate = OPAL_INT_TO_BOOL(value);
mca_base_param_reg_int_name("orte", "base_show_output_recursions",
"If orte_base_show_output_recursion is true, recursive calls to opal_output will be reported to stderr",
false, false,
(int) false, &value);
orte_help_show_recursions = OPAL_INT_TO_BOOL(value);
mca_base_param_reg_int_name("orte", "xml_output",
"Display all output in XML format (default: false)",
false, false, (int) false, &value);
orte_xml_output = OPAL_INT_TO_BOOL(value);
/* some params that are accessed elsewhere, but simply registered here so they will
* be visible to ompi_info
*/
mca_base_param_reg_string_name("orte", "tmpdir_base",
"Base of the session directory tree",
false, false, NULL, &(orte_process_info.tmpdir_base));
#endif /* ORTE_DISABLE_FULL_SUPPORT */
/* All done */
orte_params_set = true;

Просмотреть файл

@ -34,13 +34,19 @@
#include "opal/util/cmd_line.h"
#include "orte/runtime/orte_globals.h"
BEGIN_C_DECLS
/** version string of ompi */
ORTE_DECLSPEC extern const char orte_version_string[];
/**
* Whether ORTE is initialized or we are in orte_finalize
*/
ORTE_DECLSPEC extern bool orte_initialized;
ORTE_DECLSPEC extern bool orte_finalizing;
ORTE_DECLSPEC extern int orte_debug_output;
ORTE_DECLSPEC extern bool orte_debug_flag;
/* some convenience definitions for code clarity */
#define ORTE_NON_TOOL 0x00
#define ORTE_TOOL 0x01
@ -67,16 +73,6 @@ ORTE_DECLSPEC int orte_init(char flags);
*/
ORTE_DECLSPEC int orte_register_params(void);
/**
* Initialize global storage for HNPs
*/
ORTE_DECLSPEC int orte_hnp_globals_init(void);
/**
* Init the ORTE datatype support
*/
ORTE_DECLSPEC int orte_dt_init(void);
/**
* Finalize the Open run time environment. Any function calling \code
* orte_init should call \code orte_finalize.

45
orte/runtime/runtime_internals.h Обычный файл
Просмотреть файл

@ -0,0 +1,45 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 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) 2007-2008 Sun Microsystems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file
*
* Interface into the Open MPI Run Time Environment
*/
#ifndef ORTE_RUNTIME_INTERNALS_H
#define ORTE_RUNTIME_INTERNALS_H
#include "orte_config.h"
BEGIN_C_DECLS
/**
* Initialize global storage for HNPs
*/
ORTE_DECLSPEC int orte_hnp_globals_init(void);
/**
* Init the ORTE datatype support
*/
ORTE_DECLSPEC int orte_dt_init(void);
END_C_DECLS
#endif /* ORTE_RUNTIME_INTERNALS_H */

Просмотреть файл

@ -20,6 +20,14 @@
# This makefile.am does not stand on its own - it is included from orte/Makefile.am
SUBDIRS += \
tools/wrappers
DIST_SUBDIRS += \
tools/wrappers
if !ORTE_DISABLE_FULL_SUPPORT
SUBDIRS += \
tools/orted \
tools/orterun \
@ -41,3 +49,4 @@ SUBDIRS += \
tools/orte-checkpoint \
tools/orte-restart
endif
endif

Просмотреть файл

@ -25,33 +25,39 @@ AM_LFLAGS = -Porte_util_hostfile_
LEX_OUTPUT_ROOT = lex.orte_util_hostfile_
headers += \
util/context_fns.h \
util/name_fns.h \
util/pre_condition_transports.h \
util/proc_info.h \
util/session_dir.h \
util/show_help.h
libopen_rte_la_SOURCES += \
util/error_strings.c \
util/name_fns.c \
util/proc_info.c \
util/session_dir.c \
util/show_help.c
if !ORTE_DISABLE_FULL_SUPPORT
headers += \
util/context_fns.h \
util/pre_condition_transports.h \
util/hnp_contact.h \
util/hostfile/hostfile.h \
util/hostfile/hostfile_lex.h \
util/dash_host/dash_host.h \
util/comm/comm.h \
util/nidmap.h \
util/show_help.h \
util/totalview.h
libopen_rte_la_SOURCES += \
util/error_strings.c \
util/context_fns.c \
util/name_fns.c \
util/pre_condition_transports.c \
util/proc_info.c \
util/session_dir.c \
util/hnp_contact.c \
util/hostfile/hostfile_lex.l \
util/hostfile/hostfile.c \
util/dash_host/dash_host.c \
util/comm/comm.c \
util/nidmap.c \
util/show_help.c \
util/totalview.c
endif

Просмотреть файл

@ -31,11 +31,8 @@
#include "opal/mca/base/base.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/show_help.h"
#include "opal/util/arch.h"
#include "orte/runtime/orte_globals.h"
#include "orte/util/proc_info.h"
ORTE_DECLSPEC orte_proc_info_t orte_process_info = {
@ -119,11 +116,6 @@ int orte_proc_info(void)
"Daemon contact info",
true, false, NULL, &(orte_process_info.my_daemon_uri));
OPAL_OUTPUT_VERBOSE((1, orte_debug_output,
"proc_info: hnp_uri %s\n\tdaemon uri %s",
(NULL == orte_process_info.my_hnp_uri) ? "NULL" : orte_process_info.my_hnp_uri,
(NULL == orte_process_info.my_daemon_uri) ? "NULL" : orte_process_info.my_daemon_uri));
mca_base_param_reg_int_name("orte", "app_num",
"Index of the app_context that defines this proc",
true, false, -1, &tmp);
@ -144,7 +136,7 @@ int orte_proc_info(void)
/* get the arch */
if (ORTE_SUCCESS != opal_arch_compute_local_id(&orte_process_info.arch)) {
opal_output(0, "Process on node %s could not obtain local architecture - aborting", orte_process_info.nodename);
exit(ORTE_ERROR_DEFAULT_EXIT_CODE);
return ORTE_ERROR;
}
/* setup the sync buffer */

Просмотреть файл

@ -36,6 +36,7 @@
#include "orte/util/show_help.h"
bool orte_help_want_aggregate;
/************************************************************************/

Просмотреть файл

@ -70,9 +70,7 @@ ORTE_DECLSPEC void orte_show_help_finalize(void);
ORTE_DECLSPEC int orte_show_help(const char *filename, const char *topic,
bool want_error_header, ...);
#if ORTE_DISABLE_FULL_SUPPORT
#else
#if !ORTE_DISABLE_FULL_SUPPORT
ORTE_DECLSPEC void orte_show_help_recv(int status, orte_process_name_t* sender,
opal_buffer_t *buffer, orte_rml_tag_t tag,

Просмотреть файл

@ -74,13 +74,13 @@
#define MPIR_DEBUG_SPAWNED 1
#define MPIR_DEBUG_ABORTING 2
struct MPIR_PROCDESC *MPIR_proctable = NULL;
int MPIR_proctable_size = 0;
int MPIR_being_debugged = 0;
int MPIR_force_to_main = 0;
volatile int MPIR_debug_state = 0;
volatile int MPIR_i_am_starter = 0;
volatile int MPIR_debug_gate = 0;
volatile int MPIR_acquired_pre_main = 0;
/* --- end MPICH/TotalView interface definitions */
@ -93,7 +93,6 @@ static void dump(void)
int i;
DUMP_INT(MPIR_being_debugged);
DUMP_INT(MPIR_debug_gate);
DUMP_INT(MPIR_debug_state);
DUMP_INT(MPIR_acquired_pre_main);
DUMP_INT(MPIR_i_am_starter);
@ -377,7 +376,7 @@ void orte_totalview_init_before_spawn(void)
opal_output(0, "Info: Spawned by a debugger");
}
if (mca_base_param_reg_int_name("orte", "mpi_wait_for_totalview",
if (mca_base_param_reg_int_name("ompi", "mpi_wait_for_totalview",
"Whether the MPI application should wait for a debugger or not",
false, false, (int)false, &value) < 0) {
opal_output(0, "Error: mca_base_param_reg_int_name\n");
@ -385,7 +384,7 @@ void orte_totalview_init_before_spawn(void)
/* push mca parameter into the environment (not done automatically?) */
s = mca_base_param_environ_variable("orte", "mpi_wait_for_totalview", NULL);
s = mca_base_param_environ_variable("ompi", "mpi_wait_for_totalview", NULL);
if (ORTE_SUCCESS != opal_setenv(s, "1", true, &environ)) {
opal_output(0, "Error: Can't setenv %s\n", s);
}

Просмотреть файл

@ -22,6 +22,7 @@
#include "orte_config.h"
BEGIN_C_DECLS
ORTE_DECLSPEC void orte_run_debugger(char *basename, opal_cmd_line_t *cmd_line,
@ -42,7 +43,6 @@ ORTE_DECLSPEC extern struct MPIR_PROCDESC *MPIR_proctable;
ORTE_DECLSPEC extern int MPIR_proctable_size;
ORTE_DECLSPEC extern int MPIR_being_debugged;
ORTE_DECLSPEC extern volatile int MPIR_debug_state;
ORTE_DECLSPEC extern volatile int MPIR_debug_gate;
END_C_DECLS