From 6c10b92d4c38cfa7b2327edf7a69e1100ca169e4 Mon Sep 17 00:00:00 2001 From: Nathalie Furmento Date: Tue, 16 Apr 2024 11:27:44 +0200 Subject: [PATCH] small fixes --- mpi/src/mpi/starpu_mpi_mpi.c | 5 ++++- src/core/workers.c | 1 - src/sched_policies/component_sched.c | 15 ++++++++++++++- src/sched_policies/sched_visu.c | 4 ++-- .../combined_worker_assign_workerid.c | 3 +++ 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/mpi/src/mpi/starpu_mpi_mpi.c b/mpi/src/mpi/starpu_mpi_mpi.c index 47a506ecb5..eca0a0ae01 100644 --- a/mpi/src/mpi/starpu_mpi_mpi.c +++ b/mpi/src/mpi/starpu_mpi_mpi.c @@ -1,6 +1,6 @@ /* StarPU --- Runtime system for heterogeneous multicore architectures. * - * Copyright (C) 2009-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria + * Copyright (C) 2009-2024 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria * Copyright (C) 2017 Guillaume Beauchamp * Copyright (C) 2021 Federal University of Rio Grande do Sul (UFRGS) * @@ -315,6 +315,7 @@ void _starpu_mpi_submit_ready_request(void *arg) void _starpu_mpi_req_willpost(struct _starpu_mpi_req *req) { + (void)req; _STARPU_MPI_INC_POSTED_REQUESTS(req, 1); } @@ -644,6 +645,7 @@ int _starpu_mpi_wait(starpu_mpi_req *public_req, MPI_Status *status) #ifdef STARPU_DEVEL #warning see if we can return ret instead of 0 #endif + (void)ret; return 0; } @@ -763,6 +765,7 @@ int _starpu_mpi_test(starpu_mpi_req *public_req, int *flag, MPI_Status *status) #ifdef STARPU_DEVEL #warning see if we can return ret instead of 0 #endif + (void)ret; return 0; } diff --git a/src/core/workers.c b/src/core/workers.c index c0b599165a..ad37413d08 100644 --- a/src/core/workers.c +++ b/src/core/workers.c @@ -601,7 +601,6 @@ static inline int _starpu_can_execute_task_any_impl(unsigned workerid, struct st /* must be called with sched_mutex locked to protect state_blocked_in_parallel */ int starpu_worker_can_execute_task(unsigned workerid, struct starpu_task *task, unsigned nimpl) { - /* TODO: check that the task operand sizes will fit on that device */ return _starpu_can_execute_task_any_impl(workerid, task) && _starpu_can_use_nth_implementation(_starpu_config.workers[workerid].arch, task->cl, nimpl) && diff --git a/src/sched_policies/component_sched.c b/src/sched_policies/component_sched.c index d0520297dc..c0f63be560 100644 --- a/src/sched_policies/component_sched.c +++ b/src/sched_policies/component_sched.c @@ -1,6 +1,6 @@ /* StarPU --- Runtime system for heterogeneous multicore architectures. * - * Copyright (C) 2013-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria + * Copyright (C) 2013-2024 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria * Copyright (C) 2013 Simon Archipoff * * StarPU is free software; you can redistribute it and/or modify @@ -104,7 +104,20 @@ int starpu_sched_component_can_execute_task(struct starpu_sched_component * comp worker = starpu_bitmap_next(&component->workers_in_ctx, worker)) if (starpu_worker_can_execute_task(worker, task, nimpl) || starpu_combined_worker_can_execute_task(worker, task, nimpl)) + { + if (starpu_worker_can_execute_task(worker, task, nimpl) == 1) + _STARPU_EXTRA_DEBUG("worker %d CAN execute task %s with impl %d\n", worker, starpu_task_get_name(task), nimpl); + if (starpu_combined_worker_can_execute_task(worker, task, nimpl) == 1) + _STARPU_EXTRA_DEBUG("combined worker %d CAN execute task %s with impl %d\n", worker, starpu_task_get_name(task), nimpl); return 1; + } + else + { + if (starpu_worker_can_execute_task(worker, task, nimpl) == 0) + _STARPU_EXTRA_DEBUG("worker %d CANNOT execute task %s with impl %d\n", worker, starpu_task_get_name(task), nimpl); + if (starpu_combined_worker_can_execute_task(worker, task, nimpl) == 0) + _STARPU_EXTRA_DEBUG("combined worker %d CANNOT execute task %s with impl %d\n", worker, starpu_task_get_name(task), nimpl); + } return 0; } diff --git a/src/sched_policies/sched_visu.c b/src/sched_policies/sched_visu.c index 6a7c48b983..9cd434028c 100644 --- a/src/sched_policies/sched_visu.c +++ b/src/sched_policies/sched_visu.c @@ -1,6 +1,6 @@ /* StarPU --- Runtime system for heterogeneous multicore architectures. * - * Copyright (C) 2013-2023 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria + * Copyright (C) 2013-2024 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria * * StarPU is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -23,6 +23,7 @@ static int *_index_current_popped_task; static int _index_current_popped_task_all_gpu; static int *_index_current_popped_task_prefetch; static int _index_current_popped_task_all_gpu_prefetch; +static int _index_current_task_for_visualization=0; #endif int _print3d; int _print_in_terminal; @@ -30,7 +31,6 @@ int _print_n; #ifdef PRINT_PYTHON static int index_task_currently_treated=0; #endif -static int _index_current_task_for_visualization=0; struct starpu_task *task_currently_treated = NULL; static char *_output_directory = NULL; diff --git a/tests/parallel_tasks/combined_worker_assign_workerid.c b/tests/parallel_tasks/combined_worker_assign_workerid.c index 491a636ddf..b222848a0b 100644 --- a/tests/parallel_tasks/combined_worker_assign_workerid.c +++ b/tests/parallel_tasks/combined_worker_assign_workerid.c @@ -80,6 +80,9 @@ int main(void) if (ret == -ENODEV) return STARPU_TEST_SKIPPED; STARPU_CHECK_RETURN_VALUE(ret, "starpu_init"); + struct starpu_sched_policy *policy = starpu_sched_get_sched_policy(); + if (strcmp(conf.sched_policy_name, policy->policy_name)) goto shutdown; + combined_ncpus = starpu_cpu_worker_get_count(); if (combined_ncpus < 4) goto shutdown;