diff --git a/taskvine/src/manager/taskvine.h b/taskvine/src/manager/taskvine.h index f74e2d8f9a..a9f88b64b5 100644 --- a/taskvine/src/manager/taskvine.h +++ b/taskvine/src/manager/taskvine.h @@ -64,10 +64,11 @@ typedef enum { /** Control sharing and garbage collection behavior of file objects. **/ typedef enum { - VINE_PEER_NOSHARE = 1, /**< Schedule this file to be shared between peers where available. See @ref + VINE_PEER_NOSHARE = 1, /**< Schedule this file to be shared between peers where available. See @ref vine_enable_peer_transfers **/ - VINE_UNLINK_WHEN_DONE = 2 /**< Whether to delete the file when its reference count is 0. (Warning: Only use on + VINE_UNLINK_WHEN_DONE = 2, /**< Whether to delete the file when its reference count is 0. (Warning: Only use on files produced by the application, and never on irreplaceable input files.) */ + VINE_LOCAL_TEMP = 4 /**< A temp substitute created when peer transfers are not enabled **/ } vine_file_flags_t; /** Select overall scheduling algorithm for matching tasks to workers. */ diff --git a/taskvine/src/manager/vine_file.c b/taskvine/src/manager/vine_file.c index c11be4355b..6d3af4425d 100644 --- a/taskvine/src/manager/vine_file.c +++ b/taskvine/src/manager/vine_file.c @@ -254,7 +254,7 @@ struct vine_file *vine_file_temp_no_peers() cctools_uuid_create(&uuid); char *name = string_format("temp-local-%s", uuid.str); - return vine_file_create(name, 0, 0, 0, VINE_FILE, 0, cache, VINE_UNLINK_WHEN_DONE); + return vine_file_create(name, 0, 0, 0, VINE_FILE, 0, cache, VINE_UNLINK_WHEN_DONE | VINE_LOCAL_TEMP); free(name); } diff --git a/taskvine/src/manager/vine_manager.c b/taskvine/src/manager/vine_manager.c index bdc5aa4abb..9078e73749 100644 --- a/taskvine/src/manager/vine_manager.c +++ b/taskvine/src/manager/vine_manager.c @@ -3253,7 +3253,7 @@ static int vine_manager_check_inputs_available(struct vine_manager *q, struct vi all_available = 0; } } // this is probably a local-temp - else if (f->flags && VINE_UNLINK_WHEN_DONE) { + else if (f->flags & VINE_LOCAL_TEMP) { struct stat info; int result = lstat(f->source, &info); if (result != 0) {