[Trilinos-Users] Problems with crashing with the ML's MatrixFreePreconditioner

Ramsey, James J CIV (US) james.j.ramsey14.civ at mail.mil
Wed Jul 3 10:20:16 MDT 2013


I have an Epetra_Operator that I can use for a matrix-free solve with AztecOO without a preconditioner, and it gets me the same results as corresponding solves with both an Epetra_CrsMatrix and an Epetra_FEVbrMatrix assembled from the same element stiffness matrices used in the Epetra_Operator. ML's MultiLevelPreconditioner also works fine with the Epetra_CrsMatrix and Epetra_FEVbrMatrix. Using this Epetra_Operator with the MatrixFreePreconditioner, though, has been a problem. I've tried two different types of Epetra_CrsGraph with the MatrixFreePreconditioner: one like that used to construct the Epetra_CrsMatrix, and one like that used to construct the Epetra_FEVbrMatrix (with a block size of 3).

If I use the defaults (i.e., an empty parameter list argument), then my test program dies with a std::bad_alloc error. This seems traceable to lines 511-515 in ml_MatrixFreePreconditioner.cpp:

  std::vector< std::vector<int> > NodesOfAggregate(NumAggregates);

  for (int i = 0; i < Graph.NumMyBlockRows(); ++i)
  {
    int AID = BlockAggr_ML->aggr_info[0][i];
    NodesOfAggregate[AID].push_back(i);
  }

The variable AID gets set to a value equal to the value of NumAggregates, leading to the crash. (If I replace "NodesOfAggregate[AID]" with "NodesOfAggregate.at(AID)", I get a std::out_of_range error instead.)

If I change the aggregation method to "METIS", then I get a different error, traceable to line 863 in ml_MatrixFreePreconditioner.cpp, with ML_Operator_Getrow returning 1 and NumEntries equal to zero.

I've tried different a couple different nullspaces, a single vector of zeros, and six vectors corresponding to rigid body modes. It doesn't make a difference.

Any idea of what kinds of things could be going wrong?


More information about the Trilinos-Users mailing list