Quellcode durchsuchen

port r17878 from 1.2: Fix r17876

Samuel Thibault vor 9 Jahren
Ursprung
Commit
310fbacad3
1 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen
  1. 4 3
      src/core/perfmodel/perfmodel_bus.c

+ 4 - 3
src/core/perfmodel/perfmodel_bus.c

@@ -45,7 +45,7 @@
 #include <windows.h>
 #endif
 
-#ifdef HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX
+#if defined(HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX) && HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX
 #include <hwloc/cuda.h>
 #endif
 
@@ -1694,7 +1694,7 @@ void _starpu_simgrid_get_platform_path(char *path, size_t maxlen)
  * - then through all CUDA-CUDA possible transfers again to emit routes.
  */
 
-#if defined(STARPU_USE_CUDA) && defined(HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX) && defined(HAVE_CUDA_MEMCPY_PEER)
+#if defined(STARPU_USE_CUDA) && defined(HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX) && HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX && defined(HAVE_CUDA_MEMCPY_PEER)
 
 /* Records, for each PCI link and hub, the maximum bandwidth seen through it */
 struct pci_userdata
@@ -2097,6 +2097,7 @@ static void clean_topology(hwloc_obj_t obj)
 		clean_topology(obj->children[i]);
 }
 #endif
+#endif
 
 static void write_bus_platform_file_content(void)
 {
@@ -2247,7 +2248,7 @@ static void write_bus_platform_file_content(void)
 	}
 #endif
 
-#if defined(HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX) && defined(HAVE_CUDA_MEMCPY_PEER)
+#if defined(HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX) && HAVE_DECL_HWLOC_CUDA_GET_DEVICE_OSDEV_BY_INDEX && defined(HAVE_CUDA_MEMCPY_PEER)
 	/* If we have enough hwloc information, write PCI bandwidths and routes */
 	if (!starpu_get_env_number_default("STARPU_PCI_FLAT", 0))
 	{