Am 30.09.2018 um 20:11 schrieb Samuel Thibault:
Marco Atzeri, le dim. 30 sept. 2018 20:02:59 +0200, a ecrit:
also adding a HWLOC_DECLSPEC on the first case distances.c:347
does not solve the issue as the two declaration are not the same.

Suggestion ?

Perhaps use hwloc_uint64_t instead of uint64_t in hwloc/distances.c?

Samuel

Thanks Samuel,
it was that, in more than one place.

The attached patch allowed the compilation on cygwin64 bit.

The only remaining warnings are minor one

##########################################################
/cygdrive/d/cyg_pub/devel/hwloc/hwloc-2.0.2-1.x86_64/src/hwloc-2.0.2/hwloc/topology-windows.c: In function ‘hwloc_look_windows’: /cygdrive/d/cyg_pub/devel/hwloc/hwloc-2.0.2-1.x86_64/src/hwloc-2.0.2/hwloc/topology-windows.c:814:28: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘ULONG_PTR {aka long long unsigned int}’ [-Wformat=] hwloc_debug("%s#%u mask %lx\n", hwloc_obj_type_string(type), id, procInfo[i].ProcessorMask); ~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~
                          %llx
###########################################################


The only tests failing are:

FAIL: test-lstopo.sh

that seems due to a mix between Cygwin and Windows

############ utils/lstopo/test-lstopo.sh.log #############

Machine (3665MB total) + Package L#0
  NUMANode L#0 (P#0 3665MB)
  L3 L#0 (6144KB)
    L2 L#0 (256KB) + L1d L#0 (32KB) + L1i L#0 (32KB) + Core L#0
      PU L#0 (P#0)
      PU L#1 (P#1)
    L2 L#1 (256KB) + L1d L#1 (32KB) + L1i L#1 (32KB) + Core L#1
      PU L#2 (P#2)
      PU L#3 (P#3)
    L2 L#2 (256KB) + L1d L#2 (32KB) + L1i L#2 (32KB) + Core L#2
      PU L#4 (P#4)
      PU L#5 (P#5)
    L2 L#3 (256KB) + L1d L#3 (32KB) + L1i L#3 (32KB) + Core L#3
      PU L#6 (P#6)
      PU L#7 (P#7)
OpenProcess 13220 failed 5: Zugriff verweigert

############################################################

And all the :

FAIL: Intel-Skylake-2xXeon6140.output
FAIL: Intel-Broadwell-2xXeon-E5-2650Lv4.output
FAIL: Intel-Haswell-2xXeon-E5-2680v3.output
FAIL: Intel-IvyBridge-12xXeon-E5-4620v2.output
FAIL: Intel-SandyBridge-2xXeon-E5-2650.output
FAIL: Intel-Westmere-2xXeon-X5650.output
FAIL: Intel-Nehalem-2xXeon-X5550.output
FAIL: Intel-Penryn-4xXeon-X7460.output
FAIL: Intel-Core-2xXeon-E5345.output
FAIL: Intel-KnightsLanding-XeonPhi-7210.output
FAIL: Intel-KnightsCorner-XeonPhi-SE10P.output
FAIL: AMD-17h-Zen-2xEpyc-7451.output
FAIL: AMD-15h-Piledriver-4xOpteron-6348.output
FAIL: AMD-15h-Bulldozer-4xOpteron-6272.output
FAIL: AMD-K10-MagnyCours-2xOpteron-6164HE.output
FAIL: AMD-K10-Istanbul-8xOpteron-8439SE.output
FAIL: AMD-K8-SantaRosa-2xOpteron-2218.output
FAIL: AMD-K8-SledgeHammer-2xOpteron-250.output
FAIL: Zhaoxin-CentaurHauls-ZXD-4600.output
FAIL: Zhaoxin-Shanghai-KaiSheng-ZXC+-FC1081.output
###########################################################

But it is not clear to me how these tests should pass.


The Laptop has a Quad Core I5

processor       : 7
vendor_id       : GenuineIntel
cpu family      : 6
model           : 142
model name      : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
stepping        : 10
cpu MHz         : 1800.000
cache size      : 6144 KB

Regards
Marco










