2004-06-29 04:02:25 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* 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.
|
2004-11-28 23:09:25 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2007-10-09 19:18:23 +04:00
|
|
|
* Copyright (c) 2007 Lawrence Livermore National Security, LLC. All
|
|
|
|
* rights reserved.
|
2008-05-20 01:34:01 +04:00
|
|
|
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-06-29 04:02:25 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "mpi.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "ompi/communicator/communicator.h"
|
2005-07-04 04:13:44 +04:00
|
|
|
#include "opal/util/argv.h"
|
This commit represents a bunch of work on a Mercurial side branch. As
such, the commit message back to the master SVN repository is fairly
long.
= ORTE Job-Level Output Messages =
Add two new interfaces that should be used for all new code throughout
the ORTE and OMPI layers (we already make the search-and-replace on
the existing ORTE / OMPI layers):
* orte_output(): (and corresponding friends ORTE_OUTPUT,
orte_output_verbose, etc.) This function sends the output directly
to the HNP for processing as part of a job-specific output
channel. It supports all the same outputs as opal_output()
(syslog, file, stdout, stderr), but for stdout/stderr, the output
is sent to the HNP for processing and output. More on this below.
* orte_show_help(): This function is a drop-in-replacement for
opal_show_help(), with two differences in functionality:
1. the rendered text help message output is sent to the HNP for
display (rather than outputting directly into the process' stderr
stream)
1. the HNP detects duplicate help messages and does not display them
(so that you don't see the same error message N times, once from
each of your N MPI processes); instead, it counts "new" instances
of the help message and displays a message every ~5 seconds when
there are new ones ("I got X new copies of the help message...")
opal_show_help and opal_output still exist, but they only output in
the current process. The intent for the new orte_* functions is that
they can apply job-level intelligence to the output. As such, we
recommend that all new ORTE and OMPI code use the new orte_*
functions, not thei opal_* functions.
=== New code ===
For ORTE and OMPI programmers, here's what you need to do differently
in new code:
* Do not include opal/util/show_help.h or opal/util/output.h.
Instead, include orte/util/output.h (this one header file has
declarations for both the orte_output() series of functions and
orte_show_help()).
* Effectively s/opal_output/orte_output/gi throughout your code.
Note that orte_output_open() takes a slightly different argument
list (as a way to pass data to the filtering stream -- see below),
so you if explicitly call opal_output_open(), you'll need to
slightly adapt to the new signature of orte_output_open().
* Literally s/opal_show_help/orte_show_help/. The function signature
is identical.
=== Notes ===
* orte_output'ing to stream 0 will do similar to what
opal_output'ing did, so leaving a hard-coded "0" as the first
argument is safe.
* For systems that do not use ORTE's RML or the HNP, the effect of
orte_output_* and orte_show_help will be identical to their opal
counterparts (the additional information passed to
orte_output_open() will be lost!). Indeed, the orte_* functions
simply become trivial wrappers to their opal_* counterparts. Note
that we have not tested this; the code is simple but it is quite
possible that we mucked something up.
= Filter Framework =
Messages sent view the new orte_* functions described above and
messages output via the IOF on the HNP will now optionally be passed
through a new "filter" framework before being output to
stdout/stderr. The "filter" OPAL MCA framework is intended to allow
preprocessing to messages before they are sent to their final
destinations. The first component that was written in the filter
framework was to create an XML stream, segregating all the messages
into different XML tags, etc. This will allow 3rd party tools to read
the stdout/stderr from the HNP and be able to know exactly what each
text message is (e.g., a help message, another OMPI infrastructure
message, stdout from the user process, stderr from the user process,
etc.).
Filtering is not active by default. Filter components must be
specifically requested, such as:
{{{
$ mpirun --mca filter xml ...
}}}
There can only be one filter component active.
= New MCA Parameters =
The new functionality described above introduces two new MCA
parameters:
* '''orte_base_help_aggregate''': Defaults to 1 (true), meaning that
help messages will be aggregated, as described above. If set to 0,
all help messages will be displayed, even if they are duplicates
(i.e., the original behavior).
* '''orte_base_show_output_recursions''': An MCA parameter to help
debug one of the known issues, described below. It is likely that
this MCA parameter will disappear before v1.3 final.
= Known Issues =
* The XML filter component is not complete. The current output from
this component is preliminary and not real XML. A bit more work
needs to be done to configure.m4 search for an appropriate XML
library/link it in/use it at run time.
* There are possible recursion loops in the orte_output() and
orte_show_help() functions -- e.g., if RML send calls orte_output()
or orte_show_help(). We have some ideas how to fix these, but
figured that it was ok to commit before feature freeze with known
issues. The code currently contains sub-optimal workarounds so
that this will not be a problem, but it would be good to actually
solve the problem rather than have hackish workarounds before v1.3 final.
This commit was SVN r18434.
2008-05-14 00:00:55 +04:00
|
|
|
#include "orte/util/output.h"
|
2005-07-03 20:22:16 +04:00
|
|
|
#include "opal/class/opal_list.h"
|
2005-07-03 20:06:07 +04:00
|
|
|
#include "opal/class/opal_object.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "ompi/mca/coll/coll.h"
|
|
|
|
#include "ompi/mca/coll/base/base.h"
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local types
|
|
|
|
*/
|
|
|
|
struct avail_coll_t {
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_item_t super;
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2005-01-30 21:42:37 +03:00
|
|
|
int ac_priority;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_1_1_0_t *ac_module;
|
2004-06-29 04:02:25 +04:00
|
|
|
};
|
|
|
|
typedef struct avail_coll_t avail_coll_t;
|
|
|
|
|
2005-01-30 21:42:37 +03:00
|
|
|
|
2004-06-29 04:02:25 +04:00
|
|
|
/*
|
|
|
|
* Local functions
|
|
|
|
*/
|
2005-07-03 20:22:16 +04:00
|
|
|
static opal_list_t *check_components(opal_list_t *components,
|
2004-06-29 04:02:25 +04:00
|
|
|
ompi_communicator_t *comm,
|
|
|
|
char **names, int num_names);
|
|
|
|
static int check_one_component(ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t *component,
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_1_1_0_t **module);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
static int query(const mca_base_component_t *component,
|
2004-06-29 04:02:25 +04:00
|
|
|
ompi_communicator_t *comm, int *priority,
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_1_1_0_t **module);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
static int query_1_1_0(const mca_coll_base_component_1_1_0_t *coll_component,
|
|
|
|
ompi_communicator_t *comm, int *priority,
|
|
|
|
mca_coll_base_module_1_1_0_t **module);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Stuff for the OBJ interface
|
|
|
|
*/
|
2005-07-03 20:22:16 +04:00
|
|
|
static OBJ_CLASS_INSTANCE(avail_coll_t, opal_list_item_t, NULL, NULL);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
#define COPY(module, comm, func) \
|
|
|
|
do { \
|
|
|
|
if (NULL != module->coll_ ## func) { \
|
|
|
|
if (NULL != comm->c_coll.coll_ ## func ## _module) { \
|
|
|
|
OBJ_RELEASE(comm->c_coll.coll_ ## func ## _module); \
|
|
|
|
} \
|
|
|
|
comm->c_coll.coll_ ## func = module->coll_ ## func; \
|
|
|
|
comm->c_coll.coll_ ## func ## _module = module; \
|
|
|
|
OBJ_RETAIN(module); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2004-06-29 04:02:25 +04:00
|
|
|
/*
|
|
|
|
* This function is called at the initialization time of every
|
|
|
|
* communicator. It is used to select which coll component will be
|
|
|
|
* active for a given communicator.
|
|
|
|
*
|
|
|
|
* This selection logic is not for the weak.
|
|
|
|
*/
|
2007-08-19 07:37:49 +04:00
|
|
|
int mca_coll_base_comm_select(ompi_communicator_t *comm)
|
2004-06-29 04:02:25 +04:00
|
|
|
{
|
2007-08-19 07:37:49 +04:00
|
|
|
int ret, num_names;
|
|
|
|
char name[MPI_MAX_OBJECT_NAME + 32];
|
|
|
|
char *names, **name_array;
|
|
|
|
opal_list_t *selectable;
|
|
|
|
opal_list_item_t *item;
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/* Announce */
|
|
|
|
snprintf(name, sizeof(name), "%s (cid %d)", comm->c_name,
|
|
|
|
comm->c_contextid);
|
|
|
|
name[sizeof(name) - 1] = '\0';
|
This commit represents a bunch of work on a Mercurial side branch. As
such, the commit message back to the master SVN repository is fairly
long.
= ORTE Job-Level Output Messages =
Add two new interfaces that should be used for all new code throughout
the ORTE and OMPI layers (we already make the search-and-replace on
the existing ORTE / OMPI layers):
* orte_output(): (and corresponding friends ORTE_OUTPUT,
orte_output_verbose, etc.) This function sends the output directly
to the HNP for processing as part of a job-specific output
channel. It supports all the same outputs as opal_output()
(syslog, file, stdout, stderr), but for stdout/stderr, the output
is sent to the HNP for processing and output. More on this below.
* orte_show_help(): This function is a drop-in-replacement for
opal_show_help(), with two differences in functionality:
1. the rendered text help message output is sent to the HNP for
display (rather than outputting directly into the process' stderr
stream)
1. the HNP detects duplicate help messages and does not display them
(so that you don't see the same error message N times, once from
each of your N MPI processes); instead, it counts "new" instances
of the help message and displays a message every ~5 seconds when
there are new ones ("I got X new copies of the help message...")
opal_show_help and opal_output still exist, but they only output in
the current process. The intent for the new orte_* functions is that
they can apply job-level intelligence to the output. As such, we
recommend that all new ORTE and OMPI code use the new orte_*
functions, not thei opal_* functions.
=== New code ===
For ORTE and OMPI programmers, here's what you need to do differently
in new code:
* Do not include opal/util/show_help.h or opal/util/output.h.
Instead, include orte/util/output.h (this one header file has
declarations for both the orte_output() series of functions and
orte_show_help()).
* Effectively s/opal_output/orte_output/gi throughout your code.
Note that orte_output_open() takes a slightly different argument
list (as a way to pass data to the filtering stream -- see below),
so you if explicitly call opal_output_open(), you'll need to
slightly adapt to the new signature of orte_output_open().
* Literally s/opal_show_help/orte_show_help/. The function signature
is identical.
=== Notes ===
* orte_output'ing to stream 0 will do similar to what
opal_output'ing did, so leaving a hard-coded "0" as the first
argument is safe.
* For systems that do not use ORTE's RML or the HNP, the effect of
orte_output_* and orte_show_help will be identical to their opal
counterparts (the additional information passed to
orte_output_open() will be lost!). Indeed, the orte_* functions
simply become trivial wrappers to their opal_* counterparts. Note
that we have not tested this; the code is simple but it is quite
possible that we mucked something up.
= Filter Framework =
Messages sent view the new orte_* functions described above and
messages output via the IOF on the HNP will now optionally be passed
through a new "filter" framework before being output to
stdout/stderr. The "filter" OPAL MCA framework is intended to allow
preprocessing to messages before they are sent to their final
destinations. The first component that was written in the filter
framework was to create an XML stream, segregating all the messages
into different XML tags, etc. This will allow 3rd party tools to read
the stdout/stderr from the HNP and be able to know exactly what each
text message is (e.g., a help message, another OMPI infrastructure
message, stdout from the user process, stderr from the user process,
etc.).
Filtering is not active by default. Filter components must be
specifically requested, such as:
{{{
$ mpirun --mca filter xml ...
}}}
There can only be one filter component active.
= New MCA Parameters =
The new functionality described above introduces two new MCA
parameters:
* '''orte_base_help_aggregate''': Defaults to 1 (true), meaning that
help messages will be aggregated, as described above. If set to 0,
all help messages will be displayed, even if they are duplicates
(i.e., the original behavior).
* '''orte_base_show_output_recursions''': An MCA parameter to help
debug one of the known issues, described below. It is likely that
this MCA parameter will disappear before v1.3 final.
= Known Issues =
* The XML filter component is not complete. The current output from
this component is preliminary and not real XML. A bit more work
needs to be done to configure.m4 search for an appropriate XML
library/link it in/use it at run time.
* There are possible recursion loops in the orte_output() and
orte_show_help() functions -- e.g., if RML send calls orte_output()
or orte_show_help(). We have some ideas how to fix these, but
figured that it was ok to commit before feature freeze with known
issues. The code currently contains sub-optimal workarounds so
that this will not be a problem, but it would be good to actually
solve the problem rather than have hackish workarounds before v1.3 final.
This commit was SVN r18434.
2008-05-14 00:00:55 +04:00
|
|
|
orte_output_verbose(10, mca_coll_base_output,
|
2004-06-29 04:02:25 +04:00
|
|
|
"coll:base:comm_select: new communicator: %s",
|
|
|
|
name);
|
|
|
|
|
|
|
|
/* Initialize all the relevant pointers, since they're used as
|
|
|
|
sentinel values */
|
2007-08-19 07:37:49 +04:00
|
|
|
memset(&comm->c_coll, 0, sizeof(mca_coll_base_comm_coll_t));
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/* See if a set of component was requested by the MCA parameter.
|
|
|
|
Don't check for error. */
|
|
|
|
names = NULL;
|
|
|
|
mca_base_param_lookup_string(mca_coll_base_param, &names);
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
if (NULL != names && 0 < strlen(names)) {
|
|
|
|
/* mca param based */
|
2005-07-04 04:13:44 +04:00
|
|
|
name_array = opal_argv_split(names, ',');
|
|
|
|
num_names = opal_argv_count(name_array);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
This commit represents a bunch of work on a Mercurial side branch. As
such, the commit message back to the master SVN repository is fairly
long.
= ORTE Job-Level Output Messages =
Add two new interfaces that should be used for all new code throughout
the ORTE and OMPI layers (we already make the search-and-replace on
the existing ORTE / OMPI layers):
* orte_output(): (and corresponding friends ORTE_OUTPUT,
orte_output_verbose, etc.) This function sends the output directly
to the HNP for processing as part of a job-specific output
channel. It supports all the same outputs as opal_output()
(syslog, file, stdout, stderr), but for stdout/stderr, the output
is sent to the HNP for processing and output. More on this below.
* orte_show_help(): This function is a drop-in-replacement for
opal_show_help(), with two differences in functionality:
1. the rendered text help message output is sent to the HNP for
display (rather than outputting directly into the process' stderr
stream)
1. the HNP detects duplicate help messages and does not display them
(so that you don't see the same error message N times, once from
each of your N MPI processes); instead, it counts "new" instances
of the help message and displays a message every ~5 seconds when
there are new ones ("I got X new copies of the help message...")
opal_show_help and opal_output still exist, but they only output in
the current process. The intent for the new orte_* functions is that
they can apply job-level intelligence to the output. As such, we
recommend that all new ORTE and OMPI code use the new orte_*
functions, not thei opal_* functions.
=== New code ===
For ORTE and OMPI programmers, here's what you need to do differently
in new code:
* Do not include opal/util/show_help.h or opal/util/output.h.
Instead, include orte/util/output.h (this one header file has
declarations for both the orte_output() series of functions and
orte_show_help()).
* Effectively s/opal_output/orte_output/gi throughout your code.
Note that orte_output_open() takes a slightly different argument
list (as a way to pass data to the filtering stream -- see below),
so you if explicitly call opal_output_open(), you'll need to
slightly adapt to the new signature of orte_output_open().
* Literally s/opal_show_help/orte_show_help/. The function signature
is identical.
=== Notes ===
* orte_output'ing to stream 0 will do similar to what
opal_output'ing did, so leaving a hard-coded "0" as the first
argument is safe.
* For systems that do not use ORTE's RML or the HNP, the effect of
orte_output_* and orte_show_help will be identical to their opal
counterparts (the additional information passed to
orte_output_open() will be lost!). Indeed, the orte_* functions
simply become trivial wrappers to their opal_* counterparts. Note
that we have not tested this; the code is simple but it is quite
possible that we mucked something up.
= Filter Framework =
Messages sent view the new orte_* functions described above and
messages output via the IOF on the HNP will now optionally be passed
through a new "filter" framework before being output to
stdout/stderr. The "filter" OPAL MCA framework is intended to allow
preprocessing to messages before they are sent to their final
destinations. The first component that was written in the filter
framework was to create an XML stream, segregating all the messages
into different XML tags, etc. This will allow 3rd party tools to read
the stdout/stderr from the HNP and be able to know exactly what each
text message is (e.g., a help message, another OMPI infrastructure
message, stdout from the user process, stderr from the user process,
etc.).
Filtering is not active by default. Filter components must be
specifically requested, such as:
{{{
$ mpirun --mca filter xml ...
}}}
There can only be one filter component active.
= New MCA Parameters =
The new functionality described above introduces two new MCA
parameters:
* '''orte_base_help_aggregate''': Defaults to 1 (true), meaning that
help messages will be aggregated, as described above. If set to 0,
all help messages will be displayed, even if they are duplicates
(i.e., the original behavior).
* '''orte_base_show_output_recursions''': An MCA parameter to help
debug one of the known issues, described below. It is likely that
this MCA parameter will disappear before v1.3 final.
= Known Issues =
* The XML filter component is not complete. The current output from
this component is preliminary and not real XML. A bit more work
needs to be done to configure.m4 search for an appropriate XML
library/link it in/use it at run time.
* There are possible recursion loops in the orte_output() and
orte_show_help() functions -- e.g., if RML send calls orte_output()
or orte_show_help(). We have some ideas how to fix these, but
figured that it was ok to commit before feature freeze with known
issues. The code currently contains sub-optimal workarounds so
that this will not be a problem, but it would be good to actually
solve the problem rather than have hackish workarounds before v1.3 final.
This commit was SVN r18434.
2008-05-14 00:00:55 +04:00
|
|
|
orte_output_verbose(10, mca_coll_base_output,
|
2004-06-29 04:02:25 +04:00
|
|
|
"coll:base:comm_select: Checking specific modules: %s",
|
|
|
|
names);
|
|
|
|
selectable = check_components(&mca_coll_base_components_available,
|
|
|
|
comm, name_array, num_names);
|
2005-07-04 04:13:44 +04:00
|
|
|
opal_argv_free(name_array);
|
2007-08-19 07:37:49 +04:00
|
|
|
} else {
|
|
|
|
/* no specific components given -- try all */
|
This commit represents a bunch of work on a Mercurial side branch. As
such, the commit message back to the master SVN repository is fairly
long.
= ORTE Job-Level Output Messages =
Add two new interfaces that should be used for all new code throughout
the ORTE and OMPI layers (we already make the search-and-replace on
the existing ORTE / OMPI layers):
* orte_output(): (and corresponding friends ORTE_OUTPUT,
orte_output_verbose, etc.) This function sends the output directly
to the HNP for processing as part of a job-specific output
channel. It supports all the same outputs as opal_output()
(syslog, file, stdout, stderr), but for stdout/stderr, the output
is sent to the HNP for processing and output. More on this below.
* orte_show_help(): This function is a drop-in-replacement for
opal_show_help(), with two differences in functionality:
1. the rendered text help message output is sent to the HNP for
display (rather than outputting directly into the process' stderr
stream)
1. the HNP detects duplicate help messages and does not display them
(so that you don't see the same error message N times, once from
each of your N MPI processes); instead, it counts "new" instances
of the help message and displays a message every ~5 seconds when
there are new ones ("I got X new copies of the help message...")
opal_show_help and opal_output still exist, but they only output in
the current process. The intent for the new orte_* functions is that
they can apply job-level intelligence to the output. As such, we
recommend that all new ORTE and OMPI code use the new orte_*
functions, not thei opal_* functions.
=== New code ===
For ORTE and OMPI programmers, here's what you need to do differently
in new code:
* Do not include opal/util/show_help.h or opal/util/output.h.
Instead, include orte/util/output.h (this one header file has
declarations for both the orte_output() series of functions and
orte_show_help()).
* Effectively s/opal_output/orte_output/gi throughout your code.
Note that orte_output_open() takes a slightly different argument
list (as a way to pass data to the filtering stream -- see below),
so you if explicitly call opal_output_open(), you'll need to
slightly adapt to the new signature of orte_output_open().
* Literally s/opal_show_help/orte_show_help/. The function signature
is identical.
=== Notes ===
* orte_output'ing to stream 0 will do similar to what
opal_output'ing did, so leaving a hard-coded "0" as the first
argument is safe.
* For systems that do not use ORTE's RML or the HNP, the effect of
orte_output_* and orte_show_help will be identical to their opal
counterparts (the additional information passed to
orte_output_open() will be lost!). Indeed, the orte_* functions
simply become trivial wrappers to their opal_* counterparts. Note
that we have not tested this; the code is simple but it is quite
possible that we mucked something up.
= Filter Framework =
Messages sent view the new orte_* functions described above and
messages output via the IOF on the HNP will now optionally be passed
through a new "filter" framework before being output to
stdout/stderr. The "filter" OPAL MCA framework is intended to allow
preprocessing to messages before they are sent to their final
destinations. The first component that was written in the filter
framework was to create an XML stream, segregating all the messages
into different XML tags, etc. This will allow 3rd party tools to read
the stdout/stderr from the HNP and be able to know exactly what each
text message is (e.g., a help message, another OMPI infrastructure
message, stdout from the user process, stderr from the user process,
etc.).
Filtering is not active by default. Filter components must be
specifically requested, such as:
{{{
$ mpirun --mca filter xml ...
}}}
There can only be one filter component active.
= New MCA Parameters =
The new functionality described above introduces two new MCA
parameters:
* '''orte_base_help_aggregate''': Defaults to 1 (true), meaning that
help messages will be aggregated, as described above. If set to 0,
all help messages will be displayed, even if they are duplicates
(i.e., the original behavior).
* '''orte_base_show_output_recursions''': An MCA parameter to help
debug one of the known issues, described below. It is likely that
this MCA parameter will disappear before v1.3 final.
= Known Issues =
* The XML filter component is not complete. The current output from
this component is preliminary and not real XML. A bit more work
needs to be done to configure.m4 search for an appropriate XML
library/link it in/use it at run time.
* There are possible recursion loops in the orte_output() and
orte_show_help() functions -- e.g., if RML send calls orte_output()
or orte_show_help(). We have some ideas how to fix these, but
figured that it was ok to commit before feature freeze with known
issues. The code currently contains sub-optimal workarounds so
that this will not be a problem, but it would be good to actually
solve the problem rather than have hackish workarounds before v1.3 final.
This commit was SVN r18434.
2008-05-14 00:00:55 +04:00
|
|
|
orte_output_verbose(10, mca_coll_base_output,
|
2004-06-29 04:02:25 +04:00
|
|
|
"coll:base:comm_select: Checking all available modules");
|
|
|
|
selectable = check_components(&mca_coll_base_components_available,
|
|
|
|
comm, NULL, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Upon return from the above, the modules list will contain the
|
|
|
|
list of modules that returned (priority >= 0). If we have no
|
2008-05-20 01:34:01 +04:00
|
|
|
collective modules available, then print error and return. */
|
2004-06-29 04:02:25 +04:00
|
|
|
if (NULL == selectable) {
|
2007-08-19 07:37:49 +04:00
|
|
|
/* There's no modules available */
|
This commit represents a bunch of work on a Mercurial side branch. As
such, the commit message back to the master SVN repository is fairly
long.
= ORTE Job-Level Output Messages =
Add two new interfaces that should be used for all new code throughout
the ORTE and OMPI layers (we already make the search-and-replace on
the existing ORTE / OMPI layers):
* orte_output(): (and corresponding friends ORTE_OUTPUT,
orte_output_verbose, etc.) This function sends the output directly
to the HNP for processing as part of a job-specific output
channel. It supports all the same outputs as opal_output()
(syslog, file, stdout, stderr), but for stdout/stderr, the output
is sent to the HNP for processing and output. More on this below.
* orte_show_help(): This function is a drop-in-replacement for
opal_show_help(), with two differences in functionality:
1. the rendered text help message output is sent to the HNP for
display (rather than outputting directly into the process' stderr
stream)
1. the HNP detects duplicate help messages and does not display them
(so that you don't see the same error message N times, once from
each of your N MPI processes); instead, it counts "new" instances
of the help message and displays a message every ~5 seconds when
there are new ones ("I got X new copies of the help message...")
opal_show_help and opal_output still exist, but they only output in
the current process. The intent for the new orte_* functions is that
they can apply job-level intelligence to the output. As such, we
recommend that all new ORTE and OMPI code use the new orte_*
functions, not thei opal_* functions.
=== New code ===
For ORTE and OMPI programmers, here's what you need to do differently
in new code:
* Do not include opal/util/show_help.h or opal/util/output.h.
Instead, include orte/util/output.h (this one header file has
declarations for both the orte_output() series of functions and
orte_show_help()).
* Effectively s/opal_output/orte_output/gi throughout your code.
Note that orte_output_open() takes a slightly different argument
list (as a way to pass data to the filtering stream -- see below),
so you if explicitly call opal_output_open(), you'll need to
slightly adapt to the new signature of orte_output_open().
* Literally s/opal_show_help/orte_show_help/. The function signature
is identical.
=== Notes ===
* orte_output'ing to stream 0 will do similar to what
opal_output'ing did, so leaving a hard-coded "0" as the first
argument is safe.
* For systems that do not use ORTE's RML or the HNP, the effect of
orte_output_* and orte_show_help will be identical to their opal
counterparts (the additional information passed to
orte_output_open() will be lost!). Indeed, the orte_* functions
simply become trivial wrappers to their opal_* counterparts. Note
that we have not tested this; the code is simple but it is quite
possible that we mucked something up.
= Filter Framework =
Messages sent view the new orte_* functions described above and
messages output via the IOF on the HNP will now optionally be passed
through a new "filter" framework before being output to
stdout/stderr. The "filter" OPAL MCA framework is intended to allow
preprocessing to messages before they are sent to their final
destinations. The first component that was written in the filter
framework was to create an XML stream, segregating all the messages
into different XML tags, etc. This will allow 3rd party tools to read
the stdout/stderr from the HNP and be able to know exactly what each
text message is (e.g., a help message, another OMPI infrastructure
message, stdout from the user process, stderr from the user process,
etc.).
Filtering is not active by default. Filter components must be
specifically requested, such as:
{{{
$ mpirun --mca filter xml ...
}}}
There can only be one filter component active.
= New MCA Parameters =
The new functionality described above introduces two new MCA
parameters:
* '''orte_base_help_aggregate''': Defaults to 1 (true), meaning that
help messages will be aggregated, as described above. If set to 0,
all help messages will be displayed, even if they are duplicates
(i.e., the original behavior).
* '''orte_base_show_output_recursions''': An MCA parameter to help
debug one of the known issues, described below. It is likely that
this MCA parameter will disappear before v1.3 final.
= Known Issues =
* The XML filter component is not complete. The current output from
this component is preliminary and not real XML. A bit more work
needs to be done to configure.m4 search for an appropriate XML
library/link it in/use it at run time.
* There are possible recursion loops in the orte_output() and
orte_show_help() functions -- e.g., if RML send calls orte_output()
or orte_show_help(). We have some ideas how to fix these, but
figured that it was ok to commit before feature freeze with known
issues. The code currently contains sub-optimal workarounds so
that this will not be a problem, but it would be good to actually
solve the problem rather than have hackish workarounds before v1.3 final.
This commit was SVN r18434.
2008-05-14 00:00:55 +04:00
|
|
|
orte_show_help("help-mca-coll-base",
|
2004-09-05 20:05:37 +04:00
|
|
|
"comm-select:none-available", true);
|
2004-06-29 04:02:25 +04:00
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* FIX ME - Do some kind of collective operation to find a module
|
|
|
|
that everyone has available */
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* do the selection loop */
|
2008-05-20 01:34:01 +04:00
|
|
|
for (item = opal_list_remove_first(selectable);
|
|
|
|
NULL != item;
|
|
|
|
item = opal_list_remove_first(selectable))
|
|
|
|
{
|
2007-08-19 07:37:49 +04:00
|
|
|
avail_coll_t *avail = (avail_coll_t*) item;
|
2005-10-04 21:09:45 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* initialize the module */
|
|
|
|
ret = avail->ac_module->coll_module_enable(avail->ac_module, comm);
|
|
|
|
if (OMPI_SUCCESS != ret) {
|
|
|
|
mca_coll_base_comm_unselect(comm);
|
|
|
|
continue;
|
|
|
|
}
|
2005-10-04 21:09:45 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* copy over any of the pointers */
|
|
|
|
COPY(avail->ac_module, comm, allgather);
|
|
|
|
COPY(avail->ac_module, comm, allgatherv);
|
|
|
|
COPY(avail->ac_module, comm, allreduce);
|
|
|
|
COPY(avail->ac_module, comm, alltoall);
|
|
|
|
COPY(avail->ac_module, comm, alltoallv);
|
|
|
|
COPY(avail->ac_module, comm, alltoallw);
|
|
|
|
COPY(avail->ac_module, comm, barrier);
|
|
|
|
COPY(avail->ac_module, comm, bcast);
|
|
|
|
COPY(avail->ac_module, comm, exscan);
|
|
|
|
COPY(avail->ac_module, comm, gather);
|
|
|
|
COPY(avail->ac_module, comm, gatherv);
|
|
|
|
COPY(avail->ac_module, comm, reduce);
|
|
|
|
COPY(avail->ac_module, comm, reduce_scatter);
|
|
|
|
COPY(avail->ac_module, comm, scan);
|
|
|
|
COPY(avail->ac_module, comm, scatter);
|
|
|
|
COPY(avail->ac_module, comm, scatterv);
|
|
|
|
|
2008-05-20 01:34:01 +04:00
|
|
|
/* release the original module reference and the list item */
|
2007-08-19 07:37:49 +04:00
|
|
|
OBJ_RELEASE(avail->ac_module);
|
2008-05-20 01:34:01 +04:00
|
|
|
OBJ_RELEASE(avail);
|
2004-06-29 04:02:25 +04:00
|
|
|
}
|
|
|
|
|
2008-05-20 01:34:01 +04:00
|
|
|
/* Done with the list from the check_components() call so release it. */
|
|
|
|
OBJ_RELEASE(selectable);
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* check to make sure no NULLs */
|
|
|
|
if ((NULL == comm->c_coll.coll_allgather) ||
|
|
|
|
(NULL == comm->c_coll.coll_allgatherv) ||
|
|
|
|
(NULL == comm->c_coll.coll_allreduce) ||
|
|
|
|
(NULL == comm->c_coll.coll_alltoall) ||
|
|
|
|
(NULL == comm->c_coll.coll_alltoallv) ||
|
|
|
|
(NULL == comm->c_coll.coll_alltoallw) ||
|
|
|
|
(NULL == comm->c_coll.coll_barrier) ||
|
|
|
|
(NULL == comm->c_coll.coll_bcast) ||
|
|
|
|
((OMPI_COMM_IS_INTRA(comm)) && (NULL == comm->c_coll.coll_exscan)) ||
|
|
|
|
(NULL == comm->c_coll.coll_gather) ||
|
|
|
|
(NULL == comm->c_coll.coll_gatherv) ||
|
|
|
|
(NULL == comm->c_coll.coll_reduce) ||
|
|
|
|
(NULL == comm->c_coll.coll_reduce_scatter) ||
|
|
|
|
((OMPI_COMM_IS_INTRA(comm)) && (NULL == comm->c_coll.coll_scan)) ||
|
|
|
|
(NULL == comm->c_coll.coll_scatter) ||
|
|
|
|
(NULL == comm->c_coll.coll_scatterv)) {
|
|
|
|
mca_coll_base_comm_unselect(comm);
|
|
|
|
return OMPI_ERR_NOT_FOUND;
|
2004-06-29 04:02:25 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For each module in the list, if it is in the list of names (or the
|
|
|
|
* list of names is NULL), then check and see if it wants to run, and
|
|
|
|
* do the resulting priority comparison. Make a list of modules to be
|
|
|
|
* only those who returned that they want to run, and put them in
|
|
|
|
* priority order.
|
|
|
|
*/
|
2005-07-03 20:22:16 +04:00
|
|
|
static opal_list_t *check_components(opal_list_t *components,
|
2004-06-29 04:02:25 +04:00
|
|
|
ompi_communicator_t *comm,
|
|
|
|
char **names, int num_names)
|
|
|
|
{
|
|
|
|
int i, priority;
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t *component;
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_item_t *item, *item2;
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_1_1_0_t *module;
|
2004-06-29 04:02:25 +04:00
|
|
|
bool want_to_check;
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_t *selectable;
|
2004-07-30 23:14:55 +04:00
|
|
|
avail_coll_t *avail, *avail2;
|
2004-09-14 13:10:23 +04:00
|
|
|
|
2004-06-29 04:02:25 +04:00
|
|
|
/* Make a list of the components that query successfully */
|
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
selectable = OBJ_NEW(opal_list_t);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/* Scan through the list of components. This nested loop is O(N^2),
|
|
|
|
but we should never have too many components and/or names, so this
|
|
|
|
*hopefully* shouldn't matter... */
|
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
for (item = opal_list_get_first(components);
|
|
|
|
item != opal_list_get_end(components);
|
|
|
|
item = opal_list_get_next(item)) {
|
2004-06-29 04:02:25 +04:00
|
|
|
component = ((mca_base_component_priority_list_item_t *)
|
2004-11-12 19:55:41 +03:00
|
|
|
item)->super.cli_component;
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/* If we have a list of names, scan through it */
|
|
|
|
|
|
|
|
if (0 == num_names) {
|
|
|
|
want_to_check = true;
|
|
|
|
} else {
|
|
|
|
want_to_check = false;
|
|
|
|
for (i = 0; i < num_names; ++i) {
|
2004-08-02 04:24:22 +04:00
|
|
|
if (0 == strcmp(names[i], component->mca_component_name)) {
|
2004-06-29 04:02:25 +04:00
|
|
|
want_to_check = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If we determined that we want to check this component, then do
|
|
|
|
so */
|
|
|
|
|
|
|
|
if (want_to_check) {
|
2007-08-19 07:37:49 +04:00
|
|
|
priority = check_one_component(comm, component, &module);
|
2005-02-10 07:15:16 +03:00
|
|
|
if (priority >= 0) {
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/* We have a component that indicated that it wants to run by
|
|
|
|
giving us a module */
|
|
|
|
|
|
|
|
avail = OBJ_NEW(avail_coll_t);
|
2004-09-03 18:57:00 +04:00
|
|
|
avail->ac_priority = priority;
|
2004-08-04 01:29:23 +04:00
|
|
|
avail->ac_module = module;
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
/* Put this item on the list in priority order (lowest
|
2004-07-30 23:14:55 +04:00
|
|
|
priority first). Should it go first? */
|
|
|
|
|
2007-10-09 03:01:36 +04:00
|
|
|
for(item2 = opal_list_get_first(selectable);
|
|
|
|
item2 != opal_list_get_end(selectable);
|
|
|
|
item2 = opal_list_get_next(item2)) {
|
|
|
|
avail2 = (avail_coll_t*)item2;
|
|
|
|
if(avail->ac_priority < avail2->ac_priority) {
|
|
|
|
opal_list_insert_pos(selectable,
|
|
|
|
item2, (opal_list_item_t*)avail);
|
|
|
|
break;
|
2004-07-30 23:14:55 +04:00
|
|
|
}
|
|
|
|
}
|
2007-10-09 03:01:36 +04:00
|
|
|
|
|
|
|
if(opal_list_get_end(selectable) == item2) {
|
|
|
|
opal_list_append(selectable, (opal_list_item_t*)avail);
|
|
|
|
}
|
2004-07-30 23:14:55 +04:00
|
|
|
}
|
2004-06-29 04:02:25 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* If we didn't find any available components, return an error */
|
|
|
|
|
2005-07-03 20:22:16 +04:00
|
|
|
if (0 == opal_list_get_size(selectable)) {
|
2004-06-29 04:02:25 +04:00
|
|
|
OBJ_RELEASE(selectable);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* All done */
|
|
|
|
|
|
|
|
return selectable;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Check a single component
|
|
|
|
*/
|
|
|
|
static int check_one_component(ompi_communicator_t *comm,
|
2004-08-02 04:24:22 +04:00
|
|
|
const mca_base_component_t *component,
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_1_1_0_t **module)
|
2004-06-29 04:02:25 +04:00
|
|
|
{
|
|
|
|
int err;
|
|
|
|
int priority = -1;
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
err = query(component, comm, &priority, module);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
if (OMPI_SUCCESS == err) {
|
|
|
|
priority = (priority < 100) ? priority : 100;
|
This commit represents a bunch of work on a Mercurial side branch. As
such, the commit message back to the master SVN repository is fairly
long.
= ORTE Job-Level Output Messages =
Add two new interfaces that should be used for all new code throughout
the ORTE and OMPI layers (we already make the search-and-replace on
the existing ORTE / OMPI layers):
* orte_output(): (and corresponding friends ORTE_OUTPUT,
orte_output_verbose, etc.) This function sends the output directly
to the HNP for processing as part of a job-specific output
channel. It supports all the same outputs as opal_output()
(syslog, file, stdout, stderr), but for stdout/stderr, the output
is sent to the HNP for processing and output. More on this below.
* orte_show_help(): This function is a drop-in-replacement for
opal_show_help(), with two differences in functionality:
1. the rendered text help message output is sent to the HNP for
display (rather than outputting directly into the process' stderr
stream)
1. the HNP detects duplicate help messages and does not display them
(so that you don't see the same error message N times, once from
each of your N MPI processes); instead, it counts "new" instances
of the help message and displays a message every ~5 seconds when
there are new ones ("I got X new copies of the help message...")
opal_show_help and opal_output still exist, but they only output in
the current process. The intent for the new orte_* functions is that
they can apply job-level intelligence to the output. As such, we
recommend that all new ORTE and OMPI code use the new orte_*
functions, not thei opal_* functions.
=== New code ===
For ORTE and OMPI programmers, here's what you need to do differently
in new code:
* Do not include opal/util/show_help.h or opal/util/output.h.
Instead, include orte/util/output.h (this one header file has
declarations for both the orte_output() series of functions and
orte_show_help()).
* Effectively s/opal_output/orte_output/gi throughout your code.
Note that orte_output_open() takes a slightly different argument
list (as a way to pass data to the filtering stream -- see below),
so you if explicitly call opal_output_open(), you'll need to
slightly adapt to the new signature of orte_output_open().
* Literally s/opal_show_help/orte_show_help/. The function signature
is identical.
=== Notes ===
* orte_output'ing to stream 0 will do similar to what
opal_output'ing did, so leaving a hard-coded "0" as the first
argument is safe.
* For systems that do not use ORTE's RML or the HNP, the effect of
orte_output_* and orte_show_help will be identical to their opal
counterparts (the additional information passed to
orte_output_open() will be lost!). Indeed, the orte_* functions
simply become trivial wrappers to their opal_* counterparts. Note
that we have not tested this; the code is simple but it is quite
possible that we mucked something up.
= Filter Framework =
Messages sent view the new orte_* functions described above and
messages output via the IOF on the HNP will now optionally be passed
through a new "filter" framework before being output to
stdout/stderr. The "filter" OPAL MCA framework is intended to allow
preprocessing to messages before they are sent to their final
destinations. The first component that was written in the filter
framework was to create an XML stream, segregating all the messages
into different XML tags, etc. This will allow 3rd party tools to read
the stdout/stderr from the HNP and be able to know exactly what each
text message is (e.g., a help message, another OMPI infrastructure
message, stdout from the user process, stderr from the user process,
etc.).
Filtering is not active by default. Filter components must be
specifically requested, such as:
{{{
$ mpirun --mca filter xml ...
}}}
There can only be one filter component active.
= New MCA Parameters =
The new functionality described above introduces two new MCA
parameters:
* '''orte_base_help_aggregate''': Defaults to 1 (true), meaning that
help messages will be aggregated, as described above. If set to 0,
all help messages will be displayed, even if they are duplicates
(i.e., the original behavior).
* '''orte_base_show_output_recursions''': An MCA parameter to help
debug one of the known issues, described below. It is likely that
this MCA parameter will disappear before v1.3 final.
= Known Issues =
* The XML filter component is not complete. The current output from
this component is preliminary and not real XML. A bit more work
needs to be done to configure.m4 search for an appropriate XML
library/link it in/use it at run time.
* There are possible recursion loops in the orte_output() and
orte_show_help() functions -- e.g., if RML send calls orte_output()
or orte_show_help(). We have some ideas how to fix these, but
figured that it was ok to commit before feature freeze with known
issues. The code currently contains sub-optimal workarounds so
that this will not be a problem, but it would be good to actually
solve the problem rather than have hackish workarounds before v1.3 final.
This commit was SVN r18434.
2008-05-14 00:00:55 +04:00
|
|
|
orte_output_verbose(10, mca_coll_base_output,
|
2004-06-29 04:02:25 +04:00
|
|
|
"coll:base:comm_select: component available: %s, priority: %d",
|
2004-08-02 04:24:22 +04:00
|
|
|
component->mca_component_name, priority);
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
} else {
|
|
|
|
priority = -1;
|
This commit represents a bunch of work on a Mercurial side branch. As
such, the commit message back to the master SVN repository is fairly
long.
= ORTE Job-Level Output Messages =
Add two new interfaces that should be used for all new code throughout
the ORTE and OMPI layers (we already make the search-and-replace on
the existing ORTE / OMPI layers):
* orte_output(): (and corresponding friends ORTE_OUTPUT,
orte_output_verbose, etc.) This function sends the output directly
to the HNP for processing as part of a job-specific output
channel. It supports all the same outputs as opal_output()
(syslog, file, stdout, stderr), but for stdout/stderr, the output
is sent to the HNP for processing and output. More on this below.
* orte_show_help(): This function is a drop-in-replacement for
opal_show_help(), with two differences in functionality:
1. the rendered text help message output is sent to the HNP for
display (rather than outputting directly into the process' stderr
stream)
1. the HNP detects duplicate help messages and does not display them
(so that you don't see the same error message N times, once from
each of your N MPI processes); instead, it counts "new" instances
of the help message and displays a message every ~5 seconds when
there are new ones ("I got X new copies of the help message...")
opal_show_help and opal_output still exist, but they only output in
the current process. The intent for the new orte_* functions is that
they can apply job-level intelligence to the output. As such, we
recommend that all new ORTE and OMPI code use the new orte_*
functions, not thei opal_* functions.
=== New code ===
For ORTE and OMPI programmers, here's what you need to do differently
in new code:
* Do not include opal/util/show_help.h or opal/util/output.h.
Instead, include orte/util/output.h (this one header file has
declarations for both the orte_output() series of functions and
orte_show_help()).
* Effectively s/opal_output/orte_output/gi throughout your code.
Note that orte_output_open() takes a slightly different argument
list (as a way to pass data to the filtering stream -- see below),
so you if explicitly call opal_output_open(), you'll need to
slightly adapt to the new signature of orte_output_open().
* Literally s/opal_show_help/orte_show_help/. The function signature
is identical.
=== Notes ===
* orte_output'ing to stream 0 will do similar to what
opal_output'ing did, so leaving a hard-coded "0" as the first
argument is safe.
* For systems that do not use ORTE's RML or the HNP, the effect of
orte_output_* and orte_show_help will be identical to their opal
counterparts (the additional information passed to
orte_output_open() will be lost!). Indeed, the orte_* functions
simply become trivial wrappers to their opal_* counterparts. Note
that we have not tested this; the code is simple but it is quite
possible that we mucked something up.
= Filter Framework =
Messages sent view the new orte_* functions described above and
messages output via the IOF on the HNP will now optionally be passed
through a new "filter" framework before being output to
stdout/stderr. The "filter" OPAL MCA framework is intended to allow
preprocessing to messages before they are sent to their final
destinations. The first component that was written in the filter
framework was to create an XML stream, segregating all the messages
into different XML tags, etc. This will allow 3rd party tools to read
the stdout/stderr from the HNP and be able to know exactly what each
text message is (e.g., a help message, another OMPI infrastructure
message, stdout from the user process, stderr from the user process,
etc.).
Filtering is not active by default. Filter components must be
specifically requested, such as:
{{{
$ mpirun --mca filter xml ...
}}}
There can only be one filter component active.
= New MCA Parameters =
The new functionality described above introduces two new MCA
parameters:
* '''orte_base_help_aggregate''': Defaults to 1 (true), meaning that
help messages will be aggregated, as described above. If set to 0,
all help messages will be displayed, even if they are duplicates
(i.e., the original behavior).
* '''orte_base_show_output_recursions''': An MCA parameter to help
debug one of the known issues, described below. It is likely that
this MCA parameter will disappear before v1.3 final.
= Known Issues =
* The XML filter component is not complete. The current output from
this component is preliminary and not real XML. A bit more work
needs to be done to configure.m4 search for an appropriate XML
library/link it in/use it at run time.
* There are possible recursion loops in the orte_output() and
orte_show_help() functions -- e.g., if RML send calls orte_output()
or orte_show_help(). We have some ideas how to fix these, but
figured that it was ok to commit before feature freeze with known
issues. The code currently contains sub-optimal workarounds so
that this will not be a problem, but it would be good to actually
solve the problem rather than have hackish workarounds before v1.3 final.
This commit was SVN r18434.
2008-05-14 00:00:55 +04:00
|
|
|
orte_output_verbose(10, mca_coll_base_output,
|
2004-06-29 04:02:25 +04:00
|
|
|
"coll:base:comm_select: component not available: %s",
|
2004-08-02 04:24:22 +04:00
|
|
|
component->mca_component_name);
|
2004-06-29 04:02:25 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
return priority;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
* Query functions
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Take any version of a coll module, query it, and return the right
|
2004-08-04 01:29:23 +04:00
|
|
|
* module struct
|
2004-06-29 04:02:25 +04:00
|
|
|
*/
|
2004-08-02 04:24:22 +04:00
|
|
|
static int query(const mca_base_component_t *component,
|
2004-06-29 04:02:25 +04:00
|
|
|
ompi_communicator_t *comm,
|
2007-08-19 07:37:49 +04:00
|
|
|
int *priority, mca_coll_base_module_1_1_0_t **module)
|
2004-06-29 04:02:25 +04:00
|
|
|
{
|
2007-10-07 16:20:22 +04:00
|
|
|
/* coll v1.1.0 */
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
*module = NULL;
|
2007-10-07 16:20:22 +04:00
|
|
|
if (1 == component->mca_type_major_version &&
|
|
|
|
1 == component->mca_type_minor_version &&
|
|
|
|
0 == component->mca_type_release_version) {
|
2007-08-19 07:37:49 +04:00
|
|
|
const mca_coll_base_component_1_1_0_t *coll100 =
|
|
|
|
(mca_coll_base_component_1_1_0_t *) component;
|
2004-06-29 04:02:25 +04:00
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
return query_1_1_0(coll100, comm, priority, module);
|
2004-06-29 04:02:25 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Unknown coll API version -- return error */
|
|
|
|
|
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
static int query_1_1_0(const mca_coll_base_component_1_1_0_t *component,
|
2004-06-29 04:02:25 +04:00
|
|
|
ompi_communicator_t *comm, int *priority,
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_1_1_0_t **module)
|
2004-06-29 04:02:25 +04:00
|
|
|
{
|
2007-08-19 07:37:49 +04:00
|
|
|
mca_coll_base_module_1_1_0_t *ret;
|
2004-06-29 04:02:25 +04:00
|
|
|
|
|
|
|
/* There's currently no need for conversion */
|
|
|
|
|
2007-08-19 07:37:49 +04:00
|
|
|
ret = component->collm_comm_query(comm, priority);
|
2004-06-29 04:02:25 +04:00
|
|
|
if (NULL != ret) {
|
|
|
|
*module = ret;
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_ERROR;
|
|
|
|
}
|