Skip to content

Commit

Permalink
Add -prot/-protlazy to OMPI CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
  • Loading branch information
jjhursey committed Jan 7, 2021
1 parent 2c38756 commit 67bb453
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/mca/schizo/ompi/schizo_ompi.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ static prte_cmd_line_init_t cmd_line_init[] = {
"Forward mpirun port to compute node daemons so all will use it",
PRTE_CMD_LINE_OTYPE_DVM },

/* Protocol : MPI_Init */
{ '\0', "prot", 0, PRTE_CMD_LINE_TYPE_BOOL,
"Display table of communication methods between ranks during MPI_Init",
PRTE_CMD_LINE_OTYPE_GENERAL },

/* Protocol : MPI_Finalize */
{ '\0', "protlazy", 0, PRTE_CMD_LINE_TYPE_BOOL,
"Display table of communication methods between ranks during MPI_Finalize",
PRTE_CMD_LINE_OTYPE_GENERAL },


/* End of list */
{ '\0', NULL, 0, PRTE_CMD_LINE_TYPE_NULL, NULL }
Expand Down Expand Up @@ -890,6 +900,16 @@ static int parse_env(prte_cmd_line_t *cmd_line,
}
}

if (prte_cmd_line_is_taken(cmd_line, "prot") && prte_cmd_line_is_taken(cmd_line, "protlazy")) {
prte_setenv("OMPI_MCA_ompi_comm_method", "mpi_init,mpi_finalize", true, dstenv);
}
else if (prte_cmd_line_is_taken(cmd_line, "prot")) {
prte_setenv("OMPI_MCA_ompi_comm_method", "mpi_init", true, dstenv);
}
else if (prte_cmd_line_is_taken(cmd_line, "protlazy")) {
prte_setenv("OMPI_MCA_ompi_comm_method", "mpi_finalize", true, dstenv);
}

/* now look for any "--mca" options - note that it is an error
* for the same MCA param to be given more than once if the
* values differ */
Expand Down

0 comments on commit 67bb453

Please sign in to comment.