Skip to content

Commit

Permalink
remove test comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZhou5042 committed Dec 11, 2024
1 parent aa85792 commit b6e17e0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
6 changes: 2 additions & 4 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static int handle_cache_update(struct vine_manager *q, struct vine_worker_info *

vine_txn_log_write_cache_update(q, w, size, transfer_time, start_time, cachename);

w->resources->disk.inuse += size / 1e6;
w->resources->disk.inuse += BYTES_TO_MEGABYTES(size);

/* If the replica corresponds to a declared file. */

Expand Down Expand Up @@ -2615,9 +2615,7 @@ struct rmsummary *vine_manager_choose_resources_for_task(struct vine_manager *q,

/* do not count the size of input files as available.
* TODO: efficiently discount the size of files already at worker. */
if (t->input_files_size > 0) {
available_disk -= t->input_files_size;
}
available_disk -= t->input_files_size;

rmsummary_merge_override_basic(limits, max);

Expand Down
19 changes: 11 additions & 8 deletions taskvine/src/manager/vine_schedule.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,20 @@ int check_worker_have_enough_resources(struct vine_manager *q, struct vine_worke
ok = 0;
}

const char *filename = "resource_allocation.csv";
FILE *file = fopen(filename, "a");
/* TEST
if (file == NULL) {
perror("failed to open file");
return EXIT_FAILURE;
}
const char *filename = "resource_allocation.csv";
FILE *file = fopen(filename, "a");
if (file == NULL) {
perror("failed to open file");
return EXIT_FAILURE;
}
fprintf(file, "%d,%f,%f,%f,%ld,%ld,%ld\n", t->task_id, tr->cores, tr->memory, tr->disk, worker_net_resources->cores.total - worker_net_resources->cores.inuse, worker_net_resources->memory.total - worker_net_resources->memory.inuse, worker_net_resources->disk.total - worker_net_resources->disk.inuse);
fprintf(file, "%d,%f,%f,%f,%ld,%ld,%ld\n", t->task_id, tr->cores, tr->memory, tr->disk, worker_net_resources->cores.total - worker_net_resources->cores.inuse, worker_net_resources->memory.total - worker_net_resources->memory.inuse, worker_net_resources->disk.total - worker_net_resources->disk.inuse);
fclose(file);
fclose(file);
*/

vine_resources_delete(worker_net_resources);
return ok;
Expand Down

0 comments on commit b6e17e0

Please sign in to comment.