瀏覽代碼

windows doesn't have sched_setaffinity, we really need to use hwloc here

Samuel Thibault 15 年之前
父節點
當前提交
322badcd63
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/core/perfmodel/perfmodel_bus.c

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

@@ -393,6 +393,7 @@ static void benchmark_all_gpu_devices(void)
 #endif
 
 	/* TODO: use hwloc */
+#ifndef __MINGW32__
 	/* Save the current cpu binding */
 	cpu_set_t former_process_affinity;
 	ret = sched_getaffinity(0, sizeof(former_process_affinity), &former_process_affinity);
@@ -401,6 +402,7 @@ static void benchmark_all_gpu_devices(void)
 		perror("sched_getaffinity");
 		STARPU_ABORT();
 	}
+#endif
 
 	struct starpu_machine_config_s *config = _starpu_get_machine_config();
 	ncpus = _starpu_topology_get_nhwcpu(config);
@@ -423,6 +425,7 @@ static void benchmark_all_gpu_devices(void)
 #endif
 
 	/* FIXME: use hwloc */
+#ifndef __MINGW32__
 	/* Restore the former affinity */
 	ret = sched_setaffinity(0, sizeof(former_process_affinity), &former_process_affinity);
 	if (ret)
@@ -430,6 +433,7 @@ static void benchmark_all_gpu_devices(void)
 		perror("sched_setaffinity");
 		STARPU_ABORT();
 	}
+#endif
 
 #ifdef STARPU_HAVE_HWLOC
 	hwloc_topology_destroy(hwtopology);