Skip to content

Commit fff6140

Browse files
bgoglinndenoyelle
authored andcommitted
solaris: also support HWLOC_USE_NUMA_DISTANCES env var
Only disables distance gathering, nothing else is supported there. Signed-off-by: Brice Goglin <[email protected]>
1 parent 4d85b78 commit fff6140

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hwloc/topology-solaris.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,8 @@ hwloc_look_lgrp(struct hwloc_topology *topology, struct hwloc_disc_status *dstat
485485
unsigned curlgrp = 0;
486486
int nlgrps;
487487
lgrp_id_t root;
488+
const char *env = getenv("HWLOC_USE_NUMA_DISTANCES");
489+
int need_distances = env && atoi(env);
488490

489491
if (!(dstatus->flags & HWLOC_DISC_STATUS_FLAG_GOT_ALLOWED_RESOURCES)) {
490492
lgrp_list_allowed(topology);
@@ -505,7 +507,7 @@ hwloc_look_lgrp(struct hwloc_topology *topology, struct hwloc_disc_status *dstat
505507
lgrp_build_numanodes(topology, cookie, root, glob_lgrps, &curlgrp);
506508

507509
#if HAVE_DECL_LGRP_LATENCY_COOKIE
508-
if (nlgrps > 1) {
510+
if (nlgrps > 1 && need_distances) {
509511
uint64_t *distances = calloc(curlgrp*curlgrp, sizeof(uint64_t));
510512
unsigned i, j;
511513
if (distances) {

0 commit comments

Comments
 (0)