Skip to content

Commit b272f87

Browse files
authored
Merge pull request #2968 from hjelmn/pmix_cray
pmix/cray: performance improvements and cleanup
2 parents ac3c2c5 + 1df6bdd commit b272f87

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

opal/mca/pmix/cray/pmix_cray.c

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2007 The Trustees of Indiana University.
44
* All rights reserved.
55
* Copyright (c) 2011-2016 Cisco Systems, Inc. All rights reserved.
6-
* Copyright (c) 2011-2016 Los Alamos National Security, LLC. All
6+
* Copyright (c) 2011-2017 Los Alamos National Security, LLC. All
77
* rights reserved.
88
* Copyright (c) 2013-2015 Intel, Inc. All rights reserved.
99
* Copyright (c) 2014-2016 Research Organization for Information Science
@@ -784,18 +784,16 @@ static void fencenb(int sd, short args, void *cbdata)
784784
}
785785

786786
/* unpack and stuff in to the dstore */
787+
while (OPAL_SUCCESS == (rc = opal_dss.unpack(buf, &kp, &(int){1}, OPAL_VALUE))) {
788+
OPAL_OUTPUT_VERBOSE((20, opal_pmix_base_framework.framework_output,
789+
"%s pmix:cray unpacked kp with key %s type(%d) for id %s",
790+
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), kp->key, kp->type, OPAL_NAME_PRINT(id)));
787791

788-
cnt = 1;
789-
while (OPAL_SUCCESS == (rc = opal_dss.unpack(buf, &kp, &cnt, OPAL_VALUE))) {
790-
opal_output_verbose(20, opal_pmix_base_framework.framework_output,
791-
"%s pmix:cray unpacked kp with key %s type(%d) for id %s",
792-
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), kp->key, kp->type, OPAL_NAME_PRINT(id));
793792
if (OPAL_SUCCESS != (rc = opal_pmix_base_store(&id, kp))) {
794793
OPAL_ERROR_LOG(rc);
795794
goto fn_exit;
796795
}
797-
OBJ_RELEASE(kp);
798-
cnt = 1;
796+
OBJ_RELEASE(kp);
799797
}
800798

801799
cptr += r_bytes_and_ranks[i].nbytes;
@@ -831,18 +829,18 @@ static void fencenb(int sd, short args, void *cbdata)
831829
for (i=0; i < pmix_nlranks; i++) {
832830
id.vpid = pmix_lranks[i];
833831
id.jobid = pmix_jobid;
834-
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
835-
"%s checking out if %s is local to me",
836-
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
837-
OPAL_NAME_PRINT(id));
832+
OPAL_OUTPUT_VERBOSE((2, opal_pmix_base_framework.framework_output,
833+
"%s checking out if %s is local to me",
834+
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
835+
OPAL_NAME_PRINT(id)));
838836
/* fetch cpuset for this vpid */
839837
OBJ_CONSTRUCT(&vals, opal_list_t);
840838
if (OPAL_SUCCESS != (rc = opal_pmix_base_fetch(&id,
841839
OPAL_PMIX_CPUSET, &vals))) {
842-
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
843-
"%s cpuset for local proc %s not found",
844-
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
845-
OPAL_NAME_PRINT(id));
840+
OPAL_OUTPUT_VERBOSE((2, opal_pmix_base_framework.framework_output,
841+
"%s cpuset for local proc %s not found",
842+
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
843+
OPAL_NAME_PRINT(id)));
846844
OPAL_LIST_DESTRUCT(&vals);
847845
/* even though the cpuset wasn't found, we at least know it is
848846
* on the same node with us */
@@ -917,20 +915,20 @@ static int cray_get(const opal_process_name_t *id, const char *key, opal_list_t
917915
int rc;
918916
opal_list_t vals;
919917

920-
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
921-
"%s pmix:cray getting value for proc %s key %s",
922-
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
923-
OPAL_NAME_PRINT(*id), key);
918+
OPAL_OUTPUT_VERBOSE((2, opal_pmix_base_framework.framework_output,
919+
"%s pmix:cray getting value for proc %s key %s",
920+
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME),
921+
OPAL_NAME_PRINT(*id), key));
924922

925923
OBJ_CONSTRUCT(&vals, opal_list_t);
926924
rc = opal_pmix_base_fetch(id, key, &vals);
927925
if (OPAL_SUCCESS == rc) {
928926
*kv = (opal_value_t*)opal_list_remove_first(&vals);
929927
return OPAL_SUCCESS;
930928
} else {
931-
opal_output_verbose(2, opal_pmix_base_framework.framework_output,
932-
"%s pmix:cray fetch from dstore failed: %d",
933-
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), rc);
929+
OPAL_OUTPUT_VERBOSE((2, opal_pmix_base_framework.framework_output,
930+
"%s pmix:cray fetch from dstore failed: %d",
931+
OPAL_NAME_PRINT(OPAL_PROC_MY_NAME), rc));
934932
}
935933
OPAL_LIST_DESTRUCT(&vals);
936934

orte/mca/schizo/alps/schizo_alps.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ static orte_schizo_launch_environ_t check_launch_environment(void)
6161
myenv = ORTE_SCHIZO_NATIVE_LAUNCHED;
6262
opal_argv_append_nosize(&pushed_envs, OPAL_MCA_PREFIX"ess");
6363
opal_argv_append_nosize(&pushed_vals, "pmi");
64+
/* do not try to bind when launched with aprun. there is a significant
65+
* launch performance penalty for hwloc at high ppn on knl */
66+
opal_argv_append_nosize(&pushed_envs, OPAL_MCA_PREFIX "orte_bound_at_launch");
67+
opal_argv_append_nosize(&pushed_vals, "true");
6468
goto setup;
6569
}
6670

0 commit comments

Comments
 (0)