From: John P. <jwp...@gm...> - 2018-05-24 18:42:55
|
On Wed, May 23, 2018 at 6:37 PM, Viviana Palacio Betancur < vpa...@uc...> wrote: > Hello, > > I have a correct solution of my problem and now I want to run in parallel. > I'm using all the correct iterators and the program compiles and runs, > except now the solution is completely different and inconsistent to the > problem run in serial. I'm using the SuperLU solver. > > I suspect that I'm making some mistakes when running in parallel, since it > might be the case that the information is not being shared simultaneously? > Is it necessary to impose communication barriers and if so in which steps > of the solution should this be implemented? > In general it is not necessary to impose communication barriers in order to get library code working in parallel, I can't speak for any parallel code you may have written yourself. The usual issue is that you are using an active_element_iterator for assembly, which works fine in serial, but obviously breaks when you try to switch to parallel because you should be using active_local_element_iterators. Another possibility is that you are missing a system.update() call somewhere. This can cause issues if you are using current_local_solution values before they have been updated with values from the parallel solution vector, but isn't very common. Without seeing your code, it's hard to say what the issue might be... -- John |