Accéder au contenu.
Menu Sympa

starpu-devel - Re: [starpu-devel] [StarPU for stencil-based code: logic, starpu_shutdown error]

Objet : Developers list for StarPU

Archives de la liste

Re: [starpu-devel] [StarPU for stencil-based code: logic, starpu_shutdown error]


Chronologique Discussions 
  • From: Maxim Abalenkov <maxim.abalenkov@gmail.com>
  • To: starpu-devel@inria.fr
  • Subject: Re: [starpu-devel] [StarPU for stencil-based code: logic, starpu_shutdown error]
  • Date: Tue, 5 Nov 2024 09:46:33 +0000
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=maxim.abalenkov@gmail.com; spf=Pass smtp.mailfrom=maxim.abalenkov@gmail.com; spf=None smtp.helo=postmaster@mail-wr1-f48.google.com
  • Ironport-data: A9a23:D+qW8aq2LSezs1FDvXfG58iKQKpeBmJzZRIvgKrLsJaIsI4StFGz/ 9cqaN20SrvbITm2FJovItjZqgxT+86An4J9CFY6nZ0GZ38S88TMDIrGIB78ZSiZf5KeFkg+t JgTZoWcd5o/RCKM/R72OOa5/XQg2/vSS+LwU+KVMSx9GVNoQnwq2Uo6y+JRbuKF7LFVJivU0 T+li5SBZgf7s9INDkoU976bs0Eo+//7uSkfsUY3ffBKt0SYkGMaZK7zXppdWUYUOKEMWLbSe tv+8V2Zwo/41098UYysnufxIxMEGeeDYATf23BaUaX/jxFO/SBv2KswHfdNMk0/Zxehz4kgk o0V3XCTYV50ZfOUwLx1vz1wSXwW0XhuoeefSZSHmZXPiReAKRMA+t02ZGkuJ4oU5+1rNm9H8 P0cOVglYwuK7w6M6OvTptJE2IJ6daEHAKtF4is8lGiBUK58KXz+a/yiCeFwjG9Yav9mRq62i /oxMVJHcBnGahtTDVYbYLpWcDCA2xET2xUBwL6kjfJfD1r7lGSd45CxWDbhQeFmcO0O9qquS s0qyEyiav0SHIT3JTNoaRtAjMeX9c/wcNp6+LFVapeGKbBcr4AeIER+aLe1nRW2omKkYeJTE GYuwXcN8bUSrnypCef/dCTt9RZovjZEMzZRO+gz6QXI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dMxqIX4DM2cLb+Xhl3nJvw75O3q5817tBECK K46pB4Im5M77ffQxLViEYKM8o+a9MSsosub9dyw==

Dear Samuel, Philippe et al.,

How are you? I hope all is well with you. I re-compiled StarPU and ran the ‘task_size_overhead.sh’ script. Please find its output attached. Does it mean that for my system task sizes of 512 elements and above will be beneficial? In my StarPU experiments I have been using tasks of size 488. However, the performance I see is far from optimal. Thank you for your help and have a great day ahead!

Best wishes,
Maxim

Attachment: tasks_size_overhead.pdf
Description: Adobe PDF document


Maxim Abalenkov \\ maxim.abalenkov@gmail.com
+44 7 486 486 505 \\ www.maxim.abalenkov.uk

On 4 Nov 2024, at 14:03, Maxim Abalenkov <maxim.abalenkov@gmail.com> wrote:

Dear Samuel, Philippe et al.,

How are you? I hope all is well with you. Thank you very much for your suggestions. I tried:

a) using starpu_pause, starpu_resume around sequential part of the code
b) using starpu_data_acquire, starpu_data_release —//—
c) examining the task size overhead on my system with the ‘task_size_overhead.sh’ script

find -name tasks_size_overhead.sh
./tests/microbenchs/tasks_size_overhead.sh
./starpupy/benchmark/tasks_size_overhead.sh
./build/tests/microbenchs/tasks_size_overhead.sh
./build/starpupy/benchmark/tasks_size_overhead.sh

The a) and b) didn’t not bring any performance gain. I run my StarPU code with

  STARPU_NCUDA=0 STARPU_NOPENCL=0 STARPU_NCPU=8 STARPU_SCHED=dmda python ./app.py

Python script ‘app.py’ is a simple wrapper pre-processing the input data and launching the main C + StarPU executable.

I also fail to run the shell script c). It crashes because it is unable to find the executable ‘tasks_size_overhead’. I couldn’t find it either using a ‘find’ command. Do I need to configure and compile StarPU with some extra options to make the executable ‘tasks_size_overhead’?

I’m using StarPU 1.4.7 @ macOS Sonoma 14.7.1 with an M2 CPU.

I will share my source code in a public GitHub repository for you to see in the very near future. In the meantime I’m going to convert the final phase of my finite-difference code to StarPU and test performance again. Thank you for your help and have a wonderful day ahead!

Best wishes,
Maxim

Maxim Abalenkov \\ maxim.abalenkov@gmail.com
+44 7 486 486 505 \\ www.maxim.abalenkov.uk

On 11 Oct 2024, at 16:13, Philippe SWARTVAGHER <philippe.swartvagher@inria.fr> wrote:



Le 11/10/2024 à 14:43, Samuel Thibault a écrit :
No, that should not really be a problem. But how large your tasks
are? See the checklist item about task sizes:
https://files.inria.fr/starpu/doc/html/CheckListWhenPerformanceAreNotThere.html#CheckTaskSize
That being said, you will probably want to put starpu_pause() /
starpu_resume() around your not-yet-starpufied code, otherwise StarPU
monopolizes all CPU cores, which can thus degrade the performance of the
non-starpufied code.

If your non-StarPU code accesses data managed by StarPU, you should also call

starpu_data_acquire(data_handle, STARPU_R /* or STARPU_RW */)

before your non-StarPU code reads (or writes) the StarPU data. This makes sure the tasks which manipulate data_handle are finished. Then, to tell StarPU you are finished working with this memory and it can start other tasks using this handle, you have to call

starpu_data_release(data_handle)

Have a look for instance on this example: https://gitlab.inria.fr/starpu/starpu/-/blob/f3e318b326666c5b279680d5a57fc0468e8c1876/examples/filters/fvector_pick_variable.c

Or, instead, you can just call

starpu_task_wait_for_all()

but depending on what your application does, you may not need to wait for all tasks to finish to start reading/writing one piece of data.

Not sure if this will solve your problems, but it was missing from your description of how your program uses StarPU.

--
Philippe SWARTVAGHER
Assistant Professor @ ENSEIRB-MATMECA
Research team Topal @ Inria Bordeaux-Sud Ouest





Archives gérées par MHonArc 2.6.19+.

Haut de le page