<p>That particular issue is an output diagnostic quirk that will be fixed eventually. Don't worry about it now.</p>
<div class="gmail_quote">On Jun 25, 2012 6:44 PM, "TAY wee-beng" <<a href="mailto:zonexo@gmail.com">zonexo@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 25/6/2012 5:57 PM, Barry Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So you run with -mat_ascii_output_large and it hangs? How big is the matrix?<br>
<br>
If it truly hangs and doesn't just take a long time you can run with -start_in_debugger and then hit control c in the debugger after it has been "hanging" to see where it is.<br>
<br>
But why not just run with a matrix less than 1024 to check that the matrix is correct.<br>
<br>
Barry<br>
</blockquote>
<br>
I have switched to a 2d case. The matrix size is much smaller (still more than 1024). The matrix is now saved to a txt file. However, when running 2 cpu, I got:<br>
<br>
Matrix Object: 1 MPI processes<br>
type: mpiaij<br>
row 0: (0, -2) (132, 3) (264, -1)<br>
row 1: (1, -2) (133, 3) (265, -1)<br>
row 2: (2, -2) (134, 3) (266, -1)<br>
...<br>
<br>
Shouldn't it be 2 MPI processes? Like in a vector:<br>
<br>
Vector Object:Vec_84000004_0 2 MPI processes<br>
type: mpi<br>
Process [0]<br>
0<br>
0<br>
...<br>
<br>
I used :<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>
Is there some error in my matrix? I also noticed that the matrix creating w/o using DM gives the same "1 MPI processes" output.<br>
<br>
I create it using :<br>
<br>
call DMDACreate2d(MPI_COMM_WORLD,<u></u>DMDA_BOUNDARY_NONE,DMDA_<u></u>BOUNDARY_NONE,DMDA_STENCIL_<u></u>STAR,size_x,size_y,&<br>
PETSC_DECIDE,num_procs,i1,i1,<u></u>PETSC_NULL_INTEGER,PETSC_NULL_<u></u>INTEGER,da,ierr)<br>
<br>
call DMCreateMatrix(da,MATAIJ,A_<u></u>semi,ierr)<br>
<br>
Thanks!<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Jun 25, 2012, at 4:39 PM, TAY wee-beng wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 25/6/2012 4:24 PM, Barry Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Jun 25, 2012, at 4:18 PM, TAY wee-beng wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 25/6/2012 3:40 PM, Jed Brown wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Jun 25, 2012 at 12:25 PM, TAY wee-beng <<a href="mailto:zonexo@gmail.com" target="_blank">zonexo@gmail.com</a>> wrote:<br>
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>
</blockquote></blockquote>
It only makes sense to view the matrix in this case for small matrices. You should check the matrix for a very small problem, how are you going to compare the ASCII output to see if it is correct for a huge matrix. Always debug with very small data sets.<br>
<br>
Barry<br>
</blockquote>
I just want to get a quick view of the matrix. I have the correct matrix generated without using DM. So, I use a file difference comparison software to check the difference, which is rather fast. I just wonder why it takes a long time to view the matrix on screen, or write to file. I guess it should be easy to just view the matrix and spot the error.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>
<br>
It may just be very slow.<br>
</blockquote>
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:<br>
<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>
<br>
It doesn't happen when I use 1 cpu. Is it normal to get it when I use 2 cpu?<br>
<br>
I also tried to use :<br>
<br>
call MatView(A_semi,PETSC_VIEWER_<u></u>STDOUT_WORLD ,ierr)<br>
<br>
but the same error occurs. It just hangs there when 2 cpu are used.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why do you need ASCII? Writing anything large in ASCII is hopeless. Please use binary.<br>
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!<br>
<br>
-- <br>
Yours sincerely,<br>
<br>
TAY wee-beng<br>
<br>
<br>
</blockquote></blockquote></blockquote>
<br>
</blockquote></blockquote>
<br>
<br>
</blockquote></div>