diff --git a/example/out_of_core/CTestLists.cmake b/example/out_of_core/CTestLists.cmake
index 1d02adac6ddd81ae119f68e311d3d05f44b9e8e9..1ca4036bdcaee19a5e752ad4e02f3ddafb465a6f 100644
--- a/example/out_of_core/CTestLists.cmake
+++ b/example/out_of_core/CTestLists.cmake
@@ -6,6 +6,10 @@ set(TESTLIST
     out_of_core
     )
 
+# OOC tests required to create a directory where the data will be written on disk
+file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ooc)
+
+# define tests
 foreach(test ${TESTLIST})
     add_test(example_ooc_${test} ./${test})
 endforeach()
diff --git a/example/out_of_core/out_of_core.c b/example/out_of_core/out_of_core.c
index 254e79410677a188d6b8d2139de079c7c9607446..7f95bf6c50f6e39f1e0918659cedcbb37511a4ec 100644
--- a/example/out_of_core/out_of_core.c
+++ b/example/out_of_core/out_of_core.c
@@ -96,7 +96,7 @@ int main(int argc, char *argv[]) {
     /* limit ram memory */
     if (iparam[IPARAM_OUTOFCORE] > 0) {
         int new_dd = starpu_disk_register (&starpu_disk_unistd_o_direct_ops,
-                                           (void*) "/tmp/starpu_ooc/", 1024*1024*10);
+                                           (void*) "./ooc/", 1024*1024*10);
     }
 
     MORSE_Desc_Create_User(&descA, NULL, MorseRealDouble,