Accéder au contenu.
Menu Sympa

starpu-devel - [Starpu-devel] Problems using parallel tasks

Objet : Developers list for StarPU

Archives de la liste

[Starpu-devel] Problems using parallel tasks


Chronologique Discussions 
  • From: Miguel Palhas <mpalhas@gmail.com>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: [Starpu-devel] Problems using parallel tasks
  • Date: Wed, 5 Jun 2013 12:11:15 +0100
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>

Hi, i'm trying to use OpenMP within my tasks, but i'm having a problem, as starpu insists on always allowing me to use one thread.

Here's a simple test program i wrote to ilustrate the problem:

#include <stdio.h>
#include <starpu.h>

void func(void* buffers[], void *args) {
  printf("%d\n", starpu_combined_worker_get_size());
}

struct starpu_codelet cl = {
  .where = STARPU_CPU,
  .cpu_funcs = { func, NULL },
  .nbuffers = 0,
  .type = STARPU_FORKJOIN,
  .max_parallelism = 10
};

void call() {
  struct starpu_task *t = starpu_task_create();
  t->cl = &cl;
  int param = 1;
  t->cl_arg = &param;
  t->cl_arg_size = sizeof(int);
  t->synchronous = 1;
  starpu_task_submit(t);
}

int main() {
  starpu_init(NULL);
  call();
  starpu_shutdown();
}


Either i'm doing/assuming something wrong within this code, or my starpu configuration is wrong. starpu seems to detect 3 cpu cores (plus another one dedicated to my CUDA device):

 % starpu_machine_display                                                                                                                                                                                                                                      sandbox(master|+4)
Warning: you are running the default eager scheduler, which is not very smart. Make sure to read the StarPU documentation about adding performance models in order to be able to use the heft or dmda schedulers instead.
StarPU has found :
3 CPU cores
CPU 0
CPU 1
CPU 2
1 CUDA devices
CUDA 0 (GeForce GTX 580 1.5 GiB 04:00.0)
0 OpenCL devices


What am i doing wrong here?

--
Cumprimentos
Miguel Palhas



Archives gérées par MHonArc 2.6.19+.

Haut de le page