Skip to content

Commit 5f68d65

Browse files
author
rhc54
authored
Merge pull request #2651 from rhc54/topic/minor
Minor cleanups
2 parents 56b1e10 + e8aea2e commit 5f68d65

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

opal/mca/pmix/pmix2x/configure.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ AC_DEFUN([MCA_opal_pmix_pmix2x_CONFIG],[
4949
opal_pmix_pmix2x_sm_flag=--disable-dstore
5050
fi
5151

52-
opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX3X_ $opal_pmix_pmix2x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\" --enable-embedded-hwloc --with-hwloc-header=\\\"$opal_hwloc_base_include\\\""
52+
opal_pmix_pmix2x_args="--with-pmix-symbol-rename=OPAL_MCA_PMIX3X_ $opal_pmix_pmix2x_sm_flag --without-tests-examples --disable-visibility --enable-embedded-libevent --with-libevent-header=\\\"opal/mca/event/$opal_event_base_include\\\""
5353
AS_IF([test "$enable_debug" = "yes"],
5454
[opal_pmix_pmix2x_args="--enable-debug $opal_pmix_pmix2x_args"
5555
CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"],

opal/mca/pmix/pmix2x/pmix2x_client.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ int pmix2x_store_local(const opal_process_name_t *proc, opal_value_t *val)
192192
}
193193
}
194194
if (NULL == job) {
195-
OPAL_ERROR_LOG(OPAL_ERR_NOT_FOUND);
196195
return OPAL_ERR_NOT_FOUND;
197196
}
198197
(void)strncpy(p.nspace, job->nspace, PMIX_MAX_NSLEN);

orte/test/mpi/binding.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <sys/types.h>
1111
#include <unistd.h>
1212
#include <sched.h>
13-
#include "opal/mca/hwloc/hwloc.h"
13+
#include "opal/mca/hwloc/base/base.h"
1414
#include "mpi.h"
1515

1616
#include "orte/util/proc_info.h"
@@ -19,7 +19,7 @@ int main(int argc, char* argv[])
1919
{
2020
int rank, size, rc;
2121
hwloc_cpuset_t cpus;
22-
char *bindings;
22+
char *bindings = NULL;
2323
cpu_set_t *mask;
2424
int nrcpus, c;
2525
size_t csize;
@@ -30,9 +30,12 @@ int main(int argc, char* argv[])
3030
MPI_Comm_size(MPI_COMM_WORLD, &size);
3131

3232
gethostname(hostname, 1024);
33-
cpus = hwloc_bitmap_alloc();
34-
rc = hwloc_get_cpubind(opal_hwloc_topology, cpus, HWLOC_CPUBIND_PROCESS);
35-
hwloc_bitmap_list_asprintf(&bindings, cpus);
33+
34+
if (OPAL_SUCCESS == opal_hwloc_base_get_topology()) {
35+
cpus = hwloc_bitmap_alloc();
36+
rc = hwloc_get_cpubind(opal_hwloc_topology, cpus, HWLOC_CPUBIND_PROCESS);
37+
hwloc_bitmap_list_asprintf(&bindings, cpus);
38+
}
3639

3740
printf("[%s;%d] Hello, World, I am %d of %d [%d local peers]: get_cpubind: %d bitmap %s\n",
3841
hostname, (int)getpid(), rank, size, orte_process_info.num_local_peers, rc,

orte/test/mpi/hello.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
#include <stdio.h>
9-
#include "opal/mca/hwloc/hwloc.h"
9+
#include "opal/mca/hwloc/base/base.h"
1010
#include "mpi.h"
1111

1212
#include "orte/util/proc_info.h"
@@ -15,15 +15,17 @@ int main(int argc, char* argv[])
1515
{
1616
int rank, size, rc;
1717
hwloc_cpuset_t cpus;
18-
char *bindings;
18+
char *bindings = NULL;
1919

2020
MPI_Init(&argc, &argv);
2121
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
2222
MPI_Comm_size(MPI_COMM_WORLD, &size);
2323

24-
cpus = hwloc_bitmap_alloc();
25-
rc = hwloc_get_cpubind(opal_hwloc_topology, cpus, HWLOC_CPUBIND_PROCESS);
26-
hwloc_bitmap_list_asprintf(&bindings, cpus);
24+
if (OPAL_SUCCESS == opal_hwloc_base_get_topology()) {
25+
cpus = hwloc_bitmap_alloc();
26+
rc = hwloc_get_cpubind(opal_hwloc_topology, cpus, HWLOC_CPUBIND_PROCESS);
27+
hwloc_bitmap_list_asprintf(&bindings, cpus);
28+
}
2729

2830
printf("Hello, World, I am %d of %d [%d local peers]: get_cpubind: %d bitmap %s\n",
2931
rank, size, orte_process_info.num_local_peers, rc,

orte/test/system/opal_hwloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static void fill_cache_line_size(void)
2222
/* Look for the smallest L2 cache size */
2323
size = 4096;
2424
while (1) {
25-
obj = opal_hwloc_base_get_obj_by_type(opal_hwloc_topology,
25+
obj = opal_hwloc_base_get_obj_by_type(my_topology,
2626
HWLOC_OBJ_CACHE, 2,
2727
i, OPAL_HWLOC_LOGICAL);
2828
if (NULL == obj) {

0 commit comments

Comments
 (0)