2005-06-30 21:28:35 +00:00
|
|
|
/*
|
2005-11-05 19:57:48 +00: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.
|
2008-01-21 12:11:18 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-06-30 21:28:35 +00:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2008-05-02 11:52:33 +00:00
|
|
|
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
|
2007-09-24 10:11:52 +00:00
|
|
|
* Copyright (c) 2006-2007 Voltaire All rights reserved.
|
2005-06-30 21:28:35 +00:00
|
|
|
* $COPYRIGHT$
|
2008-01-21 12:11:18 +00:00
|
|
|
*
|
2005-06-30 21:28:35 +00:00
|
|
|
* Additional copyrights may follow
|
2008-01-21 12:11:18 +00:00
|
|
|
*
|
2005-06-30 21:28:35 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
2006-02-12 01:33:29 +00:00
|
|
|
#include "opal/class/opal_hash_table.h"
|
2008-04-17 20:43:56 +00:00
|
|
|
#include "opal/util/arch.h"
|
|
|
|
|
2007-07-09 17:16:34 +00:00
|
|
|
#include "ompi/runtime/ompi_module_exchange.h"
|
2005-06-30 21:28:35 +00:00
|
|
|
|
|
|
|
#include "btl_openib.h"
|
|
|
|
#include "btl_openib_proc.h"
|
2008-05-02 11:52:33 +00:00
|
|
|
#include "connect/base.h"
|
|
|
|
#include "connect/connect.h"
|
2005-06-30 21:28:35 +00:00
|
|
|
|
|
|
|
static void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc);
|
|
|
|
static void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* proc);
|
|
|
|
|
2008-01-21 12:11:18 +00:00
|
|
|
OBJ_CLASS_INSTANCE(mca_btl_openib_proc_t,
|
|
|
|
opal_list_item_t, mca_btl_openib_proc_construct,
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_btl_openib_proc_destruct);
|
|
|
|
|
|
|
|
void mca_btl_openib_proc_construct(mca_btl_openib_proc_t* proc)
|
|
|
|
{
|
|
|
|
proc->proc_ompi = 0;
|
2008-05-02 11:52:33 +00:00
|
|
|
proc->proc_ports = NULL;
|
2005-09-30 22:58:09 +00:00
|
|
|
proc->proc_port_count = 0;
|
2005-06-30 21:28:35 +00:00
|
|
|
proc->proc_endpoints = 0;
|
|
|
|
proc->proc_endpoint_count = 0;
|
2005-07-03 22:45:48 +00:00
|
|
|
OBJ_CONSTRUCT(&proc->proc_lock, opal_mutex_t);
|
2005-06-30 21:28:35 +00:00
|
|
|
/* add to list of all proc instance */
|
2005-07-03 22:45:48 +00:00
|
|
|
OPAL_THREAD_LOCK(&mca_btl_openib_component.ib_lock);
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_append(&mca_btl_openib_component.ib_procs, &proc->super);
|
2005-07-03 22:45:48 +00:00
|
|
|
OPAL_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock);
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Cleanup ib proc instance
|
|
|
|
*/
|
|
|
|
|
|
|
|
void mca_btl_openib_proc_destruct(mca_btl_openib_proc_t* proc)
|
|
|
|
{
|
|
|
|
/* remove from list of all proc instances */
|
2005-07-03 22:45:48 +00:00
|
|
|
OPAL_THREAD_LOCK(&mca_btl_openib_component.ib_lock);
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_remove_item(&mca_btl_openib_component.ib_procs, &proc->super);
|
2005-07-03 22:45:48 +00:00
|
|
|
OPAL_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock);
|
2005-06-30 21:28:35 +00:00
|
|
|
|
|
|
|
/* release resources */
|
|
|
|
if(NULL != proc->proc_endpoints) {
|
|
|
|
free(proc->proc_endpoints);
|
|
|
|
}
|
2008-05-02 11:52:33 +00:00
|
|
|
if (NULL != proc->proc_ports) {
|
|
|
|
int i, j;
|
|
|
|
for (i = 0; i < proc->proc_port_count; ++i) {
|
|
|
|
for (j = 0; j < proc->proc_ports[i].pm_cpc_data_count; ++j) {
|
|
|
|
if (NULL != proc->proc_ports[i].pm_cpc_data[j].cbm_modex_message) {
|
|
|
|
free(proc->proc_ports[i].pm_cpc_data[j].cbm_modex_message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
free(proc->proc_ports);
|
|
|
|
}
|
2005-06-30 21:28:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Look for an existing IB process instances based on the associated
|
|
|
|
* ompi_proc_t instance.
|
|
|
|
*/
|
|
|
|
static mca_btl_openib_proc_t* mca_btl_openib_proc_lookup_ompi(ompi_proc_t* ompi_proc)
|
|
|
|
{
|
|
|
|
mca_btl_openib_proc_t* ib_proc;
|
|
|
|
|
2005-07-03 22:45:48 +00:00
|
|
|
OPAL_THREAD_LOCK(&mca_btl_openib_component.ib_lock);
|
2005-06-30 21:28:35 +00:00
|
|
|
|
|
|
|
for(ib_proc = (mca_btl_openib_proc_t*)
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_get_first(&mca_btl_openib_component.ib_procs);
|
2005-06-30 21:28:35 +00:00
|
|
|
ib_proc != (mca_btl_openib_proc_t*)
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_get_end(&mca_btl_openib_component.ib_procs);
|
|
|
|
ib_proc = (mca_btl_openib_proc_t*)opal_list_get_next(ib_proc)) {
|
2005-06-30 21:28:35 +00:00
|
|
|
if(ib_proc->proc_ompi == ompi_proc) {
|
2005-07-03 22:45:48 +00:00
|
|
|
OPAL_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock);
|
2005-06-30 21:28:35 +00:00
|
|
|
return ib_proc;
|
|
|
|
}
|
|
|
|
}
|
2005-07-03 22:45:48 +00:00
|
|
|
OPAL_THREAD_UNLOCK(&mca_btl_openib_component.ib_lock);
|
2005-06-30 21:28:35 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
static void inline unpack8(char **src, uint8_t *value)
|
|
|
|
{
|
|
|
|
/* Copy one character */
|
|
|
|
*value = (uint8_t) **src;
|
|
|
|
/* Most the src ahead one */
|
|
|
|
++*src;
|
|
|
|
}
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
/*
|
|
|
|
* Create a IB process structure. There is a one-to-one correspondence
|
2008-05-02 11:52:33 +00:00
|
|
|
* between a ompi_proc_t and a mca_btl_openib_proc_t instance. We
|
|
|
|
* cache additional data (specifically the list of
|
|
|
|
* mca_btl_openib_endpoint_t instances, and published addresses)
|
|
|
|
* associated w/ a given destination on this datastructure.
|
2005-06-30 21:28:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
mca_btl_openib_proc_t* mca_btl_openib_proc_create(ompi_proc_t* ompi_proc)
|
|
|
|
{
|
|
|
|
mca_btl_openib_proc_t* module_proc = NULL;
|
2008-01-14 23:22:03 +00:00
|
|
|
size_t msg_size;
|
|
|
|
uint32_t size;
|
2008-05-02 11:52:33 +00:00
|
|
|
int rc, i, j;
|
2008-01-14 23:22:03 +00:00
|
|
|
void *message;
|
|
|
|
char *offset;
|
2008-05-02 11:52:33 +00:00
|
|
|
int modex_message_size;
|
|
|
|
mca_btl_openib_modex_message_t dummy;
|
2008-01-21 12:11:18 +00:00
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
/* Check if we have already created a IB proc
|
|
|
|
* structure for this ompi process */
|
|
|
|
module_proc = mca_btl_openib_proc_lookup_ompi(ompi_proc);
|
2008-01-14 23:22:03 +00:00
|
|
|
if (NULL != module_proc) {
|
2005-06-30 21:28:35 +00:00
|
|
|
/* Gotcha! */
|
|
|
|
return module_proc;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Oops! First time, gotta create a new IB proc
|
|
|
|
* out of the ompi_proc ... */
|
|
|
|
module_proc = OBJ_NEW(mca_btl_openib_proc_t);
|
|
|
|
/* Initialize number of peer */
|
|
|
|
module_proc->proc_endpoint_count = 0;
|
|
|
|
module_proc->proc_ompi = ompi_proc;
|
|
|
|
|
|
|
|
/* build a unique identifier (of arbitrary
|
|
|
|
* size) to represent the proc */
|
|
|
|
module_proc->proc_guid = ompi_proc->proc_name;
|
|
|
|
|
2008-01-21 12:11:18 +00:00
|
|
|
/* query for the peer address info */
|
|
|
|
rc = ompi_modex_recv(&mca_btl_openib_component.super.btl_version,
|
2008-01-14 23:22:03 +00:00
|
|
|
ompi_proc,
|
|
|
|
&message,
|
2008-01-21 12:11:18 +00:00
|
|
|
&msg_size);
|
2008-01-14 23:22:03 +00:00
|
|
|
if (OMPI_SUCCESS != rc) {
|
2007-10-15 17:53:02 +00:00
|
|
|
BTL_ERROR(("[%s:%d] ompi_modex_recv failed for peer %s",
|
|
|
|
__FILE__, __LINE__,
|
|
|
|
ORTE_NAME_PRINT(&ompi_proc->proc_name)));
|
2005-09-30 22:58:09 +00:00
|
|
|
OBJ_RELEASE(module_proc);
|
|
|
|
return NULL;
|
|
|
|
}
|
2008-01-14 23:22:03 +00:00
|
|
|
if (0 == msg_size) {
|
2005-09-30 22:58:09 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2005-06-30 21:28:35 +00:00
|
|
|
|
2008-01-14 23:22:03 +00:00
|
|
|
/* Message was packed in btl_openib_component.c; the format is
|
|
|
|
listed in a comment in that file */
|
2008-05-02 11:52:33 +00:00
|
|
|
modex_message_size = ((char *) &(dummy.end)) - ((char*) &dummy);
|
|
|
|
|
|
|
|
/* Unpack the number of modules in the message */
|
2008-01-14 23:22:03 +00:00
|
|
|
offset = message;
|
2008-05-02 11:52:33 +00:00
|
|
|
unpack8(&offset, &(module_proc->proc_port_count));
|
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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpack: %d btls", module_proc->proc_port_count);
|
2008-05-02 11:52:33 +00:00
|
|
|
if (module_proc->proc_port_count > 0) {
|
|
|
|
module_proc->proc_ports = (mca_btl_openib_proc_modex_t *)
|
|
|
|
malloc(sizeof(mca_btl_openib_proc_modex_t) *
|
|
|
|
module_proc->proc_port_count);
|
|
|
|
} else {
|
|
|
|
module_proc->proc_ports = NULL;
|
|
|
|
}
|
2008-01-14 23:22:03 +00:00
|
|
|
|
|
|
|
/* Loop over unpacking all the ports */
|
|
|
|
for (i = 0; i < module_proc->proc_port_count; i++) {
|
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
/* Unpack the modex comment message struct */
|
|
|
|
size = modex_message_size;
|
|
|
|
memcpy(&(module_proc->proc_ports[i].pm_port_info), offset, size);
|
2008-01-14 23:22:03 +00:00
|
|
|
#if !defined(WORDS_BIGENDIAN) && OMPI_ENABLE_HETEROGENEOUS_SUPPORT
|
2008-05-02 11:52:33 +00:00
|
|
|
MCA_BTL_OPENIB_MODEX_MSG_NTOH(module_proc->proc_ports[i].pm_port_info);
|
2008-01-14 23:22:03 +00:00
|
|
|
#endif
|
2008-05-02 11:52:33 +00:00
|
|
|
offset += size;
|
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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpacked btl %d: modex message, offset now %d",
|
2008-05-02 11:52:33 +00:00
|
|
|
i, (int)(offset-((char*)message)));
|
2008-01-14 23:22:03 +00:00
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
/* Unpack the number of CPCs that follow */
|
|
|
|
unpack8(&offset, &(module_proc->proc_ports[i].pm_cpc_data_count));
|
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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpacked btl %d: number of cpcs to follow %d (offset now %d)",
|
2008-05-02 11:52:33 +00:00
|
|
|
i, module_proc->proc_ports[i].pm_cpc_data_count, (int)(offset-((char*)message)));
|
|
|
|
module_proc->proc_ports[i].pm_cpc_data =
|
|
|
|
calloc(module_proc->proc_ports[i].pm_cpc_data_count,
|
|
|
|
sizeof(ompi_btl_openib_connect_base_module_data_t));
|
|
|
|
if (NULL == module_proc->proc_ports[i].pm_cpc_data) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Unpack the CPCs */
|
|
|
|
for (j = 0; j < module_proc->proc_ports[i].pm_cpc_data_count; ++j) {
|
|
|
|
uint8_t u8;
|
|
|
|
ompi_btl_openib_connect_base_module_data_t *cpcd;
|
|
|
|
cpcd = module_proc->proc_ports[i].pm_cpc_data + j;
|
|
|
|
unpack8(&offset, &u8);
|
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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpacked btl %d: cpc %d: index %d (offset now %d)",
|
2008-05-02 11:52:33 +00:00
|
|
|
i, j, u8, (int)(offset-(char*)message));
|
|
|
|
cpcd->cbm_component =
|
|
|
|
ompi_btl_openib_connect_base_get_cpc_byindex(u8);
|
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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpacked btl %d: cpc %d: component %s",
|
2008-05-02 11:52:33 +00:00
|
|
|
i, j, cpcd->cbm_component->cbc_name);
|
|
|
|
|
|
|
|
unpack8(&offset, &cpcd->cbm_priority);
|
|
|
|
unpack8(&offset, &cpcd->cbm_modex_message_len);
|
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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpacked btl %d: cpc %d: priority %d, msg len %d (offset now %d)",
|
2008-05-02 11:52:33 +00:00
|
|
|
i, j, cpcd->cbm_priority, cpcd->cbm_modex_message_len, (int)(offset-(char*)message));
|
|
|
|
if (cpcd->cbm_modex_message_len > 0) {
|
|
|
|
cpcd->cbm_modex_message = malloc(cpcd->cbm_modex_message_len);
|
|
|
|
if (NULL == cpcd->cbm_modex_message) {
|
|
|
|
BTL_ERROR(("Failed to malloc"));
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
memcpy(cpcd->cbm_modex_message, offset,
|
|
|
|
cpcd->cbm_modex_message_len);
|
|
|
|
offset += cpcd->cbm_modex_message_len;
|
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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpacked btl %d: cpc %d: blob unpacked %d %x (offset now %d)",
|
2008-05-02 11:52:33 +00:00
|
|
|
i, j,
|
|
|
|
((uint32_t*)cpcd->cbm_modex_message)[0],
|
|
|
|
((uint32_t*)cpcd->cbm_modex_message)[1],
|
|
|
|
(int)(offset-((char*)message)));
|
|
|
|
}
|
2008-01-14 23:22:03 +00:00
|
|
|
}
|
|
|
|
}
|
2007-01-03 22:35:41 +00:00
|
|
|
|
2005-09-30 22:58:09 +00:00
|
|
|
if (0 == module_proc->proc_port_count) {
|
|
|
|
module_proc->proc_endpoints = NULL;
|
|
|
|
} else {
|
|
|
|
module_proc->proc_endpoints = (mca_btl_base_endpoint_t**)
|
2008-05-02 11:52:33 +00:00
|
|
|
malloc(module_proc->proc_port_count *
|
|
|
|
sizeof(mca_btl_base_endpoint_t*));
|
2005-09-30 22:58:09 +00:00
|
|
|
}
|
2008-01-14 23:22:03 +00:00
|
|
|
if (NULL == module_proc->proc_endpoints) {
|
2005-06-30 21:28:35 +00:00
|
|
|
OBJ_RELEASE(module_proc);
|
|
|
|
return NULL;
|
|
|
|
}
|
2008-05-02 11:52:33 +00: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-13 20:00:55 +00:00
|
|
|
orte_output(-1, "unpacking done!");
|
2005-06-30 21:28:35 +00:00
|
|
|
return module_proc;
|
|
|
|
}
|
|
|
|
|
2008-05-02 11:52:33 +00:00
|
|
|
int mca_btl_openib_proc_remove(ompi_proc_t *proc,
|
|
|
|
mca_btl_base_endpoint_t *endpoint)
|
|
|
|
{
|
|
|
|
size_t i;
|
|
|
|
mca_btl_openib_proc_t* ib_proc = NULL;
|
|
|
|
|
|
|
|
/* Remove endpoint from the openib BTL version of the proc as
|
|
|
|
well */
|
|
|
|
ib_proc = mca_btl_openib_proc_lookup_ompi(proc);
|
|
|
|
if (NULL != ib_proc) {
|
|
|
|
for (i = 0; i < ib_proc->proc_endpoint_count; ++i) {
|
|
|
|
if (ib_proc->proc_endpoints[i] == endpoint) {
|
|
|
|
ib_proc->proc_endpoints[i] = NULL;
|
|
|
|
if (i == ib_proc->proc_endpoint_count - 1) {
|
|
|
|
--ib_proc->proc_endpoint_count;
|
|
|
|
}
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return OMPI_ERR_NOT_FOUND;
|
|
|
|
}
|
2005-06-30 21:28:35 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Note that this routine must be called with the lock on the process
|
2008-01-21 12:11:18 +00:00
|
|
|
* already held. Insert a btl instance into the proc array and assign
|
2005-06-30 21:28:35 +00:00
|
|
|
* it an address.
|
|
|
|
*/
|
2008-01-21 12:11:18 +00:00
|
|
|
int mca_btl_openib_proc_insert(mca_btl_openib_proc_t* module_proc,
|
2005-06-30 21:28:35 +00:00
|
|
|
mca_btl_base_endpoint_t* module_endpoint)
|
|
|
|
{
|
|
|
|
/* insert into endpoint array */
|
2008-01-21 12:11:18 +00:00
|
|
|
|
|
|
|
|
2007-01-12 23:14:45 +00:00
|
|
|
#ifndef WORDS_BIGENDIAN
|
|
|
|
/* if we are little endian and our peer is not so lucky, then we
|
|
|
|
need to put all information sent to him in big endian (aka
|
|
|
|
Network Byte Order) and expect all information received to
|
|
|
|
be in NBO. Since big endian machines always send and receive
|
|
|
|
in NBO, we don't care so much about that case. */
|
2008-04-17 20:43:56 +00:00
|
|
|
if (module_proc->proc_ompi->proc_arch & OPAL_ARCH_ISBIGENDIAN) {
|
2007-01-12 23:14:45 +00:00
|
|
|
module_endpoint->nbo = true;
|
|
|
|
}
|
|
|
|
#endif
|
2008-01-21 12:11:18 +00:00
|
|
|
|
2007-01-12 23:14:45 +00:00
|
|
|
/* only allow eager rdma if the peers agree on the size of a long */
|
2008-04-17 20:43:56 +00:00
|
|
|
if((module_proc->proc_ompi->proc_arch & OPAL_ARCH_LONGISxx) !=
|
|
|
|
(ompi_proc_local()->proc_arch & OPAL_ARCH_LONGISxx)) {
|
2007-01-12 23:14:45 +00:00
|
|
|
module_endpoint->use_eager_rdma = false;
|
|
|
|
}
|
|
|
|
|
2005-06-30 21:28:35 +00:00
|
|
|
module_endpoint->endpoint_proc = module_proc;
|
|
|
|
module_proc->proc_endpoints[module_proc->proc_endpoint_count++] = module_endpoint;
|
|
|
|
return OMPI_SUCCESS;
|
|
|
|
}
|