浏览代码

Avoid letting lu allocate memory in simulation mode

Samuel Thibault 6 年之前
父节点
当前提交
8f1613cb31
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      examples/lu/lu_example.c

+ 4 - 0
examples/lu/lu_example.c

@@ -176,7 +176,11 @@ void copy_matrix_into_blocks(void)
 static void init_matrix(void)
 static void init_matrix(void)
 {
 {
 	/* allocate matrix */
 	/* allocate matrix */
+#ifdef STARPU_SIMGRID
+	A = (void*) 1;
+#else
 	starpu_malloc_flags((void **)&A, (size_t)size*size*sizeof(TYPE), STARPU_MALLOC_PINNED|STARPU_MALLOC_SIMULATION_FOLDED);
 	starpu_malloc_flags((void **)&A, (size_t)size*size*sizeof(TYPE), STARPU_MALLOC_PINNED|STARPU_MALLOC_SIMULATION_FOLDED);
+#endif
 	STARPU_ASSERT(A);
 	STARPU_ASSERT(A);
 
 
 	starpu_srand48((long int)time(NULL));
 	starpu_srand48((long int)time(NULL));