Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ompi/runtime/ompi_mpi_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided)
OMPI_TIMING_NEXT("rte_init");
OMPI_TIMING_IMPORT_OPAL("orte_ess_base_app_setup");
OMPI_TIMING_IMPORT_OPAL("rte_init");
OMPI_TIMING_IMPORT_OPAL("orte_ess_base_proc_binding");

ompi_rte_initialized = true;

Expand Down
12 changes: 12 additions & 0 deletions orte/mca/ess/base/ess_base_fns.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "orte/util/name_fns.h"
#include "orte/util/proc_info.h"
#include "orte/util/show_help.h"
#include "opal/util/timings.h"
#include "orte/runtime/orte_globals.h"

#include "orte/mca/ess/base/base.h"
Expand All @@ -55,6 +56,8 @@ int orte_ess_base_proc_binding(void)
char *error=NULL;
hwloc_cpuset_t mycpus;

OPAL_TIMING_ENV_INIT(proc_binding);

/* Determine if we were pre-bound or not - this also indicates
* that we were launched via mpirun, bound or not */
if (NULL != getenv(OPAL_MCA_PREFIX"orte_bound_at_launch")) {
Expand Down Expand Up @@ -98,12 +101,16 @@ int orte_ess_base_proc_binding(void)
/* the topology system will pickup the binding pattern */
}

OPAL_TIMING_ENV_NEXT(proc_binding, "check if bound");

/* load the topology as we will likely need it */
if (OPAL_SUCCESS != opal_hwloc_base_get_topology()) {
/* there is nothing we can do, so just return */
return ORTE_SUCCESS;
}

OPAL_TIMING_ENV_NEXT(proc_binding, "get_topology()");

/* see if we were bound when launched */
if (!orte_proc_is_bound) {
OPAL_OUTPUT_VERBOSE((5, orte_ess_base_framework.framework_output,
Expand Down Expand Up @@ -285,6 +292,8 @@ int orte_ess_base_proc_binding(void)
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)));
}

OPAL_TIMING_ENV_NEXT(proc_binding, "bind");

MOVEON:
/* get the cpus we are bound to */
mycpus = hwloc_bitmap_alloc();
Expand Down Expand Up @@ -324,6 +333,9 @@ int orte_ess_base_proc_binding(void)
OPAL_MODEX_SEND_VALUE(ret, OPAL_PMIX_GLOBAL, OPAL_PMIX_CPUSET,
orte_process_info.cpuset, OPAL_STRING);
}

OPAL_TIMING_ENV_NEXT(proc_binding, "done");

return ORTE_SUCCESS;

error:
Expand Down