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 r3514
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2011-06-16 10:08:20


What kind of machine/architecture is this?

Brice

Le 16/06/2011 14:12, sthibaul_at_[hidden] a écrit :
> Author: sthibaul
> Date: 2011-06-16 08:12:13 EDT (Thu, 16 Jun 2011)
> New Revision: 3514
> URL: https://svn.open-mpi.org/trac/hwloc/changeset/3514
>
> Log:
> Add z11 "book" support
> Text files modified:
> trunk/src/topology-linux.c | 23 ++++++++++++++++++++---
> 1 files changed, 20 insertions(+), 3 deletions(-)
>
> Modified: trunk/src/topology-linux.c
> ==============================================================================
> --- trunk/src/topology-linux.c (original)
> +++ trunk/src/topology-linux.c 2011-06-16 08:12:13 EDT (Thu, 16 Jun 2011)
> @@ -2402,9 +2402,9 @@
> caches_added = 0;
> hwloc_bitmap_foreach_begin(i, cpuset)
> {
> - struct hwloc_obj *sock, *core, *thread;
> - hwloc_bitmap_t socketset, coreset, threadset, savedcoreset;
> - unsigned mysocketid, mycoreid;
> + struct hwloc_obj *sock, *core, *book, *thread;
> + hwloc_bitmap_t socketset, coreset, bookset, threadset, savedcoreset;
> + unsigned mysocketid, mycoreid, mybookid;
>
> /* look at the socket */
> mysocketid = 0; /* shut-up the compiler */
> @@ -2441,6 +2441,23 @@
> coreset = NULL; /* don't free it */
> }
>
> + /* look at the books */
> + mybookid = 0; /* shut-up the compiler */
> + sprintf(str, "%s/cpu%d/topology/book_id", path, i);
> + if (hwloc_parse_sysfs_unsigned(str, &mybookid, topology->backend_params.sysfs.root_fd) == 0) {
> +
> + sprintf(str, "%s/cpu%d/topology/book_siblings", path, i);
> + bookset = hwloc_parse_cpumap(str, topology->backend_params.sysfs.root_fd);
> + if (bookset && hwloc_bitmap_first(bookset) == i) {
> + book = hwloc_alloc_setup_object(HWLOC_OBJ_GROUP, mybookid);
> + book->cpuset = bookset;
> + hwloc_debug_1arg_bitmap("os book %u has cpuset %s\n",
> + mybookid, bookset);
> + hwloc_insert_object_by_cpuset(topology, book);
> + bookset = NULL; /* don't free it */
> + }
> + }
> +
> /* look at the thread */
> threadset = hwloc_bitmap_alloc();
> hwloc_bitmap_only(threadset, i);
> _______________________________________________
> hwloc-svn mailing list
> hwloc-svn_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-svn