@@ -232,7 +232,7 @@ void mca_common_monitoring_finalize( void )
232232{
233233 if ( ! mca_common_monitoring_enabled || /* Don't release if not last */
234234 0 < opal_atomic_sub_fetch_32 (& mca_common_monitoring_hold , 1 ) ) return ;
235-
235+
236236 OPAL_MONITORING_PRINT_INFO ("common_component_finish" );
237237 /* Dump monitoring informations */
238238 mca_common_monitoring_flush (mca_common_monitoring_output_enabled ,
@@ -253,7 +253,7 @@ void mca_common_monitoring_finalize( void )
253253 }
254254}
255255
256- void mca_common_monitoring_register (void * pml_monitoring_component )
256+ int mca_common_monitoring_register (void )
257257{
258258 /* Because we are playing tricks with the component close, we should not
259259 * 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)
282282 & mca_common_monitoring_output_enabled );
283283
284284 (void )mca_base_var_register ("ompi" , "pml" , "monitoring" , "filename" ,
285- /*&mca_common_monitoring_component.pmlm_version, "filename",*/
286285 "The name of the file where the monitoring information "
287286 "should be saved (the filename will be extended with the "
288287 "process rank and the \".prof\" extension). If this field "
@@ -299,10 +298,9 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
299298 * filename to be handled by the framework. It's easier to deal
300299 * with the string lifetime.
301300 */
302- if ( NULL != mca_common_monitoring_initial_filename )
301+ if ( NULL != mca_common_monitoring_initial_filename ) {
303302 mca_common_monitoring_current_filename = strdup (mca_common_monitoring_initial_filename );
304-
305- /* Register PVARs */
303+ }
306304
307305 /* PML PVARs */
308306 (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)
338336 MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG ,
339337 mca_common_monitoring_get_osc_sent_count , NULL ,
340338 mca_common_monitoring_comm_size_notify , NULL );
341-
339+
342340 (void )mca_base_pvar_register ("ompi" , "osc" , "monitoring" , "messages_sent_size" , "Size of "
343341 "messages sent through the OSC framework with each peer." ,
344342 OPAL_INFO_LVL_4 , MPI_T_PVAR_CLASS_SIZE ,
@@ -387,7 +385,7 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
387385 MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG ,
388386 mca_common_monitoring_coll_get_o2a_count , NULL ,
389387 mca_common_monitoring_coll_messages_notify , NULL );
390-
388+
391389 (void )mca_base_pvar_register ("ompi" , "coll" , "monitoring" , "o2a_size" , "Size of messages "
392390 "exchanged as one-to-all operations in a communicator." ,
393391 OPAL_INFO_LVL_4 , MPI_T_PVAR_CLASS_AGGREGATE ,
@@ -403,7 +401,7 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
403401 MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG ,
404402 mca_common_monitoring_coll_get_a2o_count , NULL ,
405403 mca_common_monitoring_coll_messages_notify , NULL );
406-
404+
407405 (void )mca_base_pvar_register ("ompi" , "coll" , "monitoring" , "a2o_size" , "Size of messages "
408406 "exchanged as all-to-one operations in a communicator." ,
409407 OPAL_INFO_LVL_4 , MPI_T_PVAR_CLASS_AGGREGATE ,
@@ -419,14 +417,16 @@ void mca_common_monitoring_register(void*pml_monitoring_component)
419417 MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG ,
420418 mca_common_monitoring_coll_get_a2a_count , NULL ,
421419 mca_common_monitoring_coll_messages_notify , NULL );
422-
420+
423421 (void )mca_base_pvar_register ("ompi" , "coll" , "monitoring" , "a2a_size" , "Size of messages "
424422 "exchanged as all-to-all operations in a communicator." ,
425423 OPAL_INFO_LVL_4 , MPI_T_PVAR_CLASS_AGGREGATE ,
426424 MCA_MONITORING_VAR_TYPE , NULL , MPI_T_BIND_MPI_COMM ,
427425 MCA_BASE_PVAR_FLAG_READONLY | MCA_BASE_PVAR_FLAG_IWG ,
428426 mca_common_monitoring_coll_get_a2a_size , NULL ,
429427 mca_common_monitoring_coll_messages_notify , NULL );
428+
429+ return OMPI_SUCCESS ;
430430}
431431
432432/**
@@ -512,7 +512,7 @@ void mca_common_monitoring_record_pml(int world_rank, size_t data_size, int tag)
512512 log2_size = max_size_histogram - 2 ;
513513 opal_atomic_add_fetch_size_t (& size_histogram [world_rank * max_size_histogram + log2_size + 1 ], 1 );
514514 }
515-
515+
516516 /* distinguishses positive and negative tags if requested */
517517 if ( (tag < 0 ) && (mca_common_monitoring_filter ()) ) {
518518 opal_atomic_add_fetch_size_t (& filtered_pml_data [world_rank ], data_size );
0 commit comments