Skip to content

Commit

Permalink
vine: use taskid to name library log file (#4030)
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZhou5042 authored Jan 24, 2025
1 parent 28462b2 commit 5d81eab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -3921,7 +3921,6 @@ struct vine_manager *vine_ssl_create(int port, const char *key, const char *cert
cctools_uuid_t local_uuid;
cctools_uuid_create(&local_uuid);
q->uuid = strdup(local_uuid.str);
q->duplicated_libraries = 0;

q->next_task_id = 1;
q->fixed_location_in_queue = 0;
Expand Down Expand Up @@ -4723,8 +4722,6 @@ struct vine_task *send_library_to_worker(struct vine_manager *q, struct vine_wor
if (!check_worker_against_task(q, w, original)) {
return 0;
}
/* Track the number of duplicated libraries */
q->duplicated_libraries += 1;

/* Duplicate the original task */
struct vine_task *t = vine_task_copy(original);
Expand All @@ -4736,7 +4733,7 @@ struct vine_task *send_library_to_worker(struct vine_manager *q, struct vine_wor
/* If watch-library-logfiles is tuned, watch the output file of every duplicated library instance */
if (q->watch_library_logfiles) {
char *remote_stdout_filename = string_format(".taskvine.stdout");
char *local_library_log_filename = string_format("library-%d.debug.log", q->duplicated_libraries);
char *local_library_log_filename = string_format("library-task-%d.log", t->task_id);
t->library_log_path = vine_get_path_library_log(q, local_library_log_filename);

struct vine_file *library_local_stdout_file = vine_declare_file(q, t->library_log_path, VINE_CACHE_LEVEL_TASK, 0);
Expand Down
1 change: 0 additions & 1 deletion taskvine/src/manager/vine_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ struct vine_manager {
/* Internal state modified by the manager */

int next_task_id; /* Next integer task_id to be assigned to a created task. */
int duplicated_libraries; /* The number of duplicated libraries */
int fixed_location_in_queue; /* Number of fixed location tasks currently being managed */
int num_tasks_left; /* Optional: Number of tasks remaining, if given by user. @ref vine_set_num_tasks */
int busy_waiting_flag; /* Set internally in main loop if no messages were processed -> wait longer. */
Expand Down

0 comments on commit 5d81eab

Please sign in to comment.