Skip to content

Commit 0db92e6

Browse files
committed
OMPI timing: fix two minor bugs
1. In ompi_mpi_init, fix a typo that was causing a meaningless / ignored computation instead of an assignment. 2. Fix the name of a shadowed variable in the OMPI_TIMING_OUT macro. Signed-off-by: Jeff Squyres <[email protected]>
1 parent 6989a73 commit 0db92e6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ompi/runtime/ompi_mpi_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2006-2018 Cisco Systems, Inc. All rights reserved
13+
* Copyright (c) 2006-2022 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2006-2015 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2006-2009 University of Houston. All rights reserved.
@@ -728,7 +728,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided,
728728
if (OMPI_TIMING_ENABLED && !opal_pmix_base_async_modex &&
729729
opal_pmix_collect_all_data && !ompi_singleton) {
730730
if (PMIX_SUCCESS != (rc = PMIx_Fence(NULL, 0, NULL, 0))) {
731-
ret - opal_pmix_convert_status(rc);
731+
ret = opal_pmix_convert_status(rc);
732732
error = "timing: pmix-barrier-1 failed";
733733
goto error;
734734
}

ompi/util/timings.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ typedef struct ompi_timing_t {
169169
int i; \
170170
int size = ompi_comm_size(MPI_COMM_WORLD); \
171171
int rank = ompi_comm_rank(MPI_COMM_WORLD); \
172-
int error = 0; \
172+
int timing_error = 0; \
173173
int imported = 0; \
174174
\
175-
MPI_COMM_WORLD->c_coll->coll_reduce(&OMPI_TIMING.error, &error, 1, \
175+
MPI_COMM_WORLD->c_coll->coll_reduce(&OMPI_TIMING.error, &timing_error, 1, \
176176
MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD, \
177177
MPI_COMM_WORLD->c_coll->coll_reduce_module); \
178178
\
179-
if (error) { \
179+
if (timing_error) { \
180180
if (0 == rank) { \
181181
printf("==OMPI_TIMING== error: something went wrong, timings doesn't work\n"); \
182182
} \

0 commit comments

Comments
 (0)