From f58be9f91bd2b883798ee51cb0043cf21e356089 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sat, 7 Dec 2024 19:27:27 -0700 Subject: [PATCH] Correctly parse map-by modifiers There can be multiple modifiers, so need to allow for that when parsing them by ensuring all modifiers are passed to the check_modifiers function. Signed-off-by: Ralph Castain (cherry picked from commit e2af1aa5039a7c4d6f215439ba18b2397338e3a3) --- src/mca/rmaps/base/rmaps_base_frame.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mca/rmaps/base/rmaps_base_frame.c b/src/mca/rmaps/base/rmaps_base_frame.c index 25375c8949..e9b140013c 100644 --- a/src/mca/rmaps/base/rmaps_base_frame.c +++ b/src/mca/rmaps/base/rmaps_base_frame.c @@ -492,12 +492,12 @@ int prte_rmaps_base_set_mapping_policy(prte_job_t *jdata, char *inspec) PMIX_ARGV_FREE_COMPAT(ck); goto setpolicy; } - cptr = ck[3]; + PMIX_ARGV_JOIN(cptr, &ck[3], ':'); } else { + PMIX_ARGV_JOIN(cptr, &ck[1], ':'); pmix_output_verbose(5, prte_rmaps_base_framework.framework_output, "%s rmaps:base policy %s modifiers %s provided", - PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), ck[0], ck[1]); - cptr = ck[1]; + PRTE_NAME_PRINT(PRTE_PROC_MY_NAME), ck[0], cptr); } if (PRTE_SUCCESS != (rc = check_modifiers(cptr, jdata, &tmp)) && PRTE_ERR_TAKE_NEXT_OPTION != rc) { @@ -506,6 +506,7 @@ int prte_rmaps_base_set_mapping_policy(prte_job_t *jdata, char *inspec) rc = PRTE_ERR_SILENT; } PMIX_ARGV_FREE_COMPAT(ck); + free(cptr); return rc; } if (ppr) {