diff --git a/src/broker/broker.c b/src/broker/broker.c index 9de1bf4207d4..10d58a152ab1 100644 --- a/src/broker/broker.c +++ b/src/broker/broker.c @@ -420,8 +420,11 @@ int main (int argc, char *argv[]) /* Boot with PMI. */ double pmi_elapsed_sec; + struct timespec pmi_start_time; + monotime (&pmi_start_time); if (boot_pmi (ctx.overlay, ctx.attrs, ctx.tbon_k, &pmi_elapsed_sec) < 0) log_msg_exit ("bootstrap failed"); + pmi_elapsed_sec = monotime_since (pmi_start_time) / 1000; uint32_t rank = overlay_get_rank(ctx.overlay); uint32_t size = overlay_get_size(ctx.overlay); @@ -1084,14 +1087,11 @@ static int boot_pmi (overlay_t *overlay, attr_t *attrs, int tbon_k, char *val = NULL; int e; int rc = -1; - struct timespec start_time; const char *attrtbonendpoint; char *tbonendpoint = NULL; const char *attrmcastendpoint; char *mcastendpoint = NULL; - monotime (&start_time); - if ((e = PMI_Init (&spawned)) != PMI_SUCCESS) { log_msg ("PMI_Init: %s", pmi_strerror (e)); goto done; @@ -1332,7 +1332,6 @@ static int boot_pmi (overlay_t *overlay, attr_t *attrs, int tbon_k, PMI_Finalize (); rc = 0; done: - *elapsed_sec = monotime_since (start_time) / 1000; if (clique_ranks) free (clique_ranks); if (kvsname)