[petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Sun, Hui
Hello, The PETSC_VIEWER_BINARY_ command is supposed to create a binary Petsc Viewer, then MatView VecView suppose to add matrices and vectors to the binary output file. However, it seems that the viewer gives different output if you use different number of processors. Below is a more detailed

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: Here you can see I have 4 processors running at the same time. I read in the output from MATLAB using the command [A,B,C,D,x,b,y] = PetscBinaryRead('binaryoutput'). And I visualize the variable y by the commands: mesh(reshape(y(20001:3),100,100))

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Sun, Hui
I do have my code set up based on ex70. The reason I do this is that I need to use fieldsplit and schur complement. I can't find other examples doing that, except ex55 and ex70, however I have a hard time get ex55 running. I don't understand what you said about This example uses a simple

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Matthew Knepley
On Sat, Aug 2, 2014 at 11:17 AM, Sun, Hui hus...@ucsd.edu wrote: I do have my code set up based on ex70. The reason I do this is that I need to use fieldsplit and schur complement. I can't find other examples doing that, except ex55 and ex70, however I have a hard time get ex55 running. I

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Sun, Hui
That's true. But I'm using finite difference. Best, Hui From: Matthew Knepley [knep...@gmail.com] Sent: Saturday, August 02, 2014 9:51 AM To: Sun, Hui Cc: Jed Brown; petsc-users@mcs.anl.gov Subject: Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Sun, Hui
I have just tested the PETSC_VIEW_BINARY_ on other test codes, they all work pretty well with multiple processors. Maybe I shouldn't be using ex70.c as a template any more. Best, Hui From: Sun, Hui Sent: Saturday, August 02, 2014 9:56 AM To: Matthew Knepley

Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_?

2014-08-02 Thread Jed Brown
Sun, Hui hus...@ucsd.edu writes: I have just tested the PETSC_VIEW_BINARY_ on other test codes, they all work pretty well with multiple processors. Maybe I shouldn't be using ex70.c as a template any more. I strongly suggest not using it as a template for decomposition or for assembling

[petsc-users] valgrind error messages with PETSc V3.5.1

2014-08-02 Thread Randall Mackie
The attached small program, basically a call to PetscPrintf, gives the following valgrind errors: [rmackie ~/tst_petsc_problem] ./cmd_test ==24812== Invalid read of size 1 ==24812==at 0x4C2E500: __GI_strncpy (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24812==by 0x4EF5B4D: