Skip to content

Commit d2b6039

Browse files
author
Ralph Castain
authored
Merge pull request #3383 from rhc54/topic/timing
Increase fine grain of timing info
2 parents 46ea7bf + c86f713 commit d2b6039

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

ompi/runtime/ompi_mpi_init.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,14 +643,17 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
643643
}
644644

645645
OMPI_TIMING_IMPORT_OPAL("orte_init");
646-
OMPI_TIMING_NEXT("rte_init-modex");
646+
OMPI_TIMING_IMPORT_OPAL("opal_init_util");
647+
OMPI_TIMING_NEXT("rte_init-commit");
647648

648649

649650
/* exchange connection info - this function may also act as a barrier
650651
* if data exchange is required. The modex occurs solely across procs
651652
* in our job. If a barrier is required, the "modex" function will
652653
* perform it internally */
653654
opal_pmix.commit();
655+
OMPI_TIMING_NEXT("commit");
656+
654657
if (!opal_pmix_base_async_modex) {
655658
if (NULL != opal_pmix.fence_nb) {
656659
active = true;

opal/runtime/opal_init.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
#include "opal/util/stacktrace.h"
7272
#include "opal/util/keyval_parse.h"
7373
#include "opal/util/sys_limits.h"
74+
#include "opal/util/timings.h"
7475

7576
#if OPAL_CC_USE_PRAGMA_IDENT
7677
#pragma ident OPAL_IDENT_STRING
@@ -341,6 +342,7 @@ opal_init_util(int* pargc, char*** pargv)
341342
int ret;
342343
char *error = NULL;
343344
char hostname[OPAL_MAXHOSTNAMELEN];
345+
OPAL_TIMING_ENV_INIT(otmng);
344346

345347
if( ++opal_util_initialized != 1 ) {
346348
if( opal_util_initialized < 1 ) {
@@ -363,6 +365,8 @@ opal_init_util(int* pargc, char*** pargv)
363365
/* initialize the memory allocator */
364366
opal_malloc_init();
365367

368+
OPAL_TIMING_ENV_NEXT(otmng, "opal_malloc_init");
369+
366370
/* initialize the output system */
367371
opal_output_init();
368372

@@ -376,6 +380,8 @@ opal_init_util(int* pargc, char*** pargv)
376380
/* initialize the help system */
377381
opal_show_help_init();
378382

383+
OPAL_TIMING_ENV_NEXT(otmng, "opal_show_help_init");
384+
379385
/* register handler for errnum -> string converstion */
380386
if (OPAL_SUCCESS !=
381387
(ret = opal_error_register("OPAL",
@@ -394,18 +400,23 @@ opal_init_util(int* pargc, char*** pargv)
394400
// details)
395401
opal_init_psm();
396402

403+
OPAL_TIMING_ENV_NEXT(otmng, "opal_init_psm");
404+
397405
/* Setup the parameter system */
398406
if (OPAL_SUCCESS != (ret = mca_base_var_init())) {
399407
error = "mca_base_var_init";
400408
goto return_error;
401409
}
410+
OPAL_TIMING_ENV_NEXT(otmng, "opal_var_init");
402411

403412
/* read any param files that were provided */
404413
if (OPAL_SUCCESS != (ret = mca_base_var_cache_files(false))) {
405414
error = "failed to cache files";
406415
goto return_error;
407416
}
408417

418+
OPAL_TIMING_ENV_NEXT(otmng, "opal_var_cache");
419+
409420

410421
/* register params for opal */
411422
if (OPAL_SUCCESS != (ret = opal_register_params())) {
@@ -418,6 +429,8 @@ opal_init_util(int* pargc, char*** pargv)
418429
goto return_error;
419430
}
420431

432+
OPAL_TIMING_ENV_NEXT(otmng, "opal_net_init");
433+
421434
/* pretty-print stack handlers */
422435
if (OPAL_SUCCESS != (ret = opal_util_register_stackhandlers())) {
423436
error = "opal_util_register_stackhandlers";
@@ -440,12 +453,16 @@ opal_init_util(int* pargc, char*** pargv)
440453
goto return_error;
441454
}
442455

456+
OPAL_TIMING_ENV_NEXT(otmng, "opal_arch_init");
457+
443458
/* initialize the datatype engine */
444459
if (OPAL_SUCCESS != (ret = opal_datatype_init ())) {
445460
error = "opal_datatype_init";
446461
goto return_error;
447462
}
448463

464+
OPAL_TIMING_ENV_NEXT(otmng, "opal_datatype_init");
465+
449466
/* Initialize the data storage service. */
450467
if (OPAL_SUCCESS != (ret = opal_dss_open())) {
451468
error = "opal_dss_open";
@@ -465,6 +482,8 @@ opal_init_util(int* pargc, char*** pargv)
465482
return ret;
466483
}
467484

485+
OPAL_TIMING_ENV_NEXT(otmng, "opal_if_init");
486+
468487
return OPAL_SUCCESS;
469488

470489
return_error:

0 commit comments

Comments
 (0)