diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index e9beebb4e9..43e83eae44 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -643,7 +643,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) } OMPI_TIMING_IMPORT_OPAL("orte_init"); - OMPI_TIMING_NEXT("rte_init-modex"); + OMPI_TIMING_IMPORT_OPAL("opal_init_util"); + OMPI_TIMING_NEXT("rte_init-commit"); /* exchange connection info - this function may also act as a barrier @@ -651,6 +652,8 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) * in our job. If a barrier is required, the "modex" function will * perform it internally */ opal_pmix.commit(); + OMPI_TIMING_NEXT("commit"); + if (!opal_pmix_base_async_modex) { if (NULL != opal_pmix.fence_nb) { active = true; diff --git a/opal/runtime/opal_init.c b/opal/runtime/opal_init.c index 3ac42f5b83..cf9804ff10 100644 --- a/opal/runtime/opal_init.c +++ b/opal/runtime/opal_init.c @@ -71,6 +71,7 @@ #include "opal/util/stacktrace.h" #include "opal/util/keyval_parse.h" #include "opal/util/sys_limits.h" +#include "opal/util/timings.h" #if OPAL_CC_USE_PRAGMA_IDENT #pragma ident OPAL_IDENT_STRING @@ -341,6 +342,7 @@ opal_init_util(int* pargc, char*** pargv) int ret; char *error = NULL; char hostname[OPAL_MAXHOSTNAMELEN]; + OPAL_TIMING_ENV_INIT(otmng); if( ++opal_util_initialized != 1 ) { if( opal_util_initialized < 1 ) { @@ -363,6 +365,8 @@ opal_init_util(int* pargc, char*** pargv) /* initialize the memory allocator */ opal_malloc_init(); + OPAL_TIMING_ENV_NEXT(otmng, "opal_malloc_init"); + /* initialize the output system */ opal_output_init(); @@ -376,6 +380,8 @@ opal_init_util(int* pargc, char*** pargv) /* initialize the help system */ opal_show_help_init(); + OPAL_TIMING_ENV_NEXT(otmng, "opal_show_help_init"); + /* register handler for errnum -> string converstion */ if (OPAL_SUCCESS != (ret = opal_error_register("OPAL", @@ -394,11 +400,14 @@ opal_init_util(int* pargc, char*** pargv) // details) opal_init_psm(); + OPAL_TIMING_ENV_NEXT(otmng, "opal_init_psm"); + /* Setup the parameter system */ if (OPAL_SUCCESS != (ret = mca_base_var_init())) { error = "mca_base_var_init"; goto return_error; } + OPAL_TIMING_ENV_NEXT(otmng, "opal_var_init"); /* read any param files that were provided */ if (OPAL_SUCCESS != (ret = mca_base_var_cache_files(false))) { @@ -406,6 +415,8 @@ opal_init_util(int* pargc, char*** pargv) goto return_error; } + OPAL_TIMING_ENV_NEXT(otmng, "opal_var_cache"); + /* register params for opal */ if (OPAL_SUCCESS != (ret = opal_register_params())) { @@ -418,6 +429,8 @@ opal_init_util(int* pargc, char*** pargv) goto return_error; } + OPAL_TIMING_ENV_NEXT(otmng, "opal_net_init"); + /* pretty-print stack handlers */ if (OPAL_SUCCESS != (ret = opal_util_register_stackhandlers())) { error = "opal_util_register_stackhandlers"; @@ -440,12 +453,16 @@ opal_init_util(int* pargc, char*** pargv) goto return_error; } + OPAL_TIMING_ENV_NEXT(otmng, "opal_arch_init"); + /* initialize the datatype engine */ if (OPAL_SUCCESS != (ret = opal_datatype_init ())) { error = "opal_datatype_init"; goto return_error; } + OPAL_TIMING_ENV_NEXT(otmng, "opal_datatype_init"); + /* Initialize the data storage service. */ if (OPAL_SUCCESS != (ret = opal_dss_open())) { error = "opal_dss_open"; @@ -465,6 +482,8 @@ opal_init_util(int* pargc, char*** pargv) return ret; } + OPAL_TIMING_ENV_NEXT(otmng, "opal_if_init"); + return OPAL_SUCCESS; return_error: