[Trilinos-Users] Question about FillComplete for EpetraCRS matrix

Erik Boman egboman at sandia.gov
Thu May 20 16:29:14 MDT 2010


On the side note of data partitioning, you may want to look into the
Isorropia package. Isorropia can create good but non-trivial maps that
you can use to redistribute your data. You can either apply a geometric
method (e.g., RCB) directly to your mesh, or partition the sparse matrix
directly (using graph or hypergraph partitioning from Zoltan). The
latter approach requires you to first construct your matrix with an
initial distribution of your choice, then use Isorropia to partition
your matrix, and finally redistribute your matrix.

Erik

On Thu, 2010-05-20 at 15:18 -0600, Heroux, Mike wrote:
> I am not sure why your code failed as it did.  Each Epetra method returns an error code.  You could check to see if any return as nonzero.
> 
> Regarding partitioning, the assignment of nodes is completely flexible, depending on the Epetra_Map objects you use to construct vectors and matrices.  If you want PE 0 to own a portion of the checkerboard, define PE 0's global ID list in your Epetra_Map object to own the appropriate global IDs for the checkerboard.
> 
> Mike
> 
> 
> On 5/20/10 4:08 PM, "Natarajan CS" <csnataraj at gmail.com> wrote:
> 
> Mike,
>     Thanks for the suggestion. This was a mistake on my side, should have taken a closer look at the matrix! With help from a colleague we figured It was not a memory leak but rather a bad algorithmic issue. i was inserting values where there shouldn't have been values. i.e node 4 (in a 2*2*2 system) for example had a -1 in the first sub-diagonal and that should not have been the case! This makes me wonder, how exactly does FillComplete function? In essence by goofing up my stencil I would think I am only changing the sparsity pattern, so if all Fill complete is doing is changing the indexing, why is there a problem?
> 
> Also as an aside, the current allocation of nodes to processors seems like dividing linearly (i.e n/p nodes to each processor), is there another way to do this? i mean distributing nodes in a checker board pattern? i.e nx/px,ny/py,nz/pz nodes in each direction to every processor?
> 
> Thanks again for the help, much appreciated.
> 
> 
> On Thu, May 20, 2010 at 11:18 AM, Heroux, Michael A <maherou at sandia.gov> wrote:
> Have you tried a memory checking tool on your code?  This looks a bit like a memory error.  If you can run something like valgrind (which is freely available for Linux systems) on your code, you might see the problem quickly.
> 
> Mike
> 
> 
> On 5/19/10 5:25 PM, "Natarajan CS" <csnataraj at gmail.com <http://csnataraj@gmail.com> > wrote:
> 
> Sorry about the repost, made a quality goof up while typing, so resending the code snippet. The matrix also looks correct when I o/p it, so not sure where exactly I am messing things up!
> 
> for eg for 2*2*2 grid points :
> 
>    Processor    Row Index    Col Index           Value
>        0             0             1                      -1
>        0             0             2                      -1
>        0             0             4                      -1
>        0             0             0                       6
>        0             1             0                      -1
>        0             1             3                      -1
>        0             1             5                      -1
>        0             1             1                       6
>        0             2             3                      -1
>        0             2             0                      -1
>        0             2             6                      -1
>        0             2             2                       6
>        0             3             2                      -1
>        0             3             1                      -1
>        0             3             7                      -1
>        0             3             3                       6
>        1             4             5                      -1
>        1             4             2                      -1
>        1             4             6                      -1
>        1             4             0                      -1
>        1             4             4                       6
>        1             5             4                      -1
>        1             5             3                      -1
>        1             5             7                      -1
>        1             5             1                      -1
>        1             5             5                       6
>        1             6             7                      -1
>        1             6             4                      -1
>        1             6             8                      -1
>        1             6             2                      -1
>        1             6             6                       6
>        1             7             6                      -1
>        1             7             5                      -1
>        1             7             9                      -1
>        1             7             3                      -1
>        1             7             7                       6
> 
> .
> 
> On Wed, May 19, 2010 at 1:54 PM, Natarajan CS <csnataraj at gmail.com <http://csnataraj@gmail.com> > wrote:
> Hello All,
>        I came across the following error (attached) when trying to create a laplacian stencil for 3D. I appreciate any help in figuring out if this is an algorithmic issue or a trilinos issue. The code crashes during FillComplete. I am only sending the relevant functions, however, if someone would like to reproduce the issue, I will be happy to send them the code. I couldn't find anything similar in the archives, so apologies if a similar question has been answered before. I have attached the portions of the code that give the bug below and the back trace, if any, from gdb. I am using the intel compiler with vendor blas and lapack.
> 
> Cheers and thanks in advance,
> 
> C.S.N
> ************************************************************
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users



More information about the Trilinos-Users mailing list