Unfortunately, I suspect that even with threads and fully shared process memory this would not parallelize well.
On Thu, Jun 18, 2015 at 2:41 PM, Daniel Carrera <[email protected]> wrote: > On 18 June 2015 at 18:48, Stefan Karpinski <[email protected]> wrote: > >> On Wed, Jun 17, 2015 at 4:38 PM, Daniel Carrera <[email protected]> >> wrote: >> >>> An irritating problem with all the codes that solve planetary systems is >>> that they are all serial -- this problem is apparently hard to parallelize. >> >> >> That appears to be a language-independent issue. Even with mature >> threading, it doesn't seem like this problem would scale well. It might be >> possible to figure out a clever way to parallelize it, but that is a >> serious algorithmic research problem. A superficial Google Scholar search >> indicates that some work has been done in this direction using tree data >> structures. >> > > > Yeah, this is an algorithmic issue and many people much smarter than me > are working on it. I was just hoping that using shared memory would give me > a small amount of parallelism without clever algorithms. > > Tree codes are the standard solution for systems like galaxies, where the > number of particles is very large, but the dynamical age is small. In a > galaxy you have 200 billion particles that have each done 40 orbits. > > For planet systems the problem is reversed. We have few particles and long > ages (Earth has gone around the Sun 4 billion times). This means that small > errors can really accumulate. For these problems the state of the art is > either very high order integrators, or "symplectic" integrators which are > designed to preserve a Hamiltonian that is closely related to the > Hamiltonian of the system. > > Unfortunately, unlike the tree codes, none of these solutions are > parallel. Because every particle affects every particle and you can't > afford to throw away any information, the problem is very resistant to > parallelization. I was wondering if I could get a free lunch by using > shared memory. > > Cheers, > Daniel. > -- > When an engineer says that something can't be done, it's a code phrase > that means it's not fun to do. >
