Hi, hong Thanks very much!
Best Regards, On Fri, Aug 15, 2008 at 10:28 PM, Hong Zhang <hzhang at mcs.anl.gov> wrote: > > Shengyong, > > On Fri, 15 Aug 2008, berry wrote: > > Hi, >> >> I am totally a newbie to petsc. Previously I use laspack library for my >> linear solver. Now I decide to transfer to Petsc for our simulation code. >> >> I have a huge sparse matrix with 3million*3million with 21 million no zero >> elements. The matrix is symmetric, so the non zero element of upper >> triangular matrix >> is only 12 million. And matrix format is Yale Space Matrix format. >> However, >> I have not seen any indicative parmater for matrix symmetry property in >> MatCreateSeqAIJWithArrays() function. The manual says: >> >> >> PetscErrorCode PETSCMAT_DLLEXPORT MatCreateSeqAIJWithArrays(MPI_Comm >> comm,PetscInt m,PetscInt n,PetscInt* i,PetscInt*j,PetscScalar *a,Mat >> *mat) >> >> < >> http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/Sys/MPI_Comm.html#MPI_Comm >> > >> >> Input Parameters >> *comm< >> http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/Sys/comm.html#comm >> > >> *- must be an MPI communicator of >> size< >> http://www-unix.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/Sys/size.html#size >> >1 >> *m *- number of rows >> *n *- number of columns >> *i *- row indices >> *j * >> >> *a * >> >> >> Can petsc exploit any symmetric proptery of a given matrix? How could I >> Set >> it to be symmetry one ? >> > > You can use MATSBAIJ matrix format > (see > http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MATSBAIJ.html > ) > > Using MATSBAIJ saves half of storage space for original sparse matrix. > However, > it is not as efficient as MATAIJ for some matrix operations, e.g., > MatMult(), due to non-contiguous data access and additional communication > overhead. > > Hong > > >> Best Regards, >> >> >> >> >> -- >> Pang Shengyong >> Solidification Simulation Lab, >> State Key Lab of Mould & Die Technology, >> Huazhong Univ. of Sci. & Tech. China >> >> > -- Pang Shengyong Solidification Simulation Lab, State Key Lab of Mould & Die Technology, Huazhong Univ. of Sci. & Tech. China -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080816/11722497/attachment.htm>
