[Trilinos-Users] Error: "AZ_extract_comm_info: Received elements must be stored after all local elements"

Williams, Alan B william at sandia.gov
Wed Mar 30 11:26:09 MDT 2011


If it works correctly in "Copy" mode but not in "View" mode, then perhaps the call to A->FillComplete() is messing with the indices in your Matrix_ia structure, causing them to be wrong for the second call. Mike Heroux might know whether that could be the case.
Alan


From: Henian Xia [mailto:xiahenian at gmail.com]
Sent: Wednesday, March 30, 2011 11:17 AM
To: Williams, Alan B
Cc: trilinos-users
Subject: Re: [Trilinos-Users] Error: "AZ_extract_comm_info: Received elements must be stored after all local elements"

Hi,
Thank you very much for your reply. I created A by "A = new Epetra_CrsMatrix(View, *Map, 3);". It's in a function called solveEqu() as following. When I call solveEqu() at the first time, it works, but when I call the function again, it reports that error. The objects "solver", "A", "x", and "b" are all defined inside the function solveEqu() and are deleted before returning from the function. So it's very strange that it works at the first time while doesn't work later. In addition, if I use "Copy" mode, it works perfectly.

void solveEqu()      {
Epetra_CrsMatrix * A;
   A = new Epetra_CrsMatrix(View, *Map, 3);
    for( i = 0 ; i < NumMyElementsForTRILI ; i++ )
    {
        (*A).InsertGlobalValues( (*A).GRID( i ) , Matrix_ia[ i + 1 ] - Matrix_ia[ i ] ,
                                 Matrix_a + Matrix_ia[ i ] , Matrix_ja + Matrix_ia[ i ] );
    }
    (*A).FillComplete();
    AztecOO * solver;
    Epetra_Vector * x = new Epetra_Vector(*Map);
    Epetra_Vector * b = new Epetra_Vector(*Map);
    for( i = 0 ; i < 4 * localNodesNumber ; i ++ ) (*b)[i] = 1;
    solver = new AztecOO(A, x, b);
    (*solver).SetAztecOption(AZ_precond, AZ_Jacobi);
    (*solver).Iterate(1000, 1.0E-8);
   delete solver;
   delete b;
   delete x;
   delete A;
}

Thank you very much,
Henian
On Wed, Mar 30, 2011 at 1:04 PM, Williams, Alan B <william at sandia.gov<mailto:william at sandia.gov>> wrote:
It is referring to elements of the matrix 'A'.
How did you create A?
Aaln


From: trilinos-users-bounces at software.sandia.gov<mailto:trilinos-users-bounces at software.sandia.gov> [mailto:trilinos-users-bounces at software.sandia.gov<mailto:trilinos-users-bounces at software.sandia.gov>] On Behalf Of Henian Xia
Sent: Wednesday, March 30, 2011 10:56 AM
To: trilinos-users
Subject: [Trilinos-Users] Error: "AZ_extract_comm_info: Received elements must be stored after all local elements"

Hi everyone,
I encountered this error "AZ_extract_comm_info: Received elements must be stored after all local elements" when I call the method "solver = new AztecOO(A, x, b);". Does anyone know what this means please?

Thank you very much,
Henian

--
Henian Xia
Graduate Research Assistant
Department of MABE
University of Tennessee, Knoxville



--
Henian Xia
Graduate Research Assistant
Department of MABE
University of Tennessee, Knoxville
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20110330/00a9ece3/attachment.html 


More information about the Trilinos-Users mailing list