|
8 | 8 |
|
9 | 9 | #include "mpir_process.h" |
10 | 10 |
|
| 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 | + |
11 | 29 | /* NOTE-R1: MPIR_REQUEST_KIND__MPROBE signifies that this is a request created by |
12 | 30 | * MPI_Mprobe or MPI_Improbe. Since we use MPI_Request objects as our |
13 | 31 | * MPI_Message objects, we use this separate kind in order to provide stronger |
@@ -319,41 +337,39 @@ extern MPIR_Request MPIR_Request_direct[MPIR_REQUEST_PREALLOC]; |
319 | 337 | } \ |
320 | 338 | } while (0) |
321 | 339 |
|
| 340 | +#else |
| 341 | + |
| 342 | +#define MPIR_REQUEST_SET_INFO(req, ...) do { } while (0) |
| 343 | +#define MPIR_REQUEST_DEBUG(req) do { } while (0) |
| 344 | +#endif |
| 345 | + |
322 | 346 | #define DEBUG_PROGRESS_START \ |
323 | 347 | int iter = 0; \ |
324 | 348 | bool progress_timed_out = false; \ |
325 | 349 | MPL_time_t time_start; \ |
326 | | - if (MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT > 0) { \ |
| 350 | + if (MPIR_CVAR_PROGRESS_TIMEOUT > 0) { \ |
327 | 351 | MPL_wtime(&time_start); \ |
328 | 352 | } |
329 | 353 |
|
330 | 354 | #define DEBUG_PROGRESS_CHECK \ |
331 | | - if (MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT > 0) { \ |
| 355 | + if (MPIR_CVAR_PROGRESS_TIMEOUT > 0) { \ |
332 | 356 | iter++; \ |
333 | 357 | if (iter == 0xffff) {\ |
334 | 358 | double time_diff = 0.0; \ |
335 | 359 | MPL_time_t time_cur; \ |
336 | 360 | MPL_wtime(&time_cur); \ |
337 | 361 | MPL_wtime_diff(&time_start, &time_cur, &time_diff); \ |
338 | | - if (time_diff > MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT && !progress_timed_out) { \ |
| 362 | + if (time_diff > MPIR_CVAR_PROGRESS_TIMEOUT && !progress_timed_out) { \ |
339 | 363 | MPIR_Request_debug(); \ |
340 | 364 | MPL_backtrace_show(stdout); \ |
341 | 365 | progress_timed_out = true; \ |
342 | | - } else if (time_diff > MPIR_CVAR_DEBUG_PROGRESS_TIMEOUT * 2) { \ |
| 366 | + } else if (time_diff > MPIR_CVAR_PROGRESS_TIMEOUT * 2) { \ |
343 | 367 | MPIR_ERR_SETANDJUMP(mpi_errno, MPI_ERR_OTHER, "**timeout"); \ |
344 | 368 | } \ |
345 | 369 | iter = 0; \ |
346 | 370 | } \ |
347 | 371 | } |
348 | 372 |
|
349 | | -#else |
350 | | - |
351 | | -#define MPIR_REQUEST_SET_INFO(req, ...) do { } while (0) |
352 | | -#define MPIR_REQUEST_DEBUG(req) do { } while (0) |
353 | | -#define DEBUG_PROGRESS_START do {} while (0) |
354 | | -#define DEBUG_PROGRESS_CHECK do {} while (0) |
355 | | -#endif |
356 | | - |
357 | 373 | void MPII_init_request(void); |
358 | 374 |
|
359 | 375 | /* To get the benefit of multiple request pool, device layer need register their per-vci lock |
|
0 commit comments