[Trilinos-Users] Not enough space to get a matrix row

Eric Marttila eric.marttila at thermoanalytics.com
Fri Jan 18 09:55:00 MST 2013


Dear all,

I've been using ML with AztecOO to solve linear systems and they have worked 
very well for many of my cases.  However, I've run into an error in ML with a 
matrix that is sparse, but not quite as sparse as those that I've used 
previously.

The error I get is:

"Not enough space to get a matrix row. A row length of 
380444954 was not sufficient"

I've been able to reproduce this with a fairly small matrix - it has about 
96,000 rows and 669,000 non-zero values so on average about 7 non-zeros per 
row.  It is unclear to me why ML is trying to get a matrix row with a size of 
~380 million given that my original matrix size is only 96,000.

Does anyone have thoughts on this?  I'm not sure whether this might be a bug 
in ML, or if I'm trying to use a matrix that isn't compatible with ML.

Thank you.
--Eric

p.s.  I've attached a short main program that I created to reproduce the 
behavior.  It uses my matrix in matrix market format - I'd be happy to send 
the matrix file to anyone that is interested.  It is several Mbytes when 
compressed so I wasn't sure if I should attach that file when sending to this 
list.  I've also attached the call stack from when the error occured.
-------------- next part --------------
#include "Epetra_ConfigDefs.h"
#include "mpi.h"
#include "Epetra_MpiComm.h"
#include "Epetra_Map.h"
#include "Epetra_RowMatrix.h"
#include "Epetra_CrsMatrix.h"
#include "EpetraExt_CrsMatrixIn.h"
#include "ml_epetra_preconditioner.h"
#include "Trilinos_Util_CrsMatrixGallery.h"
#include <iostream>

using namespace Trilinos_Util;

int main(int argc, char *argv[])
{
  MPI_Init(&argc,&argv);
  Epetra_MpiComm comm(MPI_COMM_WORLD);

  const int nRows = 96008; // number of rows in matrix in A.mtx
  Epetra_Map rowMap(nRows, 0, comm);
  Epetra_CrsMatrix *A = new Epetra_CrsMatrix(Copy, rowMap, 0);

  if (!A) {
    cerr << "Error creating A matrix.\n";
    exit (-1);
  }

  const char *solnMatFile = "A.mtx";
  cerr << "Reading A matrix from " << solnMatFile << " ...\n";
  int stat = EpetraExt::MatrixMarketFileToCrsMatrix(solnMatFile, comm, A);

  if (stat != 0) {
    cerr << "Error obtaining A matrix from " << solnMatFile << "\n";
    exit (-1);
  }
  
  cerr << "Creating the preconditioner...\n";
  
  // create the preconditioner object and compute the preconditioner
  ML_Epetra::MultiLevelPreconditioner * MLPrec = 
    new ML_Epetra::MultiLevelPreconditioner(*A, true);
  
  cout << "Done.\n";

  delete MLPrec;
  delete A;

  MPI_Finalize() ;
  
  return(EXIT_SUCCESS);
}
-------------- next part --------------
#0  0x00007f3db64edc00 in ML_get_row_CSR_norow_map () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#1  0x00007f3db64cd0a8 in ML_matmat_mult () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#2  0x00007f3db64e707e in ML_rap () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#3  0x00007f3db64908d1 in ML_Gen_AmatrixRAP () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#4  0x00007f3db6442368 in ML_Gen_MultiLevelHierarchy () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#5  0x00007f3db6442b9c in ML_Gen_MultiLevelHierarchy_UsingAggregation () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#6  0x00007f3db6545529 in ML_Epetra::MultiLevelPreconditioner::ComputePreconditioner(bool) () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#7  0x00007f3db654b6bf in ML_Epetra::MultiLevelPreconditioner::MultiLevelPreconditioner(Epetra_RowMatrix const&, bool) () from /usr/local/thirdparty/trilinos/v10.10.2/lib/libml.so
#8  0x00000000004034f6 in main ()


More information about the Trilinos-Users mailing list