Did you checkout the "display" SVN branch? What you see below looks like what we already have in hwloc since 1.3. There's a tarball of the "display" at http://hydra.bordeaux.inria.fr/build/144653/download/3/hwloc-1.7a1-1.tar.bz2
Brice Le 13/02/2013 06:08, Kenneth Lloyd a écrit : > Sorry, that was hwloc 1.7.0a1. > > On Tue, 2013-02-12 at 21:50 -0700, Kenneth Lloyd wrote: >> Brice, >> >> I've compiled and run hwloc 1.6.1 on my development machine >> (Scientific Linux 6.2) currently with 1) GTX-480 and everything seems >> to be working perfectly. >> >> [kalloyd@devhost ~]$ lstopo -v >> <snip> >> Bridge Host->PCI L#0 (P#0 buses=0000:[00-08]) >> Bridge PCI->PCI (P#48 busid=0000:00:03.0 id=8086:340a >> class=0604(PCI_B) buses=0000:[02-02] PCIVendor="Intel Corporation" >> PCIDevice="5520/5500/X58 I/O Hub PCI Express Root Port 3") "Intel >> Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3" >> PCI 10de:06c0 (P#8192 busid=0000:02:00.0 class=0300(VGA) >> PCIVendor="nVidia Corporation" PCIDevice="GF100 [GeForce GTX 480]") >> "nVidia Corporation GF100 [GeForce GTX 480]" >> <snip> >> >> lstopo --whole-io shows much more detail, including both sides of the >> GTX-480. >> >> I haven't yet written an OpenMPI, OpenGL program to see how it works >> across a small cluster, but that will give me something to do in my >> spare time ... >> >> Ken Lloyd >> >> On Tue, 2013-02-12 at 23:37 +0100, Brice Goglin wrote: >>> Stefan (or anybody else interested in hwloc GPU support), >>> Did you have any chance to look at this? >>> Brice >>> >>> >>> >>> Le 01/02/2013 14:57, Brice Goglin a écrit : >>> > I just committed big changes to the display branch (and I also merged >>> > latest trunk changes). >>> > >>> > lstopo will now report things like this: >>> > PCI 10de:06d1 >>> > GPU L#0 ":0.0" >>> > GPU L#1 "cuda0" >>> > GPU L#2 "nvml0" >>> > >>> > >>> > The changes include: >>> > >>> > 1) We don't have a "display" specific OS device anymore, it's just >>> > another kind of GPU among cuda, opencl and nvml. The name is the X >>> > server display name. There are string attributes in these new GL GPU OS >>> > devices (lstopo -v): >>> > GPU L#9 (Backend=GL GPUVendor="NVIDIA Corporation" GPUModel="Tesla >>> > C2050") ":0.2" >>> > >>> > 2) The gl component is now buildable as a plugin >>> > >>> > 3) Given (2), we can't expose internal GL routines in the public API. So >>> > hwloc/gl.h is just made of inline helpers as any other hwloc/foo.h. It >>> > now contains functions to convert between displays (name or port/device) >>> > and hwloc OS devices: >>> > >>> > hwloc_obj_t hwloc_gl_get_display_osdev_by_port_device(hwloc_topology_t >>> > topology, unsigned port, unsigned device) >>> > hwloc_obj_t hwloc_gl_get_display_osdev_by_name(hwloc_topology_t >>> > topology, const char *name) >>> > int hwloc_gl_get_display_by_osdev(hwloc_topology_t topology, hwloc_obj_t >>> > osdev,unsigned *port, unsigned *device) >>> > >>> > If you really need the PCI device, just use osdev->parent as documented. >>> > If you need the locality, use hwloc_get_non_io_ancestor(topology, >>> > osdev)->cpuset >>> > See tests/gl.c for examples. >>> > >>> > Please review hwloc/gl.h and let me know if that works for you. I hope I >>> > used the words port/device/server/screen as expected. >>> > >>> > The last thing on my TODO list is to decide is whether we keep the "GL" >>> > name or switch to something among display/X11/X/... for filenames and >>> > function names. >>> > >>> > Brice >>> > >>> >>> _______________________________________________ >>> hwloc-users mailing list >>> hwloc-us...@open-mpi.org <mailto:hwloc-us...@open-mpi.org> >>> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users >> >> ============== >> *Kenneth A. Lloyd, Jr.* >> CEO - Director of Systems Science >> Watt Systems Technologies Inc. >> Albuquerque, NM US >> >> This e-mail is covered by the Electronic Communications Privacy Act, >> 18 U.S.C. 2510-2521 and is intended only for the addressee named >> above. It may contain privileged or confidential information. If you >> are not the addressee you must not copy, distribute, disclose or use >> any of the information in it. If you have received it in error please >> delete it and immediately notify the sender. >> >> >> >> _______________________________________________ >> hwloc-users mailing list >> hwloc-us...@open-mpi.org <mailto:hwloc-us...@open-mpi.org> >> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users > > ============== > *Kenneth A. Lloyd, Jr.* > CEO - Director of Systems Science > Watt Systems Technologies Inc. > Albuquerque, NM US > > This e-mail is covered by the Electronic Communications Privacy Act, > 18 U.S.C. 2510-2521 and is intended only for the addressee named > above. It may contain privileged or confidential information. If you > are not the addressee you must not copy, distribute, disclose or use > any of the information in it. If you have received it in error please > delete it and immediately notify the sender. > > > > > _______________________________________________ > hwloc-users mailing list > hwloc-us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users