Skip to content

Commit 0c0a478

Browse files
committed
request: new cvar name MPIR_CVAR_PROGRESS_TIMEOUT
Now we made the progress timeout cvar always available, rename it to MPIR_CVAR_PROGRESS_TIMEOUT. Also move the cvar block to src/include/mpir_request.h where it is being used.
1 parent 78f44af commit 0c0a478

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# MPIR_CHKLMEM_ and MPIR_CHKPMEM_ macros are simplified, removing non-essential
55
argument such as type case and custom error messages.
66

7+
# Rename MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT to MPIR_CVAR_PROGRESS_TIMEOUT, and
8+
enable it whether or not --enable-g=progress is used in configure.
9+
710
===============================================================================
811
Changes in 4.3
912
===============================================================================

src/include/mpir_request.h

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@
88

99
#include "mpir_process.h"
1010

11+
/*
12+
=== BEGIN_MPI_T_CVAR_INFO_BLOCK ===
13+
14+
cvars:
15+
- name : MPIR_CVAR_PROGRESS_TIMEOUT
16+
category : CH4
17+
type : int
18+
default : 0
19+
class : none
20+
verbosity : MPI_T_VERBOSITY_USER_BASIC
21+
scope : MPI_T_SCOPE_LOCAL
22+
description : >-
23+
Sets the timeout in seconds to dump outstanding requests when progress wait is not making progress for some time.
24+
25+
26+
=== END_MPI_T_CVAR_INFO_BLOCK ===
27+
*/
28+
1129
/* NOTE-R1: MPIR_REQUEST_KIND__MPROBE signifies that this is a request created by
1230
* MPI_Mprobe or MPI_Improbe. Since we use MPI_Request objects as our
1331
* MPI_Message objects, we use this separate kind in order to provide stronger
@@ -329,23 +347,23 @@ extern MPIR_Request MPIR_Request_direct[MPIR_REQUEST_PREALLOC];
329347
int iter = 0; \
330348
bool progress_timed_out = false; \
331349
MPL_time_t time_start; \
332-
if (MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT > 0) { \
350+
if (MPIR_CVAR_PROGRESS_TIMEOUT > 0) { \
333351
MPL_wtime(&time_start); \
334352
}
335353

336354
#define DEBUG_PROGRESS_CHECK \
337-
if (MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT > 0) { \
355+
if (MPIR_CVAR_PROGRESS_TIMEOUT > 0) { \
338356
iter++; \
339357
if (iter == 0xffff) {\
340358
double time_diff = 0.0; \
341359
MPL_time_t time_cur; \
342360
MPL_wtime(&time_cur); \
343361
MPL_wtime_diff(&time_start, &time_cur, &time_diff); \
344-
if (time_diff > MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT && !progress_timed_out) { \
362+
if (time_diff > MPIR_CVAR_PROGRESS_TIMEOUT && !progress_timed_out) { \
345363
MPIR_Request_debug(); \
346364
MPL_backtrace_show(stdout); \
347365
progress_timed_out = true; \
348-
} else if (time_diff > MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT * 2) { \
366+
} else if (time_diff > MPIR_CVAR_PROGRESS_TIMEOUT * 2) { \
349367
MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**timeout"); \
350368
} \
351369
iter = 0; \

src/mpi/request/request_impl.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,6 @@ categories :
5353
in MPI_Waitall and MPI_Testall implementation. A large number
5454
is likely to cause more cache misses.
5555
56-
- name : MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT
57-
category : CH4
58-
type : int
59-
default : 0
60-
class : none
61-
verbosity : MPI_T_VERBOSITY_USER_BASIC
62-
scope : MPI_T_SCOPE_LOCAL
63-
description : >-
64-
Sets the timeout in seconds to dump outstanding requests when progress wait is not making progress for some time.
65-
6656
=== END_MPI_T_CVAR_INFO_BLOCK ===
6757
*/
6858

0 commit comments

Comments
 (0)