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 Cc: Jed Brown; [email protected] Subject: RE: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_? That's true. But I'm using finite difference. Best, Hui ________________________________ From: Matthew Knepley [[email protected]] Sent: Saturday, August 02, 2014 9:51 AM To: Sun, Hui Cc: Jed Brown; [email protected] Subject: Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_? On Sat, Aug 2, 2014 at 11:17 AM, Sun, Hui <[email protected]<mailto:[email protected]>> 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 don't understand what you said about "This example uses a simple decomposition, not what you use above". What do you mean by "simple decomposition"? I use FieldSplit and schur on SNES ex62. Matt ________________________________________ From: Jed Brown [[email protected]<mailto:[email protected]>] Sent: Friday, August 01, 2014 11:15 PM To: Sun, Hui; [email protected]<mailto:[email protected]> Subject: Re: [petsc-users] Some possible bugs with PETSC_VIEWER_BINARY_? "Sun, Hui" <[email protected]<mailto:[email protected]>> 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:30000),100,100)) > > mesh(reshape(y(10001:20000),100,100)) > > mesh(reshape(y(1:10000),100,100)) > > > The output plots are different from what I get if I use 1 processor. This example uses a simple decomposition, not what you use above. Note that this example was contributed and we do not endorse it as recommended practice. If your code is already set up very much like this, it may be worth looking at, but don't write new code in this way because it is algorithmically constraining. -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
