浏览代码

Warn when some debugging configuration option was used

Samuel Thibault 14 年之前
父节点
当前提交
88a22759c2
共有 1 个文件被更改,包括 29 次插入0 次删除
  1. 29 0
      src/core/workers.c

+ 29 - 0
src/core/workers.c

@@ -318,6 +318,35 @@ int starpu_init(struct starpu_conf *user_conf)
 {
 	int ret;
 
+#ifdef __GNUC__
+#ifndef __OPTIMIZE__
+	fprintf(stderr,"Warning: StarPU was configured with --enable-debug (-O0)\n");
+#endif
+#endif
+#if 0
+#ifndef STARPU_NO_ASSERT
+	fprintf(stderr,"Warning: StarPU was configured without --enable-fast\n");
+#endif
+#endif
+#ifdef STARPU_MEMORY_STATUS
+	fprintf(stderr,"Warning: StarPU was configured with --enable-memory-status\n");
+#endif
+#ifdef STARPU_VERBOSE
+	fprintf(stderr,"Warning: StarPU was configured with --enable-verbose\n");
+#endif
+#ifdef STARPU_USE_FXT
+	fprintf(stderr,"Warning: StarPU was configured with --with-fxt\n");
+#endif
+#ifdef STARPU_PERF_DEBUG
+	fprintf(stderr,"Warning: StarPU was configured with --enable-perf-debug\n");
+#endif
+#ifdef STARPU_MODEL_DEBUG
+	fprintf(stderr,"Warning: StarPU was configured with --enable-model-debug\n");
+#endif
+#ifdef STARPU_DATA_STATS
+	fprintf(stderr,"Warning: StarPU was configured with --enable-stats\n");
+#endif
+
 	PTHREAD_MUTEX_LOCK(&init_mutex);
 	while (initialized == CHANGING)
 		/* Wait for the other one changing it */