[petsc-users] MatView and PetscViewerASCIIOpen problem when cpu > 1
Jed Brown
jedbrown at mcs.anl.gov
Mon Jun 25 15:40:28 CDT 2012
On Mon, Jun 25, 2012 at 12:25 PM, TAY wee-beng <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.
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/2f8f4fea/attachment.html>
More information about the petsc-users
mailing list