1
1

Bring over hwloc r4102 and r4104 for some upstream patches.

This commit was SVN r25707.

The following SVN revision numbers were found above:
  r4102 --> open-mpi/ompi@8961ca568d

The following SVN revisions from the original message are invalid or
inconsistent and therefore were not cross-referenced:
  r4104
Этот коммит содержится в:
Jeff Squyres 2012-01-11 00:21:47 +00:00
родитель 50e5b0937c
Коммит 4243cb7af0

Просмотреть файл

@ -1,7 +1,7 @@
/* /*
* Copyright © 2009 CNRS * Copyright © 2009 CNRS
* Copyright © 2009-2011 INRIA. All rights reserved. * Copyright © 2009-2011 INRIA. All rights reserved.
* Copyright © 2009-2010 Université Bordeaux 1 * Copyright © 2009-2012 Université Bordeaux 1
* Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved. * Copyright © 2009-2011 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory. * See COPYING in top-level directory.
*/ */
@ -1713,7 +1713,10 @@ hwloc_connect_levels(hwloc_topology_t topology)
/* New level. */ /* New level. */
taken_objs = malloc((n_taken_objs + 1) * sizeof(taken_objs[0])); taken_objs = malloc((n_taken_objs + 1) * sizeof(taken_objs[0]));
/* New list of pending objects. */ /* New list of pending objects. */
new_objs = malloc((n_objs - n_taken_objs + n_new_objs) * sizeof(new_objs[0])); if (n_objs - n_taken_objs + n_new_objs)
new_objs = malloc((n_objs - n_taken_objs + n_new_objs) * sizeof(new_objs[0]));
else
new_objs = NULL;
n_new_objs = hwloc_level_take_objects(top_obj, n_new_objs = hwloc_level_take_objects(top_obj,
objs, n_objs, objs, n_objs,
@ -1765,7 +1768,8 @@ hwloc_connect_levels(hwloc_topology_t topology)
} }
/* It's empty now. */ /* It's empty now. */
free(objs); if (objs)
free(objs);
topology->bridge_nbobjects = hwloc_build_level_from_list(topology->first_bridge, &topology->bridge_level); topology->bridge_nbobjects = hwloc_build_level_from_list(topology->first_bridge, &topology->bridge_level);
topology->pcidev_nbobjects = hwloc_build_level_from_list(topology->first_pcidev, &topology->pcidev_level); topology->pcidev_nbobjects = hwloc_build_level_from_list(topology->first_pcidev, &topology->pcidev_level);