Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nfurmento committed Apr 16, 2024
1 parent b0abfe4 commit 6c10b92
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
5 changes: 4 additions & 1 deletion mpi/src/mpi/starpu_mpi_mpi.c
Original file line number Diff line number Diff line change
@@ -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)
*
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion src/core/workers.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down
15 changes: 14 additions & 1 deletion src/sched_policies/component_sched.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions src/sched_policies/sched_visu.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -23,14 +23,14 @@ 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;
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;
Expand Down
3 changes: 3 additions & 0 deletions tests/parallel_tasks/combined_worker_assign_workerid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6c10b92

Please sign in to comment.