File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -152,8 +152,16 @@ int opal_hwloc_base_filter_cpus(hwloc_topology_t topo)
152152 if (NULL == opal_hwloc_base_cpu_list ) {
153153/* get the root available cpuset */
154154#if HWLOC_API_VERSION < 0x20000
155- avail = hwloc_bitmap_alloc ();
156- hwloc_bitmap_and (avail , root -> online_cpuset , root -> allowed_cpuset );
155+ if (NULL == root -> online_cpuset || NULL == root -> allowed_cpuset ) {
156+ if (NULL == root -> cpuset ) {
157+ /* we have a really bad topology */
158+ return OPAL_ERR_NOT_SUPPORTED ;
159+ }
160+ avail = hwloc_bitmap_dup (root -> cpuset );
161+ } else {
162+ avail = hwloc_bitmap_alloc ();
163+ hwloc_bitmap_and (avail , root -> online_cpuset , root -> allowed_cpuset );
164+ }
157165#else
158166 avail = hwloc_bitmap_dup (root -> cpuset );
159167#endif
You can’t perform that action at this time.
0 commit comments