Skip to content

Commit

Permalink
setup: add debug msg to print cnt of inited cvars
Browse files Browse the repository at this point in the history
  • Loading branch information
minsii committed May 11, 2021
1 parent ecd302a commit 00abdea
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/internal/setup_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,20 +691,20 @@ static void initialize_env(void)
OSHMPI_env.enable_mpit = 0;
}

static void set_mpit_cvar(const char *cvar_name, const void *val)
static int set_mpit_cvar(const char *cvar_name, const void *val)
{
int mpi_errno = MPI_SUCCESS;

/* Do not overwrite user's setting */
char *env_var = NULL;
env_var = getenv(cvar_name);
if (env_var && strlen(env_var))
return;
return 0;

int cvar_index;
OSHMPI_CALLMPI_RET(mpi_errno, MPI_T_cvar_get_index(cvar_name, &cvar_index));
if (mpi_errno == MPI_T_ERR_INVALID_NAME)
return; /* Support of a CVAR is implementation specific */
return 0; /* Support of a CVAR is implementation specific */

MPI_T_cvar_handle handle;
int count;
Expand All @@ -717,15 +717,18 @@ static void set_mpit_cvar(const char *cvar_name, const void *val)
OSHMPI_DBGMSG("MPI_T setup: %s = %d\n", cvar_name, val_read);

MPI_T_cvar_handle_free(&handle);
return 1;
}

static void initialize_mpit(void)
{
if (!OSHMPI_env.enable_mpit)
return;

int val = 1;
set_mpit_cvar("MPIR_CVAR_CH4_RMA_ENABLE_DYNAMIC_AM_PROGRESS", &val);
int val = 1, cnt = 0;
cnt += set_mpit_cvar("MPIR_CVAR_CH4_RMA_ENABLE_DYNAMIC_AM_PROGRESS", &val);

OSHMPI_DBGMSG("Initialized %d MPI_T CVAR variables\n", cnt);
}

void OSHMPI_initialize_thread(int required, int *provided)
Expand Down

0 comments on commit 00abdea

Please sign in to comment.