---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
--- origsrc/hwloc-2.0.2/hwloc/distances.c       2018-01-26 09:56:03.000000000 
+0100
+++ src/hwloc-2.0.2/hwloc/distances.c   2018-10-01 13:39:46.501610500 +0200
@@ -345,7 +345,7 @@ int hwloc_internal_distances_add(hwloc_t
 /* The actual function exported to the user
  */
 int hwloc_distances_add(hwloc_topology_t topology,
-                       unsigned nbobjs, hwloc_obj_t *objs, uint64_t *values,
+                       unsigned nbobjs, hwloc_obj_t *objs, hwloc_uint64_t 
*values,
                        unsigned long kind, unsigned long flags)
 {
   hwloc_obj_type_t type;
--- origsrc/hwloc-2.0.2/hwloc/pci-common.c      2018-01-26 09:56:03.000000000 
+0100
+++ src/hwloc-2.0.2/hwloc/pci-common.c  2018-10-01 14:00:38.336045900 +0200
@@ -16,7 +16,7 @@
 #endif
 #include <sys/stat.h>
 
-#ifdef HWLOC_WIN_SYS
+#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__)
 #include <io.h>
 #define open _open
 #define read _read
--- origsrc/hwloc-2.0.2/hwloc/shmem.c   2018-01-26 09:56:03.000000000 +0100
+++ src/hwloc-2.0.2/hwloc/shmem.c       2018-10-01 13:46:55.542444700 +0200
@@ -76,7 +76,7 @@ hwloc_shmem_topology_get_length(hwloc_to
 
 int
 hwloc_shmem_topology_write(hwloc_topology_t topology,
-                          int fd, uint64_t fileoffset,
+                          int fd, hwloc_uint64_t fileoffset,
                           void *mmap_address, size_t length,
                           unsigned long flags)
 {
@@ -259,7 +259,7 @@ hwloc_shmem_topology_get_length(hwloc_to
 
 int
 hwloc_shmem_topology_write(hwloc_topology_t topology __hwloc_attribute_unused,
-                          int fd __hwloc_attribute_unused, uint64_t fileoffset 
__hwloc_attribute_unused,
+                          int fd __hwloc_attribute_unused, hwloc_uint64_t 
fileoffset __hwloc_attribute_unused,
                           void *mmap_address __hwloc_attribute_unused, size_t 
length __hwloc_attribute_unused,
                           unsigned long flags __hwloc_attribute_unused)
 {
@@ -269,7 +269,7 @@ hwloc_shmem_topology_write(hwloc_topolog
 
 int
 hwloc_shmem_topology_adopt(hwloc_topology_t *topologyp 
__hwloc_attribute_unused,
-                          int fd __hwloc_attribute_unused, uint64_t fileoffset 
__hwloc_attribute_unused,
+                          int fd __hwloc_attribute_unused, hwloc_uint64_t 
fileoffset __hwloc_attribute_unused,
                           void *mmap_address __hwloc_attribute_unused, size_t 
length __hwloc_attribute_unused,
                           unsigned long flags __hwloc_attribute_unused)
 {
--- origsrc/hwloc-2.0.2/include/private/misc.h  2018-08-27 14:42:47.000000000 
+0200
+++ src/hwloc-2.0.2/include/private/misc.h      2018-10-01 14:56:44.302908200 
+0200
@@ -569,7 +569,7 @@ typedef SSIZE_T ssize_t;
 #  endif
 #endif
 
-#if defined HWLOC_WIN_SYS && !defined __MINGW32__
+#if defined HWLOC_WIN_SYS && !defined __MINGW32__ && !defined(__CYGWIN__)
 /* MSVC doesn't support C99 variable-length array */
 #include <malloc.h>
 #define HWLOC_VLA(_type, _name, _nb) _type *_name = (_type*) 
_alloca((_nb)*sizeof(_type))
--- origsrc/hwloc-2.0.2/tests/hwloc/hwloc_distances.c   2018-01-26 
09:56:03.000000000 +0100
+++ src/hwloc-2.0.2/tests/hwloc/hwloc_distances.c       2018-10-01 
15:03:06.434125600 +0200
@@ -64,7 +64,7 @@ int main(void)
   hwloc_topology_t topology;
   struct hwloc_distances_s *distances[2];
   hwloc_obj_t objs[16];
-  uint64_t values[16*16], value1, value2;
+  hwloc_uint64_t values[16*16], value1, value2;
   int topodepth;
   unsigned i, j, k, nr;
   int err;
--- origsrc/hwloc-2.0.2/tests/hwloc/hwloc_groups.c      2018-01-26 
09:56:03.000000000 +0100
+++ src/hwloc-2.0.2/tests/hwloc/hwloc_groups.c  2018-10-01 15:06:56.173277500 
+0200
@@ -16,7 +16,7 @@ int main(void)
   hwloc_topology_t topology;
   hwloc_obj_t obj;
   hwloc_obj_t objs[32];
-  uint64_t values[32*32];
+  hwloc_uint64_t values[32*32];
   int depth;
   hwloc_obj_type_t type;
   unsigned width;
--- origsrc/hwloc-2.0.2/tests/hwloc/hwloc_topology_dup.c        2018-01-26 
09:56:03.000000000 +0100
+++ src/hwloc-2.0.2/tests/hwloc/hwloc_topology_dup.c    2018-10-01 
15:09:17.830646100 +0200
@@ -17,7 +17,7 @@ int main(void)
   hwloc_bitmap_t cpuset = hwloc_bitmap_alloc();
   struct hwloc_distances_s *distances;
   hwloc_obj_t nodes[3], cores[6];
-  uint64_t node_distances[9], core_distances[36];
+  hwloc_uint64_t node_distances[9], core_distances[36];
   unsigned i,j,nr;
   int err;
 
--- origsrc/hwloc-2.0.2/tests/hwloc/hwloc_topology_restrict.c   2018-01-26 
09:56:03.000000000 +0100
+++ src/hwloc-2.0.2/tests/hwloc/hwloc_topology_restrict.c       2018-10-01 
15:07:55.092623400 +0200
@@ -106,7 +106,7 @@ int main(void)
 {
   hwloc_bitmap_t cpuset = hwloc_bitmap_alloc();
   hwloc_obj_t nodes[3], cores[6];
-  uint64_t node_distances[9], core_distances[36];
+  hwloc_uint64_t node_distances[9], core_distances[36];
   hwloc_obj_t obj;
   unsigned i,j;
   int err;
--- origsrc/hwloc-2.0.2/utils/hwloc/hwloc-annotate.c    2018-01-29 
21:35:24.000000000 +0100
+++ src/hwloc-2.0.2/utils/hwloc/hwloc-annotate.c        2018-10-01 
14:02:09.059617700 +0200
@@ -120,7 +120,7 @@ add_distances(hwloc_topology_t topology,
        unsigned long kind = 0;
        unsigned nbobjs = 0;
        hwloc_obj_t *objs = NULL;
-       uint64_t *values = NULL;
+       hwloc_uint64_t *values = NULL;
        FILE *file;
        char line[64];
        unsigned i, x, y, z;
--- origsrc/hwloc-2.0.2/utils/hwloc/hwloc-gather-cpuid.c        2018-08-27 
14:42:47.000000000 +0200
+++ src/hwloc-2.0.2/utils/hwloc/hwloc-gather-cpuid.c    2018-10-01 
14:05:19.545123000 +0200
@@ -15,7 +15,7 @@
 
 #include <private/cpuid-x86.h>
 
-#ifdef HWLOC_WIN_SYS
+#if defined(HWLOC_WIN_SYS) && !defined(__CYGWIN__)
 #include <direct.h>
 #define mkdir(name, mode) _mkdir(name)
 #include <io.h>
--- origsrc/hwloc-2.0.2/utils/hwloc/misc.h      2018-01-29 21:35:24.000000000 
+0100
+++ src/hwloc-2.0.2/utils/hwloc/misc.h  2018-10-01 14:08:25.334623200 +0200
@@ -293,7 +293,7 @@ hwloc_utils_enable_input_format(struct h
 }
 
 static __hwloc_inline void
-hwloc_utils_print_distance_matrix(FILE *output, unsigned nbobjs, hwloc_obj_t 
*objs, uint64_t *matrix, int logical)
+hwloc_utils_print_distance_matrix(FILE *output, unsigned nbobjs, hwloc_obj_t 
*objs, hwloc_uint64_t *matrix, int logical)
 {
   unsigned i, j;
 
_______________________________________________
hwloc-devel mailing list
hwloc-devel@lists.open-mpi.org
https://lists.open-mpi.org/mailman/listinfo/hwloc-devel

Reply via email to