Add some notifier messages during MPI_INIT and MPI_FINALIZE (which
only show up if a notifier component is selected, of course). These can be disabled by setting the MCA parameter mpi_notify_init_finalize to 0. These messages are both intended as "hey, does the community like this?" and as a way to get some real-world testing of the notify system. The default is currently to send these messages if a notify component is selected; we can change the default later if desired. This commit was SVN r21078.
Этот коммит содержится в:
родитель
fd1e9a6313
Коммит
537579ad5d
@ -49,6 +49,7 @@
|
||||
|
||||
#include "orte/mca/errmgr/errmgr.h"
|
||||
#include "orte/mca/grpcomm/grpcomm.h"
|
||||
#include "orte/mca/notifier/notifier.h"
|
||||
#include "orte/runtime/runtime.h"
|
||||
#include "orte/runtime/orte_globals.h"
|
||||
|
||||
@ -113,6 +114,15 @@ int ompi_mpi_finalize(void)
|
||||
return MPI_ERR_OTHER;
|
||||
}
|
||||
|
||||
/* If desired, send a notify message */
|
||||
if (ompi_notify_init_finalize) {
|
||||
orte_notifier.log(ORTE_NOTIFIER_NOTICE,
|
||||
ORTE_SUCCESS,
|
||||
"MPI_FINALIZE:Starting on host %s, pid %d",
|
||||
orte_process_info.nodename,
|
||||
orte_process_info.pid);
|
||||
}
|
||||
|
||||
/* Per MPI-2:4.8, we have to free MPI_COMM_SELF before doing
|
||||
anything else in MPI_FINALIZE (to include setting up such that
|
||||
MPI_FINALIZED will return true). */
|
||||
@ -399,6 +409,15 @@ int ompi_mpi_finalize(void)
|
||||
free(ompi_mpi_show_mca_params_file);
|
||||
}
|
||||
|
||||
/* If desired, send a notify message */
|
||||
if (ompi_notify_init_finalize) {
|
||||
orte_notifier.log(ORTE_NOTIFIER_NOTICE,
|
||||
ORTE_SUCCESS,
|
||||
"MPI_FINALIZE:Finishing on host %s, pid %d",
|
||||
orte_process_info.nodename,
|
||||
orte_process_info.pid);
|
||||
}
|
||||
|
||||
/* Leave the RTE */
|
||||
|
||||
if (OMPI_SUCCESS != (ret = orte_finalize())) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006 University of Houston. All rights reserved.
|
||||
@ -56,6 +56,8 @@
|
||||
#include "orte/util/show_help.h"
|
||||
#include "orte/mca/ess/ess.h"
|
||||
|
||||
#include "orte/mca/notifier/notifier.h"
|
||||
|
||||
#include "ompi/constants.h"
|
||||
#include "ompi/mpi/f77/constants.h"
|
||||
#include "ompi/runtime/mpiruntime.h"
|
||||
@ -391,6 +393,15 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* If desired, send a notify message */
|
||||
if (ompi_notify_init_finalize) {
|
||||
orte_notifier.log(ORTE_NOTIFIER_NOTICE,
|
||||
ORTE_SUCCESS,
|
||||
"MPI_INIT:Starting on host %s, pid %d",
|
||||
orte_process_info.nodename,
|
||||
orte_process_info.pid);
|
||||
}
|
||||
|
||||
/* Setup process affinity. First check to see if a slot list was
|
||||
specified. If so, use it. If no slot list was specified,
|
||||
that's not an error -- just fall through and try the next
|
||||
@ -883,5 +894,14 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
|
||||
(ompistop.tv_usec - ompistart.tv_usec)));
|
||||
}
|
||||
|
||||
/* If desired, send a notifier message that we've finished MPI_INIT */
|
||||
if (ompi_notify_init_finalize) {
|
||||
orte_notifier.log(ORTE_NOTIFIER_NOTICE,
|
||||
ORTE_SUCCESS,
|
||||
"MPI_INIT:Finishing on host %s, pid %d",
|
||||
orte_process_info.nodename,
|
||||
orte_process_info.pid);
|
||||
}
|
||||
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ int ompi_mpi_leave_pinned = -1;
|
||||
bool ompi_mpi_leave_pinned_pipeline = false;
|
||||
bool ompi_have_sparse_group_storage = OPAL_INT_TO_BOOL(OMPI_GROUP_SPARSE);
|
||||
bool ompi_use_sparse_group_storage = OPAL_INT_TO_BOOL(OMPI_GROUP_SPARSE);
|
||||
bool ompi_notify_init_finalize = true;
|
||||
|
||||
static bool show_default_mca_params = false;
|
||||
static bool show_file_mca_params = false;
|
||||
@ -294,6 +295,14 @@ int ompi_mpi_register_params(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Do we want notifier messages upon MPI_INIT and MPI_FINALIZE? */
|
||||
|
||||
mca_base_param_reg_int_name("mpi", "notify_init_finalize",
|
||||
"If nonzero, send two notifications during MPI_INIT: one near when MPI_INIT starts, and another right before MPI_INIT finishes, and send 2 notifications during MPI_FINALIZE: one right when MPI_FINALIZE starts, and another near when MPI_FINALIZE finishes.",
|
||||
false, false,
|
||||
(int) ompi_notify_init_finalize, &value);
|
||||
ompi_notify_init_finalize = OPAL_INT_TO_BOOL(value);
|
||||
|
||||
/* The ddt engine has a few parameters */
|
||||
return ompi_ddt_register_params();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -147,6 +147,12 @@ OMPI_DECLSPEC extern bool ompi_have_sparse_group_storage;
|
||||
*/
|
||||
OMPI_DECLSPEC extern bool ompi_use_sparse_group_storage;
|
||||
|
||||
/**
|
||||
* Whether we should send notifications during MPI_INIT and
|
||||
* MPI_FINALIZE or not.
|
||||
*/
|
||||
OMPI_DECLSPEC extern bool ompi_notify_init_finalize;
|
||||
|
||||
/**
|
||||
* Register MCA parameters used by the MPI layer.
|
||||
*
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user