浏览代码

examples/: on enodev errors, tests are marked as skipped

Nathalie Furmento 14 年之前
父节点
当前提交
69da56dbba
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      examples/reductions/dot_product.c

+ 7 - 0
examples/reductions/dot_product.c

@@ -210,6 +210,7 @@ int main(int argc, char **argv)
 		task->buffers[2].mode = STARPU_REDUX;
 
 		int ret = starpu_task_submit(task);
+		if (ret == -ENODEV) goto enodev;
 		STARPU_ASSERT(!ret);
 	}
 
@@ -222,4 +223,10 @@ int main(int argc, char **argv)
 	starpu_shutdown();
 
 	return 0;
+
+enodev:
+	fprintf(stderr, "WARNING: No one can execute this task\n");
+	/* yes, we do not perform the computation but we did detect that no one
+ 	 * could perform the kernel, so this is not an error from StarPU */
+	return 77;
 }