[Trilinos-Users] Ifpack_ILUT on a serial(?) CrsMatrix

Bora Ucar boraucar at gmail.com
Fri Mar 17 10:09:53 MST 2006


Hi,

have a CrsMatrix, where all rows and nonzeros are in processor 0.

I want to compute ILUT factorization of this matrix (only in processor 0).
The following code gives

IFPACK ERROR -1,
../../../../packages/ifpack/src/Ifpack_RCMReordering.cpp, line 103

error in runtime. I tried nesting the preconditioner construction
lines in an if(MyPID()==0) statement. That program did not return
(process 0 got stuck in there).

How can I create a serial(?) CrsMatrix and (approximately) factor it
using ILUT in one of the processes?



---------------------------------------------------------------------------------------------------------------------------------------------------------
if( Comm.MyPID() == 0)
    numRows =N;                //Matrix dimension
else
    numRows = 0;

 Epetra_Map* SerialMap = new Epetra_Map(-1,numRows,0,Comm);
 SerialMatrix = new Epetra_CrsMatrix(Copy,*SerialMap,0);

if(Comm.MyPID() == 0) {
     // read from a file and fill SerialMatrix
}

SerialMatrix->FillComplete();

//Construct ILUT preconditioner

Ifpack_AdditiveSchwarz<Ifpack_ILUT> *M;
int   OverlapLevel = 0;
Teuchos::ParameterList List;

List.set("fact: drop tolerance", 1e-3);
List.set("fact: ilut level-of-fill", 2.0);
List.set("schwarz: reordering type", "rcm");

M =  new Ifpack_AdditiveSchwarz<Ifpack_ILUT>(SerialMatrix, OverlapLevel);
M->SetParameters(List);
M->Initialize();
M->Compute();




More information about the Trilinos-Users mailing list