Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r1198
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-10-20 20:15:51


Oops -- I just caught the latter one, but missed the first. Thanks
for the sanity check -- I'll go fix the first one...

On Oct 20, 2009, at 8:12 PM, Samuel Thibault wrote:

> jsquyres_at_[hidden], le Tue 20 Oct 2009 19:59:16 -0400, a écrit :
> > @@ -578,6 +573,8 @@
> > DIR *dir;
> > struct dirent *dirent;
> > hwloc_obj_t node;
> > + hwloc_obj_t nodes[nbnodes];
> > + unsigned distances[nbnodes][nbnodes];
> >
> > dir = hwloc_opendir(path, topology-
> >backend_params.sysfs.root_fd);
> > if (dir)
> > @@ -597,9 +594,6 @@
> > if (nbnodes <= 1)
> > return;
> >
> > - hwloc_obj_t nodes[nbnodes];
> > - unsigned distances[nbnodes][nbnodes];
> > -
> > for (osnode=0; osnode < nbnodes; osnode++)
> > {
> > char nodepath[SYSFS_NUMA_NODE_PATH_LEN];
>
> This will not work: nbnodes is only known here, not at the beginning
> of
> the function.
>
> > @@ -213,6 +214,9 @@
> > unsigned groupids[nbobjs];
> > int nbgroups;
> > unsigned i,j;
> > + hwloc_obj_t groupobjs[nbgroups];
> > + unsigned groupsizes[nbgroups];
> > + unsigned groupdistances[nbgroups][nbgroups];
> >
> > hwloc_debug("trying to group %s objects into misc objects
> according to physical distances\n",
> > hwloc_obj_type_string(objs[0]->type));
> > @@ -233,8 +237,6 @@
> > }
> >
> > /* create new misc objects and record their size */
> > - hwloc_obj_t groupobjs[nbgroups];
> > - unsigned groupsizes[nbgroups];
> > memset(groupsizes, 0, sizeof(groupsizes));
> > for(i=0; i<nbgroups; i++) {
> > /* create the misc object */
> > @@ -255,7 +257,6 @@
> > }
> >
> > /* factorize distances */
> > - unsigned groupdistances[nbgroups][nbgroups];
> > memset(groupdistances, 0, sizeof(groupdistances));
> > for(i=0; i<nbobjs; i++)
> > for(j=0; j<nbobjs; j++)
>
> Same here.
>
> Samuel
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>

-- 
Jeff Squyres
jsquyres_at_[hidden]