<div class="gmail_quote">On Mon, Jun 25, 2012 at 12:25 PM, TAY wee-beng <span dir="ltr"><<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I'm trying to use DMDA to solve my linear equation.<br>
<br>
It works fine with 1 cpu. However, problem arise when cpu > 1. I get segmentation error.<br>
<br>
I tried to use  MatView and PetscViewerASCIIOpen to view my matrix to check if it's correct.<br>
<br>
It works with 1 cpu. However now, it shows the error below when I use 2 cpu.<br>
<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------<u></u>------<br>
[0]PETSC ERROR: Argument out of range!<br>
[0]PETSC ERROR: ASCII matrix output not allowed for matrices with more than 1024 rows, use binary format instead.<br>
You can override this restriction using -mat_ascii_output_large.!<br>
<br>
 To view the matrix, my command is :<br>
<br>
call PetscViewerASCIIOpen(MPI_COMM_<u></u>WORLD,"A_semi.txt",viewer,<u></u>ierr)<br>
<br>
call MatView(A_semi,viewer,ierr)<br>
<br>
call PetscViewerDestroy(viewer,<u></u>ierr)<br>
<br>
I tried to use -mat_ascii_output_large but then it just hangs there forever.</blockquote><div><br></div><div>It may just be very slow.</div><div><br></div><div>Why do you need ASCII? Writing anything large in ASCII is hopeless. Please use binary.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I create the matrix using DMCreateMatrix. I don't have to use MatCreateAIJ, right?<br>
<br>
Also, I check for the ierr value when I use MatSetValuesStencil to ensure there's no error. Btw There's no problem with VecView.<br>
<br>
So how can I view the matrix?<br>
<br>
Thank you!<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Yours sincerely,<br>
<br>
TAY wee-beng<br>
<br>
</font></span></blockquote></div><br>