[petsc-users] Questions abt ex22f

TAY wee-beng zonexo at gmail.com
Sun Apr 22 14:47:34 CDT 2012


Hi,

I changed from "0" to PETSC_NULL_OBJECT. In linux, I managed to get the 
output now:

Vector Object:Vec_0x24c7f10_0 1 MPI processes
   type: mpi
Process [0]
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0833333
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667
0.0416667

Doing the same in VS2008 in windows 64bit, both "0" and 
"PETSC_NULL_OBJECT" give the results as:

Vector Object:Vec_0000000084000000_0 1 MPI
   type: mpi
Process [0]
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Why are the results different? The changes I made (as mentioned earlier) 
are the same in both.

Yours sincerely,

TAY wee-beng


On 22/4/2012 9:41 PM, Matthew Knepley wrote:
> On Sun, Apr 22, 2012 at 3:36 PM, Jed Brown <jedbrown at mcs.anl.gov 
> <mailto:jedbrown at mcs.anl.gov>> wrote:
>
>     On Sun, Apr 22, 2012 at 14:28, Matthew Knepley <knepley at gmail.com
>     <mailto:knepley at gmail.com>> wrote:
>
>         On Sun, Apr 22, 2012 at 3:20 PM, Jed Brown
>         <jedbrown at mcs.anl.gov <mailto:jedbrown at mcs.anl.gov>> wrote:
>
>             Look at the man page for VecView, it needs a PetscViewer
>             argument.
>
>         Works for me with VecView(x, PETSC_NULL_OBJECT, ierr),
>         although it is 0
>
>
>     Matt, are you trying to cause confusion? The posted code called
>     VecView with the wrong number of arguments. Also, telling any
>     Fortran user that "0" is even related to PETSC_NULL_OBJECT is a
>     terrible idea because they are totally different things on the
>     Fortran side.
>
>
> This is perfectly sensible:
>
>  1) If you use PETSC_NULL_OBJECT, you get the default viewer
>
>  2) I was talking about the solution, which is the 0 vector in my output
>
>    Matt
>
> -- 
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120422/265de8e1/attachment.htm>


More information about the petsc-users mailing list