From: John P. <pet...@cf...> - 2007-03-20 14:30:40
|
Roy Stogner writes: > > Currently, there are two forms of NumericVector::init: > > init(n_global, n_local, bool), which creates parallel vectors if > n_global != n_local and serial vectors if n_global == n_local > > init(n_global, bool), which creates serial vectors. > > I'd like to change init(n_global, n_local, bool) to create parallel > vectors even when n_global==n_local. Of course I'll go through the > libMesh source code to find any of our internal usage of this function > for serial vector creation and switch to the other API, but it's > possible that this change could break user code too. My thought is > that for 0.6.0 we'd add a deprecated() call to the function, and the > behavior would be changed in CVS immediately thereafter. > > Why change it? Because sometimes you really do want a parallel vector > where n_global == n_local. Our simple benchmarks like ex15 break in > parallel, because libMesh currently gets confused when there are fewer > elements in the mesh than there are processors. Not the highest > priority problem, I admit, but it would be nice to fix eventually. > > Comments? Objections? I would guess the parallel vector with n_local==n_global has some extra overhead compared with a serial vector. What if you really want to create a serial NumericVector for some reason? Does a parallel NumericVector with n_local==n_global always have the same entries on every processor? What if the intended behavior of the code is to build different serial NumericVectors on separate processors and then add them together later? -John |