Accéder au contenu.
Menu Sympa

starpu-devel - Re: [Starpu-devel] Passing a structure to starpu insert task

Objet : Developers list for StarPU

Archives de la liste

Re: [Starpu-devel] Passing a structure to starpu insert task


Chronologique Discussions 
  • From: Amani Alonazi <amani.alonazi@kaust.edu.sa>
  • To: Samuel Thibault <samuel.thibault@inria.fr>, Hatem Ltaief <hatem.ltaief@kaust.edu.sa>, starpu-devel@lists.gforge.inria.fr
  • Subject: Re: [Starpu-devel] Passing a structure to starpu insert task
  • Date: Mon, 15 Oct 2018 08:28:05 +0300
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=amani.alonazi@kaust.edu.sa; spf=Pass smtp.mailfrom=amani.alonazi@kaust.edu.sa; spf=None smtp.helo=postmaster@mail-ed1-f46.google.com
  • Ironport-phdr: 9a23:uOu/whyW4ay15RfXCy+O+j09IxM/srCxBDY+r6Qd2ukSIJqq85mqBkHD//Il1AaPAd2Eraocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HRbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDtU7s6RSqt4LtqSB/wiScIKTg58H3MisdtiK5XuQ+tqwBjz4LRZoyeKfhwcb7Hfd4CSmVBUMReWSxPDI2/coUBEfYOMP1CoIXhvVYDtweyCRWuCe7p1zRGhmX23ao/0+k5DQzG2RYvH9QPsH/JsNj1MKASUeavw6jJzDXIcvRb1i346IfSdBAhoOuAUqh0ccrWz0kgDQLEjlSLpIzmJTyVy/8Ns3SB4+V+SO2vlnQrqxprrTW2wMonl4fHhoUQyl/e9CV5xp44Jd6iR05met6kDIFcuD+HOItrWM8iWHtntSAnwbMFoZ62ZDYGxIgjyhLFaPGKc5KE7gz/WOuSOzt1i3NodbSijBio60eg0PfzVsys3VZKsCVFlt7Mu2gI1xPJ68iHTuJx8Vm81jqSzgzT5O5JLEEumarULJ4hxbEwlp4NvkjZAiD2n0D2gLeXdkUi5Oeo9/zqbqv6qpKYLYN5iQHzPr4wlsCjAuk0KAcDUmmD9eS5zrLj/En5QLtQjv0xl6nUqIrVJcEBqa6/Ag9ZyJws6xK4DzegytsZnHgHIUlGeB2dkojpIE3OLOrmAviinlSgiixryOreMr37HprNNmTDkKvmfbtl8E5c1BA8zcpH55JJE70OPez8WlHvu9zcFRI5Nw20w/37CNVmzI8eVmyPAqiDMKPdr1CE/OMvI++WZI8UojnxMfYl5+S9xUM+zGQUeLSk2dMraHGyF+liPw3NenPpn9oFV3sKvwA3Uej2oFyESz9aIXioCeZ0xjgnBYfuKZvKR42jyOiB1Tu2G9tSemlHB16kEn71bJnCVvsRLjmbdIspiSANT6C8DoMsyxyqnAv70KZ8aOXa/TcXuNTi0sJ07qvdj0Ic7ztxWu2Y2meMB0hwmWUBVT5+iKl6qEp8jF6H1q5xkf1wFtVO/O8PXwsnc4XVmb8pQ+vuUx7MK4/aAG2tRc+rVHRoFopoko0+Jn1lEtDntSjtmi+jArsbjbuOXcBm8avBxGS3KspgjW3PhvB40wsWB/BXPGjjvZZRshDJDteVwUaQir22M6kQwWjW/TXblDfcjARjSAd1FJ79czUfa0/R94mr40rDS/qjBe1iPFcfj8GFLaROZ5viilAUHPo=
  • 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>

Hello Samuel,
Sorry I didn't send the line that throw the seg-fault. It is in the unpack function call:
static void cl_x_cpu_func(void *descr[], void *cl_arg){
  mystruct *s;

  starpu_codelet_unpack_args(cl_arg, &x,
                                     s
                                     );
}

If I change the code into:
static void cl_x_cpu_func(void *descr[], void *cl_arg){
  mystruct s;

  starpu_codelet_unpack_args(cl_arg, &x,
                                     &s
                                     );
}

It works ok. Also, mystruct contains an array that I want to keep track of it. I'm testing now StarPU_INOUT instead of StarPU_Value.

Many thanks for your time. I just want to understand how the struct is handled under the hood.

Thanks again,
Amani

On Sun, Oct 14, 2018 at 9:11 PM Samuel Thibault <samuel.thibault@inria.fr> wrote:
Hello,

Amani Alonazi, le dim. 14 oct. 2018 18:28:21 +0300, a ecrit:
> I have a question about passing a struct to StarPU codelet. If I pass it by
> reference to my function, I got Segmentation-fault error.

The backtrace for the segfault you are getting seems completely
unrelated to these values, notably:

> 0x00007ffff7547dd9 in _starpu_job_get_data_size (model=0x300000001, arch=
> 0x7ffff791ee50 <_starpu_config+4784>, impl=0, j=0x970d60) at core/perfmodel/
> perfmodel_history.c:198

model = 0x300000001 looks very bogus, and is taken from codelet->model,
is starpu_mpi_codelet(codelet) in

>  starpu_insert_task(
>       starpu_mpi_codelet(codelet),

supposed to remain allocated during the task execution?

Perhaps you should show the whole code so we can check what is happening
around the few lines you have sent.

Samuel


--
Amani AlOnazi
PhD Student
Extreme Computing Research Center

King Abdullah University of Science and Technology
Al-Khawarizmi (Bldg.1)
Floor 0, Office 0203-WS02

Telephone: +966 (12) 808 0218
Mobile: +966 (0) 555191795
Email: amani.alonazi@kaust.edu.sa

www.kaust.edu.sa


This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.


Archives gérées par MHonArc 2.6.19+.

Haut de le page