On 25/6/2012 3:40 PM, Jed Brown wrote: > On Mon, Jun 25, 2012 at 12:25 PM, TAY wee-beng <zonexo at gmail.com > <mailto:zonexo at gmail.com>> wrote: > > Hi, > > I'm trying to use DMDA to solve my linear equation. > > It works fine with 1 cpu. However, problem arise when cpu > 1. I > get segmentation error. > > I tried to use MatView and PetscViewerASCIIOpen to view my matrix > to check if it's correct. > > It works with 1 cpu. However now, it shows the error below when I > use 2 cpu. > > [0]PETSC ERROR: --------------------- Error Message > ------------------------------------ > [0]PETSC ERROR: Argument out of range! > [0]PETSC ERROR: ASCII matrix output not allowed for matrices with > more than 1024 rows, use binary format instead. > You can override this restriction using -mat_ascii_output_large.! > > To view the matrix, my command is : > > call PetscViewerASCIIOpen(MPI_COMM_WORLD,"A_semi.txt",viewer,ierr) > > call MatView(A_semi,viewer,ierr) > > call PetscViewerDestroy(viewer,ierr) > > I tried to use -mat_ascii_output_large but then it just hangs > there forever. > > > It may just be very slow.
I tried using 1 cpu and I got it in a few minutes. Should i take a long time if I use 2 cpu? Also, I got the error: [0]PETSC ERROR: Argument out of range! [0]PETSC ERROR: ASCII matrix output not allowed for matrices with more than 1024 rows, use binary format instead. It doesn't happen when I use 1 cpu. Is it normal to get it when I use 2 cpu? I also tried to use : call MatView(A_semi,PETSC_VIEWER_STDOUT_WORLD ,ierr) but the same error occurs. It just hangs there when 2 cpu are used. > > Why do you need ASCII? Writing anything large in ASCII is hopeless. > Please use binary. > > I create the matrix using DMCreateMatrix. I don't have to use > MatCreateAIJ, right? > > Also, I check for the ierr value when I use MatSetValuesStencil to > ensure there's no error. Btw There's no problem with VecView. > > So how can I view the matrix? > > Thank you! > > -- > Yours sincerely, > > TAY wee-beng > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120625/86002c81/attachment.html>
