[vtkusers] Compiler optimization breaks vtkContourValues

Johnny Norris jnorris at mcs.anl.gov
Wed Oct 17 17:48:13 EDT 2001


Hi,

Under Solaris 7 for SPARC, using the native Sun compilers (version 5),
compiling with optimization greater than -xO2 causes vtkContourValues to
behave incorrectly.  I compile the release version of my app with the -fast
compiler option, which sets the optimization level to -xO4.  Anyway, what
happens is that for vtkCutter or vtkContourGrid, only the last value is
used for cutting/contouring.  Once I recompiled vtkContourGrid.cxx with
'-fast -xO2', relinked libVTKCommon.so, and relinked my program, cutting and
contouring worked as expected.  I assume that other classes using
vtkContourValues are similarly affected, but I haven't tested them.

This used to work correctly; I'm not sure exactly when it started behaving
this way.  :^(  I'm using a nightly release of VTK from Sept. 13.

I don't know if anything can (or should) be done about this, but I thought
that I'd mention it on the list in case anyone else has this problem.

John
-- 
John Norris
Research Programmer
Center for Simulation of Advanced Rockets
http://www.uiuc.edu/ph/www/jnorris



More information about the vtkusers mailing list