Here's the patch :)

Le 05/11/2010 08:10, Brice Goglin a écrit :
> Interesting, you don't have any hugepage information, it's probably
> disabled in the kernel. Can you apply th attached patch and check that
> the XML output only contains a single "page_type" line and that it
> looks valid ? It should be something like
>   <page_type size="4096" count="256834"/>
> If so, then rerun make check again.
>
> thanks,
> Brice
>
>
>
> Le 05/11/2010 07:55, ryuuta a écrit :
>> Here they are.
>> Thanks for the diagnosis.
>>
>> Regards,
>> Ryuta
>>
>> On Fri, Nov 5, 2010 at 3:46 PM, Brice Goglin <brice.gog...@inria.fr
>> <mailto:brice.gog...@inria.fr>> wrote:
>>
>>     Looks like you have some unexpected hugepage information. Not
>>     sure it's the cause of the XML problem, but we need to debug this
>>     too. Can you send the .tar.bz2 and .output file that
>>     hwloc-gather-topology.sh generates ?
>>
>>     In the meantime, I need to change this test so as to show the
>>     difference between the XML exports when this make check test fails.
>>
>>     thanks,
>>     Brice
>>
>>
>>
>>     Le 05/11/2010 07:35, ryuuta a écrit :
>>>     Here you go.
>>>
>>>     On Fri, Nov 5, 2010 at 3:07 PM, Brice Goglin
>>>     <brice.gog...@inria.fr <mailto:brice.gog...@inria.fr>> wrote:
>>>
>>>         Looks like there's something specific to your machine. Can
>>>         you send the XML output of lstopo ?
>>>
>>>         thanks
>>>         Brice
>>>
>>>
>>>
>>>         Le 05/11/2010 05:41, ryuuta a écrit :
>>>>         Hi,
>>>>
>>>>         I'd like to report the failure of the one of the tests run
>>>>         by 'make check':
>>>>
>>>>         exported to buffer 0x8546408 length 3070
>>>>         re-exported to buffer 0x854ce70 length 3047
>>>>         lt-xmlbuffer: ../../hwloc/tests/xmlbuffer.c:36: main:
>>>>         Assertion `size1 == size2' failed.
>>>>         /bin/sh: line 5: 14531 Aborted                 ${dir}$tst
>>>>         FAIL: xmlbuffer
>>>>         ========================================================
>>>>         1 of 19 tests failed
>>>>         Please report to http://www.open-mpi.org/community/help/
>>>>         ========================================================
>>>>
>>>>         I'm using gcc-4.5.1, libxml2-2.7.7, and zlib-1.2.5.
>>>>         The revision of hwloc checked out from svn is: 2702
>>>>
>>>>         Regards,
>>>>         Ryuta
>>>>
>>>>
>>>>         _______________________________________________
>>>>         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
>>>>           
>>>
>>>
>>
>>
>
> _______________________________________________
> hwloc-users mailing list
> hwloc-us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
>   

Index: src/topology-linux.c
===================================================================
--- src/topology-linux.c	(révision 2703)
+++ src/topology-linux.c	(copie de travail)
@@ -1635,7 +1635,7 @@
   uint64_t meminfo_hugepages_count, meminfo_hugepages_size;
   struct stat st;
   int has_sysfs_hugepages = 0;
-  int types = 2;
+  int types = 1;
   int err;

   err = hwloc_stat("/sys/kernel/mm/hugepages", &st, topology->backend_params.sysfs.root_fd);
@@ -1662,6 +1662,7 @@

   if (memory->page_types) {
     uint64_t remaining_local_memory = memory->local_memory;
+#if 0
     if (has_sysfs_hugepages) {
       /* read from node%d/hugepages/hugepages-%skB/nr_hugepages */
       hwloc_parse_hugepages_info(topology, "/sys/kernel/mm/hugepages", memory, &remaining_local_memory);
@@ -1671,6 +1672,7 @@
       memory->page_types[1].count = meminfo_hugepages_count;
       remaining_local_memory -= meminfo_hugepages_count * meminfo_hugepages_size;
     }
+#endif
     memory->page_types[0].count = remaining_local_memory / memory->page_types[0].size;
   }
 }

Reply via email to