Browse Source

Fix freeing GPU memory

Samuel Thibault 10 years ago
parent
commit
0adb694f41
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/datawizard/gpu_register.c

+ 2 - 2
tests/datawizard/gpu_register.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
- * Copyright (C) 2011-2012, 2014  Université de Bordeaux
+ * Copyright (C) 2011-2012, 2014-2015  Université de Bordeaux
  * Copyright (C) 2012 inria
  * Copyright (C) 2012 inria
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -145,7 +145,7 @@ test_cuda(void)
 		STARPU_CUDA_REPORT_ERROR(cures);
 		STARPU_CUDA_REPORT_ERROR(cures);
 
 
 	ret = check_result(foo, size);
 	ret = check_result(foo, size);
-	starpu_free(foo_gpu);
+	starpu_free_on_node(starpu_worker_get_memory_node(chosen), (uintptr_t) foo_gpu, size * sizeof(*foo_gpu));
 	free(foo);
 	free(foo);
 	return ret;
 	return ret;
 }
 }