[petsc-users] vecview problem

Barry Smith bsmith at mcs.anl.gov
Mon Jul 9 13:04:11 CDT 2012


On Jul 9, 2012, at 9:55 AM, Klaij, Christiaan wrote:

>>   There is no such viewer as PETSC_VIEWER_DEFAULT (you just got
>>   lucky it didn't crash in the first call). Maybe you want
>>   PETSC_VIEWER_STDOUT_WORLD?
>> 
>>   Barry
>> 
>> PETSC_VIEWER_DEFAULT is for setting the particular format a
>> viewer uses.
> 
> Yes that's it, thanks! (should I really get a segmentation fault
> when running this in debug mode? A message "no such viewer" would
> be nicer.)

    The reason it cannot give a nice error message is FORTRAN :-). PETSC_VIEWER_DEFAULT  is an integer value while the PETSC_VIEWER_STDOUT_WORLD etc in FORTRAN are special integer values cast to pointers, the compiler doesn't understand this and our conversion routine cannot do a runtime check since the integer values overlap.

  Sorry

    Barry

> 
> 
> dr. ir. Christiaan Klaij
> CFD Researcher
> Research & Development
> E mailto:C.Klaij at marin.nl
> T +31 317 49 33 44
> 
> MARIN
> 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
> T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl
> 



More information about the petsc-users mailing list