[Paraview] building paraview 3.98.1 with the pgi compiler (13.3.0-12.5.0)
Hong Yi
hongyi at renci.org
Thu Jul 18 15:23:16 EDT 2013
Thanks, Robert. It is good to know that VTK can be used with compilers that do not support const_reverse_iterator. I did try and commented out VTK_CONST_REVERSE_ITERATOR_COMPARISON definition in vtkConfigure.h. In fact, I changed the CMakeList.txt in ParaView_Source_Dir/VTK to have it off, so after I reconfigured and regenerated paraview, VTK_CONST_REVERSE_ITERATOR_COMPARISON definition line is commented out in vtkConfigure.h. So I assume this means VTK_CONST_REVERSE_ITERATOR_COMPARISON is not defined. However, the same error got raised in the same reverse iterator operations in vtkAbstractContextItem.cxx. Without understanding how VTK works internally to honor this VTK_CONST_REVERSE_ITERATOR_COMPARISON definition, I am thinking those same reverse iterator operations in vtkAbstractContextItem.cxx should not be called if VTK_CONST_REVERSE_ITERATOR_COMPARISON is not defined in this case. Could you shed some lights on this?
Thanks,
Hong
-----Original Message-----
From: Robert Maynard [mailto:robert.maynard at kitware.com]
Sent: Thursday, July 18, 2013 3:09 PM
To: Hong Yi
Cc: Parete-Koon, Suzanne T.; paraview at paraview.org
Subject: Re: [Paraview] building paraview 3.98.1 with the pgi compiler (13.3.0-12.5.0)
So I misread the header that parses
VTK_CONST_REVERSE_ITERATOR_COMPARISON. If VTK_CONST_REVERSE_ITERATOR_COMPARISON is set, we are stating that compiler DOES support const_reverse_iterator comparison, if it is not set the compiler doesn't.
I expect due to cross compilation the
VTK_CONST_REVERSE_ITERATOR_COMPARISON is being defined in your case, while you actually want it not defined.
VTK can be used with compilers like pgi that have a broken const_reverse_iterator implementation.
On Thu, Jul 18, 2013 at 2:06 PM, Hong Yi <hongyi at renci.org> wrote:
> I did an experiment to use pgi compiler to compile a simple program test.cpp like the following:
> -----------------------
> #include <vector>
> int main()
> {
> std::vector<int> test;
> std::vector<int>::const_reverse_iterator it = test.rbegin();
> it != test.rend();
> return 0;
> }
> -------------------------
> by running "pgCC test.cpp -o test" then I got the same error below:
> --------------------------
> "test.cpp", line 6: error: no operator "!=" matches these operands
> operand types are: std::reverse_iterator<const int *> !=
> std::reverse_iterator<int *>
> it != test.rend();
> ^
> --------------------------
>
> So I think the pgi compiler included in PrgEnv-pgi/4.1.40 module I am currently using on Titan does not support REVERSE_ITERATOR_COMPARISON. My question is whether VTK/ParaView somehow accommodates this and has logic to get around using this REVERSE_ITERATOR_COMPARISON when the variable VTK_CONST_REVERSE_ITERATOR_COMPARISON is not defined. I did try and undefined VTK_CONST_REVERSE_ITERATOR_COMPARISON, but the same error remains. I checked the file VTK/Rendering/Context2D/vtkAbstractContextItem.cxx where the error is raised and did not find any logic to handle the case where VTK_CONST_REVERSE_ITERATOR_COMPARISON is not defined. Does this mean ParaView cannot be built using a compiler that does not support REVERSE_ITERATOR_COMPARISON?
>
> Thanks,
> Hong
>
> ________________________________________
> From: paraview-bounces at paraview.org [paraview-bounces at paraview.org] on
> behalf of Hong Yi [hongyi at renci.org]
> Sent: Tuesday, July 16, 2013 1:36 PM
> To: Robert Maynard; Parete-Koon, Suzanne T.
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] building paraview 3.98.1 with the pgi compiler (13.3.0-12.5.0)
>
> Just a supplemental note to the previous message below: if I don't run ccmake to reconfigure and regenerate, and directly run "make" after changing the line to "#define VTK_CONST_REVERSE_ITERATOR_COMPARISON 1" the same error/issue still remains. Looks like this VTK_CONST_REVERSE_ITERATOR_COMPARISON, although defined in the vtkConfigure.h, is not honored by the pgi compiler on Titan. Any suggestions/workarounds to get around this issue?
>
> Thanks,
> Hong
>
> -----Original Message-----
> From: paraview-bounces at paraview.org
> [mailto:paraview-bounces at paraview.org] On Behalf Of Hong Yi
> Sent: Monday, July 15, 2013 12:49 PM
> To: Robert Maynard; Parete-Koon, Suzanne T.
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] building paraview 3.98.1 with the pgi compiler
> (13.3.0-12.5.0)
>
> Thanks, Robert. I have been working with Suzanne on this issue. The line in vtkConfigure.h is:
> #define VTK_CONST_REVERSE_ITERATOR_COMPARISON
>
> We changed it to be
> #define VTK_CONST_REVERSE_ITERATOR_COMPARISON 1 but after reconfiguring and regenerating, the line changes back to the original "#define VTK_CONST_REVERSE_ITERATOR_COMPARISON"
>
> Because of this, rebuilding ParaView on Titan with pgi compiler generates the same error.
>
> Any further suggestions on this issue?
>
> Thanks,
> Hong
>
>
> ________________________________________
> From: paraview-bounces at paraview.org [paraview-bounces at paraview.org] on
> behalf of Robert Maynard [robert.maynard at kitware.com]
> Sent: Wednesday, July 03, 2013 11:10 AM
> To: Parete-Koon, Suzanne T.
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] building paraview 3.98.1 with the pgi compiler
> (13.3.0-12.5.0)
>
> We have seen this issue with const_reverse_iterators before on older versions of gcc. What is the value of VTK_CONST_REVERSE_ITERATOR_COMPARISON in the build directory file Common/Core/vtkConfigure.h?
>
> On Wed, Jul 3, 2013 at 10:26 AM, Parete-Koon, Suzanne T.
> <paretekoonst at ornl.gov> wrote:
>> We are having difficulty building paraview with the pgi compiler on a large cray system. pgCC does not seem to recognize the "!=" for a certain class of functions. We have tried several versions of the pgi compiler. Has anyone encountered this? Is there a patch or a workaround?
>>
>> Here is the error.
>>
>> "/ccs/proj/nfi010/ParaView/ParaView-3.98.1-source/VTK/Rendering/Context2D/vtkAbstractContextItem.cxx", line 167: error:
>> no operator "!=" matches these operands operand types are:
>> vtkContextScenePrivate::const_reverse_iterator
>> != std::reverse_iterator<vtkAbstractContextItem **>
>> this->Children->rbegin(); it != this->Children->rend(); ++it)
>> ^
>> Many thanks,
>>
>>
>> SPK
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at:
>> http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.paraview.org/mailman/listinfo/paraview
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
More information about the ParaView
mailing list