Skip to content

Commit 8ee4753

Browse files
committed
MPI 4.1: add support for memory-alloc-kinds
Changes will need to be made to Open MPI to parse the contents of the OMPI_MCA_mpi_memory_alloc_kinds environment variable to determine how to use the user supplied memory-alloc-kinds information. See section 11.4.3 of the MPI 4.1 standard. Signed-off-by: Howard Pritchard <howardp@lanl.gov> (cherry picked from commit c5953e1)
1 parent f0bc7f2 commit 8ee4753

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/mca/schizo/ompi/schizo-ompi-cli.rstxt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Copyright (c) 2022 Cisco Systems, Inc. All rights reserved.
55
Copyright (c) 2022 IBM Corporation. All rights reserved.
66
Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved.
7+
Copyright (c) 2024 Triad National Security, LLC. All rights reserved.
8+
79
$COPYRIGHT$
810
911
Additional copyrights may follow
@@ -159,6 +161,8 @@ MPI Options
159161

160162
* ``--initial-errhandler``: Specify the initial error handler that is
161163
attached to predefined communicators during the first MPI call.
164+
* ``--memory-alloc-kinds``: Value is a comma separated list of
165+
memory allocation kinds.
162166
* ``--display-comm``: Display table of communication methods between
163167
MPI_COMM_WORLD ranks during MPI_Init
164168
* ``--display-comm-finalize``: Display table of communication methods

src/mca/schizo/ompi/schizo_ompi.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* and Technology (RIST). All rights reserved.
2020
* Copyright (c) 2018-2022 IBM Corporation. All rights reserved.
2121
* Copyright (c) 2021-2024 Nanook Consulting All rights reserved.
22-
* Copyright (c) 2022 Triad National Security, LLC. All rights
22+
* Copyright (c) 2022-2024 Triad National Security, LLC. All rights
2323
* reserved.
2424
* $COPYRIGHT$
2525
*
@@ -194,8 +194,10 @@ static struct option ompioptions[] = {
194194
PMIX_OPTION_DEFINE(PRTE_CLI_CONTINUOUS, PMIX_ARG_NONE),
195195
PMIX_OPTION_DEFINE("with-ft", PMIX_ARG_REQD),
196196

197-
/* mpiexec mandated form launch key parameters */
197+
/* mpiexec mandated form launch key parameters - MPI 4.0 */
198198
PMIX_OPTION_DEFINE("initial-errhandler", PMIX_ARG_REQD),
199+
/* mpiexec mandated form launch key parameters - MPI 4.1*/
200+
PMIX_OPTION_DEFINE("memory-alloc-kinds", PMIX_ARG_REQD),
199201

200202
/* Display Commumication Protocol : MPI_Init */
201203
PMIX_OPTION_DEFINE("display-comm", PMIX_ARG_NONE),
@@ -1575,6 +1577,15 @@ static int parse_env(char **srcenv, char ***dstenv,
15751577
}
15761578
}
15771579

1580+
if (NULL != (opt = pmix_cmd_line_get_param(results, "memory-alloc-kinds"))) {
1581+
rc = check_cache(&cache, &cachevals, "mpi_memory_alloc_kinds", opt->values[0]);
1582+
if (PRTE_SUCCESS != rc) {
1583+
PMIX_ARGV_FREE_COMPAT(cache);
1584+
PMIX_ARGV_FREE_COMPAT(cachevals);
1585+
return rc;
1586+
}
1587+
}
1588+
15781589
if (pmix_cmd_line_is_taken(results, "display-comm") &&
15791590
pmix_cmd_line_is_taken(results, "display-comm-finalize")) {
15801591
PMIX_SETENV_COMPAT("OMPI_MCA_ompi_display_comm", "mpi_init,mpi_finalize", true, dstenv);

0 commit comments

Comments
 (0)