Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] hwloc 1.1 rc2 make check fails on SLES10SP1 on PPC64
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2010-11-21 14:51:23


Here's the patch :)

Le 21/11/2010 20:49, Brice Goglin a écrit :
> Le 21/11/2010 20:34, Christopher Samuel a écrit :
>
>> In look_powerpc_device_tree() I did similar and found that it
>> never proceeds past this loop:
>>
>> if (('.' == dirent->d_name[0]) || (0 == (dirent->d_type & DT_DIR)))
>> continue;
>>
>> Adding some debugging to print the name and type and whether
>> they were used or skipped I see that when it fails the
>> dirent->d_type is always '0', but when it works it's '4'.
>>
>> The manual page for readdir(3) says:
>>
>> # Currently, only some file systems (among them: Btrfs,
>> # ext2, ext3, and ext4) have full support returning the file
>> # type in d_type. All applications must properly handle
>> # a return of DT_UNKNOWN.
>>
>> So I'm guessing that reiserfs and GPFS (both of which are
>> available on this PPC64 box) are returning DT_UNKNOWN (0).
>>
>> So the above loop will need to catch that and, if it is
>> DT_UNKNOWN, do a stat or lstat on the entry to find out
>> what it is. :-(
>>
> Awesome! Thanks a looooot Chris. Can you remove your debugging stuff, my
> debug patch, and apply the attached patch. What it does is:
> * gather empty dirs in hwloc-gather-topology (already pushed to trunk)
> * don't use sysfs when cpu0/topology contains nothing (pushed too)
> * use stat.st_mode instead of dirent->d_type (seems to not break
> anything in our standard PPC tarballs, but needs more testing)
>
> I hope make check works now. And "lstopo" with and without the
> HWLOC_FSROOT should also both use the cpuinfo code (you should see "*
> Topology extraction from /proc/cpuinfo *" very early in the debug output).
>
> Brice
>
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>