From: Roy S. <roy...@ic...> - 2007-08-24 15:16:52
|
On Fri, 24 Aug 2007, li pan wrote: > Probably I need to explain a little bit to my last > question. I used (*system.solution)(dof_indices[j]) to > get value. Serial run works well. But in parallel, > I've got out of memory error. So I changed the code. I > used > NumericVector::localize(v); > v[dof_indices[j]]; > This time there was no out of memory error. But why? It shouldn't have been an out of memory error, it should have been an out of bounds error. Because our parallel vectors are broken across every processor, each processor only has access to solution values that it "owns". Currently, if you need to access solution values owned by other processors you need to use a localized serial vector instead. The System class maintains such a serial vector called *current_local_solution for the solution vector; you can access it directly or through the System::current_solution() method. Please read example 13 to see how it's used. --- Roy |