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
22 changes: 22 additions & 0 deletions src/mpid/ch4/shm/posix/posix_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@
description : >-
Controls topology-aware communication in POSIX.

- name : MPIR_CVAR_CH4_SHM_POSIX_PROGRESS_RECV_LOOPS
category : CH4
type : int
default : 1
class : none
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Controls the maximum number of polling on recv queue
per progress.

- name : MPIR_CVAR_CH4_SHM_POSIX_PROGRESS_SEND_LOOPS
category : CH4
type : int
default : 1
class : none
verbosity : MPI_T_VERBOSITY_USER_BASIC
scope : MPI_T_SCOPE_ALL_EQ
description : >-
Controls the maximum number of polling on send queue (for
deferred sends) per progress.

=== END_MPI_T_CVAR_INFO_BLOCK ===
*/

Expand Down
22 changes: 18 additions & 4 deletions src/mpid/ch4/shm/posix/posix_progress.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,25 @@ MPL_STATIC_INLINE_PREFIX int MPIDI_POSIX_progress(int vci, int *made_progress)

MPIR_Assert(vci < MPIDI_POSIX_global.num_vcis);

mpi_errno = MPIDI_POSIX_progress_recv(vci, made_progress);
MPIR_ERR_CHECK(mpi_errno);
for (int i = 0; i < MPIR_CVAR_CH4_SHM_POSIX_PROGRESS_RECV_LOOPS; i++) {
int made_recv_progress = 0;
mpi_errno = MPIDI_POSIX_progress_recv(vci, &made_recv_progress);
MPIR_ERR_CHECK(mpi_errno);
if (!made_recv_progress)
break;

*made_progress |= made_recv_progress;
}

for (int i = 0; i < MPIR_CVAR_CH4_SHM_POSIX_PROGRESS_SEND_LOOPS; i++) {
int made_send_progress = 0;
mpi_errno = MPIDI_POSIX_progress_send(vci, &made_send_progress);
MPIR_ERR_CHECK(mpi_errno);
if (!made_send_progress)
break;

mpi_errno = MPIDI_POSIX_progress_send(vci, made_progress);
MPIR_ERR_CHECK(mpi_errno);
*made_progress |= made_send_progress;
}

fn_exit:
MPIR_FUNC_EXIT;
Expand Down