yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00495
Re: run faster by +16% with r1402
-
To:
yade-dev@xxxxxxxxxxxxxxxx
-
From:
Janek Kozicki <janek_listy@xxxxx>
-
Date:
Thu, 26 Jun 2008 16:24:35 +0200
-
Delivered-to:
janek_listy@xxxxx (janek_listy)
-
Delivered-to:
yade-dev@xxxxxxxxxxxxxxxx
-
Face:
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEUBAQEtLS1KSkpRUVFXV1dYWFhjY2Nzc3N3d3eHh4eKioqdnZ24uLjLy8vc3NxVIagyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH2AIVEzgS1fgQtQAAAjRJREFUOMtt1DFv00AUAOAzFQNbjigSyoQaRaBMhKgLUyKXpVNNeUpk9vyDqFJhQ1kiBuaqAwJCqvPtSLY7RlTn5+5IdnYkkt/AOyfxXVLe5vf53Z1875kd34tOEax8djmj6GyjhB5bxz50GdsVZr9fqRjZwAtKOJw5Wqs2MMZ16ALHsaDncF7xAHix1oEFHAB8f+pRjcO4gfZDykcYzbiucRolOLUJ6kjA0xtVt+A6TySlM0RajIpK6DzwKZ/nOYbF/gclHMo1ZOHYY/+Ha+AWuM+3oMS4eeqYzZ8FiCltgUqI8cd2wwAVpJk+8LWYjBtnJdQpHQqJMd4Oxt4bU9ESiFGc5hkqaH74asAX4iabP5I5gZ+qjgGlJCqZa3h3lxhoeVcSE1qLQC4sqKOK9MGW9E3izFqqHokoztLFEgXg31sbZEKnWi2T74A4NxfVQqlkjKtcAWD+zcArFEES01dR0E/nnV0IgugmDd/2L84sOAouRBBHEc7gtc8teDkRlE0iNQPo2w3Xhh/D4TCIQ4LRLoTvgwjj6RRgavdurxYGMaIuGOyAW/PpNlCcU9/93AHenAWYjPoAwa+G3e3to/MgFNTAEKvKDjzuCzHTnY3qqdXtx24VijzQfZ0yewZ5cwRFQaa+mIYr1uI0I76+3W4xhlvoVRwOA0Fdl64HlJnxP6T8YpX/Lga4Wv4A3ErrU5oTfN7Mu/llXMl8RXEPji/lQkN3H7qXqgC2By47EXeU/7PJ/wPxRKMnuZwIeAAAAABJRU5ErkJggg==
-
In-reply-to:
<4863942C.5010406@arcig.cz>
-
Reply-to:
Yade Development Group <yade-dev@xxxxxxxxxxxxxxxx>
-
Sender:
yade-dev-bounces@xxxxxxxxxxxxxxxx
Václav Šmilauer said: (by the date of Thu, 26 Jun 2008 15:05:48 +0200)
> ParallelEngine was just what I cooked up this morning, since I thought
> it was a low-hanging fruit; but I think the summer student will have to
> run bunch of benchmarks to determine where it is worth to parallelize
> and where not (and for what number of bodies and interactions etc).
I'm supervising his job. And I'm already experienced with
boost::thread, which yade uses in some places. So it may be a sad
news for you, but the in-engine parallelization will be done using
boost::threads. We will see how it will affect the problem caused by not
being able to random access the containers.
It will be a bit more coding though, as splitting into parallel
blocks will have to be coded explicitly using boost::threads, whereas
OpenMP does the split implicitly using compilers #pragmas.
The student's first assignment is to write a "hello world"
parallelization example in following way:
- a container with forces {float force;} // write only
- a container with interactions {float force, int id1, int id2;} // RO
- he has to do a parallel loop over all interactions and add force
to each id1 and id2. Doing it in parallel will involve some mutexes
to block the access to particular force[id1] so that another thread
will not attempt to modify it.
That's a simple job for him, just to start the work. Later he will
incorporate that into yade. He is just a 2nd year CS student, and he has
only 2 months to do it. We will see how far it will go.
--
Janek Kozicki |
_______________________________________________
yade-dev mailing list
yade-dev@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-dev
Follow ups
References