Minor cleanup in the monitoring PML.
Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
Этот коммит содержится в:
родитель
a7e2bb44d5
Коммит
05093f9cb1
@ -232,7 +232,7 @@ void mca_common_monitoring_finalize( void )
|
||||
{
|
||||
if( ! mca_common_monitoring_enabled || /* Don't release if not last */
|
||||
0 < opal_atomic_sub_fetch_32(&mca_common_monitoring_hold, 1) ) return;
|
||||
|
||||
|
||||
OPAL_MONITORING_PRINT_INFO("common_component_finish");
|
||||
/* Dump monitoring informations */
|
||||
mca_common_monitoring_flush(mca_common_monitoring_output_enabled,
|
||||
@ -253,7 +253,7 @@ void mca_common_monitoring_finalize( void )
|
||||
}
|
||||
}
|
||||
|
||||
void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
int mca_common_monitoring_register(void)
|
||||
{
|
||||
/* Because we are playing tricks with the component close, we should not
|
||||
* use mca_base_component_var_register but instead stay with the basic
|
||||
@ -282,7 +282,6 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
&mca_common_monitoring_output_enabled);
|
||||
|
||||
(void)mca_base_var_register("ompi", "pml", "monitoring", "filename",
|
||||
/*&mca_common_monitoring_component.pmlm_version, "filename",*/
|
||||
"The name of the file where the monitoring information "
|
||||
"should be saved (the filename will be extended with the "
|
||||
"process rank and the \".prof\" extension). If this field "
|
||||
@ -299,10 +298,9 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
* filename to be handled by the framework. It's easier to deal
|
||||
* with the string lifetime.
|
||||
*/
|
||||
if( NULL != mca_common_monitoring_initial_filename )
|
||||
if( NULL != mca_common_monitoring_initial_filename ) {
|
||||
mca_common_monitoring_current_filename = strdup(mca_common_monitoring_initial_filename);
|
||||
|
||||
/* Register PVARs */
|
||||
}
|
||||
|
||||
/* PML PVARs */
|
||||
(void)mca_base_pvar_register("ompi", "pml", "monitoring", "flush", "Flush the monitoring "
|
||||
@ -338,7 +336,7 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG,
|
||||
mca_common_monitoring_get_osc_sent_count, NULL,
|
||||
mca_common_monitoring_comm_size_notify, NULL);
|
||||
|
||||
|
||||
(void)mca_base_pvar_register("ompi", "osc", "monitoring", "messages_sent_size", "Size of "
|
||||
"messages sent through the OSC framework with each peer.",
|
||||
OPAL_INFO_LVL_4, MPI_T_PVAR_CLASS_SIZE,
|
||||
@ -387,7 +385,7 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG,
|
||||
mca_common_monitoring_coll_get_o2a_count, NULL,
|
||||
mca_common_monitoring_coll_messages_notify, NULL);
|
||||
|
||||
|
||||
(void)mca_base_pvar_register("ompi", "coll", "monitoring", "o2a_size", "Size of messages "
|
||||
"exchanged as one-to-all operations in a communicator.",
|
||||
OPAL_INFO_LVL_4, MPI_T_PVAR_CLASS_AGGREGATE,
|
||||
@ -403,7 +401,7 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG,
|
||||
mca_common_monitoring_coll_get_a2o_count, NULL,
|
||||
mca_common_monitoring_coll_messages_notify, NULL);
|
||||
|
||||
|
||||
(void)mca_base_pvar_register("ompi", "coll", "monitoring", "a2o_size", "Size of messages "
|
||||
"exchanged as all-to-one operations in a communicator.",
|
||||
OPAL_INFO_LVL_4, MPI_T_PVAR_CLASS_AGGREGATE,
|
||||
@ -419,7 +417,7 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG,
|
||||
mca_common_monitoring_coll_get_a2a_count, NULL,
|
||||
mca_common_monitoring_coll_messages_notify, NULL);
|
||||
|
||||
|
||||
(void)mca_base_pvar_register("ompi", "coll", "monitoring", "a2a_size", "Size of messages "
|
||||
"exchanged as all-to-all operations in a communicator.",
|
||||
OPAL_INFO_LVL_4, MPI_T_PVAR_CLASS_AGGREGATE,
|
||||
@ -427,6 +425,8 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
|
||||
MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG,
|
||||
mca_common_monitoring_coll_get_a2a_size, NULL,
|
||||
mca_common_monitoring_coll_messages_notify, NULL);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -512,7 +512,7 @@ void mca_common_monitoring_record_pml(int world_rank, size_t data_size, int tag)
|
||||
log2_size = max_size_histogram - 2;
|
||||
opal_atomic_add_fetch_size_t(&size_histogram[world_rank * max_size_histogram + log2_size + 1], 1);
|
||||
}
|
||||
|
||||
|
||||
/* distinguishses positive and negative tags if requested */
|
||||
if( (tag < 0) && (mca_common_monitoring_filter()) ) {
|
||||
opal_atomic_add_fetch_size_t(&filtered_pml_data[world_rank], data_size);
|
||||
|
@ -45,10 +45,10 @@ extern int mca_common_monitoring_enabled;
|
||||
extern int mca_common_monitoring_current_state;
|
||||
extern opal_hash_table_t *common_monitoring_translation_ht;
|
||||
|
||||
OMPI_DECLSPEC void mca_common_monitoring_register(void*pml_monitoring_component);
|
||||
OMPI_DECLSPEC int mca_common_monitoring_init( void );
|
||||
OMPI_DECLSPEC void mca_common_monitoring_finalize( void );
|
||||
OMPI_DECLSPEC int mca_common_monitoring_add_procs(struct ompi_proc_t **procs, size_t nprocs);
|
||||
OMPI_DECLSPEC int mca_common_monitoring_register(void);
|
||||
|
||||
/* Records PML communication */
|
||||
OMPI_DECLSPEC void mca_common_monitoring_record_pml(int world_rank, size_t data_size, int tag);
|
||||
|
@ -126,7 +126,7 @@ static int mca_pml_monitoring_component_finish(void)
|
||||
mca_base_component_list_item_t *cli = NULL;
|
||||
OPAL_LIST_FOREACH(cli, &ompi_pml_base_framework.framework_components, mca_base_component_list_item_t) {
|
||||
component = (mca_pml_base_component_t *) cli->cli_component;
|
||||
|
||||
|
||||
if( component == &mca_pml_monitoring_component ) {
|
||||
opal_list_remove_item(&ompi_pml_base_framework.framework_components, (opal_list_item_t*)cli);
|
||||
OBJ_RELEASE(cli);
|
||||
@ -182,12 +182,6 @@ static int mca_pml_monitoring_component_finish(void)
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
static int mca_pml_monitoring_component_register(void)
|
||||
{
|
||||
mca_common_monitoring_register(&mca_pml_monitoring_component);
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
mca_pml_base_component_2_0_0_t mca_pml_monitoring_component = {
|
||||
|
||||
/* First, the mca_base_component_t struct containing meta
|
||||
@ -200,7 +194,7 @@ mca_pml_base_component_2_0_0_t mca_pml_monitoring_component = {
|
||||
MCA_MONITORING_MAKE_VERSION,
|
||||
.mca_open_component = mca_pml_monitoring_component_open, /* component open */
|
||||
.mca_close_component = NULL, /* component close */
|
||||
.mca_register_component_params = mca_pml_monitoring_component_register
|
||||
.mca_register_component_params = mca_common_monitoring_register
|
||||
},
|
||||
.pmlm_data = {
|
||||
/* The component is checkpoint ready */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user