Just to add - the sparse matrix would be of size: 4*84500+(4+8)*2.7338e+09 bytes = 33GB [app]. So matlab - with the intermediate represantations used in PetscBinaryWrite.m are perhaps consuming 256GB - so a sequential assmebly of this matrix in C code [with proper preallocation] should be more memory efficient..
Satish On Wed, 10 Jun 2015, Matthew Knepley wrote: > On Wed, Jun 10, 2015 at 8:32 AM, venkatesh g <[email protected]> > wrote: > > > The size of the matrix is 84500 x 84500 > > > > the no. of non-zero elements is 2.7338e+09 > > > > This matrix is not sparse, it has 40% fill. You should treat it as dense. > For dense matrices of this size, > you should consider using Elemental. We have an interface to Elemental in > PETSc. > > I recommend writing the code to create these entries on the fly since it > will probably be faster than loading > them from disk. > > Thanks, > > Matt > > > > cheers, > > Venkatesh > > > > On Wed, Jun 10, 2015 at 6:35 PM, Satish Balay <[email protected]> wrote: > > > >> Whats the size of the matrix? How many non-zeros? > >> > >> Satish > >> > >> On Wed, 10 Jun 2015, venkatesh g wrote: > >> > >> > Hi > >> > > >> > I am trying to write very large sparse matrices A and B for solving > >> > generalized Eigenvalue problem > >> > > >> > so that I can use SLEPC ex7.c code. > >> > > >> > I want to read matrices from file according to that code. And I generate > >> > these matrices from Matlab using PetscBinaryWrite.m > >> > > >> > However, it exceeds my 256 GB RAM in one of the machines. So I am > >> unable to > >> > generate these binary matrices. > >> > > >> > Kindly let me know how to write them efficiently. > >> > > >> > cheers, > >> > > >> > Venkatesh > >> > > >> > >> > > > > >
