[Trilinos-Users] AztecOO Convergence

Ammar T. Al-Sayegh alsayegh at purdue.edu
Fri Dec 16 14:07:43 MST 2005


Hello All,

I'm still trying to figure out how to get more consistent AztecOO
results with different number of processors. To simplify the problem,
I wrote this short code.

int main(int argc, char *argv[])
{
    // init mpi and vars
    double norm2;
    MPI_Init(&argc,&argv);
    Epetra_MpiComm Comm(MPI_COMM_WORLD);
    Epetra_Map Map(300, 3, Comm);
    Epetra_Vector *b;
    Epetra_Vector *x = new Epetra_Vector(Map);
    Epetra_CrsMatrix *A;

    // read A & B and solve linear problem
    MatrixMarketFileToVector("b", Map, b);
    MatrixMarketFileToCrsMatrix("A", Map, A);
    Epetra_LinearProblem problem(A, x, b);
    AztecOO solver(problem);
    solver.Iterate(1000, 10e-6);
    x->Norm2(&norm2);
    cout << norm2 << endl;

    // finalize mpi
    MPI_Finalize();
}

The code reads A and b and solves for x, then displays the norm2
of x. What I need to achieve is to find the solver that will give
me identical number of iterations and norm2 regardless of the
number of processors I'm using. So far, I haven't been able to
get that with all the tests I did with AztecOO. Following are
sample results for this code with the attached A and b files:

1P)  947.26756007660583 [1 iter; 0.003615 sec]
2P)  947.26754915839501 [6 iter; 0.008490 sec]
4P)  947.26757223410937 [14 iter; 0.115180 sec]
6P)  947.26756549199729 [22 iter; 0.009980 sec]
8P)  947.26755742820296 [30 iter; 0.117318 sec]
10P) Nonconvergent!

As you see, not only the solution varies with the number of
processors, but it becomes nonconvergent when we reach 10
processors.

Any suggestion on how I can modify this code, either by using
different AztecOO options or by using a different solver, so
that I can get solution path and results insensitive to the
number of processors?

Thanks.


-ammar 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A
Type: application/octet-stream
Size: 82012 bytes
Desc: not available
Url : http://software.sandia.gov/mailman/private/trilinos-users/attachments/20051216/24fb2d09/A-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b
Type: application/octet-stream
Size: 6965 bytes
Desc: not available
Url : http://software.sandia.gov/mailman/private/trilinos-users/attachments/20051216/24fb2d09/b-0001.obj


More information about the Trilinos-Users mailing list