[vtkusers] Error compiling vtkInfovisParallel / vtkPBGLBreadtFirstSearch.cxx (VTK 6.1.0)
Martijn Steenwijk
martijnsteenwijk at gmail.com
Mon Jun 16 10:37:52 EDT 2014
Hi Jeff,
It does run, but does not give proper output. I tried to figure out what's
going wrong. The filter returns 8 vertices and 11 edges, however the points
have values
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
-1.#IND -1.#IND -1.#IND
I've the feeling th at it already goes wrong at the import of the points;
i.e.
vtkVector3f *nodes = reinterpret_cast<vtkVector3f*>(
vtkFloatArray::SafeDownCast(g->GetPoints()->GetData())->GetPointer(0));
std::cout << nodes[0][0] << std::cendl;
gives already -1.#IND
Best,
Martijn
On Mon, Jun 16, 2014 at 1:32 PM, Jeff Baumes <jeff.baumes at kitware.com>
wrote:
> Looks to me like you caught a bug. This does indeed sometimes go off the
> end of the array, but the potential junk data it gets is always multiplied
> with an alpha value of 0, so the algorithm still functions properly. It
> seems this code may not currently be tested in an environment with runtime
> bounds-checking exceptions. Modifiying the loop with an additional check
> may resolve the problem (though on my Mac I am not getting the runtime
> error even though it was going past the end of the array):
>
> for (vtkIdType e = 0; e < numEdges; ++e)
> {
> for (int m = 0; m < newMeshCount; ++m)
> {
> float indexFloat = (this->MeshCount - 1.0f)*m/(newMeshCount - 1.0f);
> int index = static_cast<int>(indexFloat);
> float alpha = indexFloat - index;
> vtkVector3f before = this->EdgeMesh[e][index];
> if (alpha > 0)
> {
> vtkVector3f after = this->EdgeMesh[e][index+1];
> newEdgeMesh[e][m] = before + alpha*(after - before);
> }
> else
> {
> newEdgeMesh[e][m] = before;
> }
> }
> }
>
> Let me know if this works for you and we can get a fix into VTK.
>
> Jeff
>
>
> On Mon, Jun 16, 2014 at 6:00 AM, Martijn Steenwijk <
> martijnsteenwijk at gmail.com> wrote:
>
>> To add on that. It seems that LayoutEdgePoints() is in its first
>> iteration (so i is 0 at line 530) - this is right after
>> initializeedgemesh().
>>
>> Best,
>> Martijn
>>
>>
>> On Mon, Jun 16, 2014 at 11:52 AM, Martijn Steenwijk <
>> martijnsteenwijk at gmail.com> wrote:
>>
>>>
>>> Hi Jeff,
>>>
>>> You're right. At first glance I thought that too, but then got a linker
>>> error message which was (after second reading) not related to VTK. Sorry, I
>>> should have looked better.
>>>
>>> Now it does compile, but I'm getting another error on calling Update()
>>> of vtkBoostDividedEdgeBundling: I use the same graph as in the
>>> TestBoostDividedEdgeBundling:
>>>
>>> graph->AddVertex();
>>> points->InsertNextPoint(20, 40, 0);
>>> graph->AddVertex();
>>> points->InsertNextPoint(20, 80, 0);
>>> graph->AddVertex();
>>> points->InsertNextPoint(20, 120, 0);
>>> graph->AddVertex();
>>> points->InsertNextPoint(20, 160, 0);
>>> graph->AddVertex();
>>> points->InsertNextPoint(380, 40, 0);
>>> graph->AddVertex();
>>> points->InsertNextPoint(380, 80, 0);
>>> graph->AddVertex();
>>> points->InsertNextPoint(380, 120, 0);
>>> graph->AddVertex();
>>> points->InsertNextPoint(380, 160, 0);
>>> graph->SetPoints(points.GetPointer());
>>>
>>> graph->AddEdge(0, 4);
>>> graph->AddEdge(0, 5);
>>> graph->AddEdge(1, 4);
>>> graph->AddEdge(1, 5);
>>> graph->AddEdge(2, 6);
>>> graph->AddEdge(2, 7);
>>> graph->AddEdge(3, 6);
>>> graph->AddEdge(3, 7);
>>>
>>> graph->AddEdge(4, 0);
>>> graph->AddEdge(5, 0);
>>> graph->AddEdge(6, 0);
>>>
>>> Then a "vector subscript out of range" is thrown at line 368 of
>>> vtkBoostDividedEdgeBundling.cxx (see image):
>>> [image: Inline image 2]
>>>
>>> it tries to get this->EdgeMesh[e][index+1] where e=0 and index=1 (so
>>> element [0][2] is requested), but this->EdgeMesh[e] has length 2.
>>>
>>> Any thoughts how this can be solved?
>>>
>>> Best,
>>> Martijn
>>>
>>>
>>>
>>>
>>> On Mon, Jun 16, 2014 at 3:49 AM, Jeff Baumes <jeff.baumes at kitware.com>
>>> wrote:
>>>
>>>> You should not need to turn on the vtkInfovisParallel module to compile
>>>> vtkBoostDividedEdgeBundling. You should be able to just turn
>>>> vtkInfovisBoostGraphAlgorithms on.
>>>>
>>>> Jeff
>>>>
>>>>
>>>> On Sat, Jun 14, 2014 at 4:38 AM, Martijn Steenwijk <
>>>> martijnsteenwijk at gmail.com> wrote:
>>>>
>>>>> Hi David,
>>>>>
>>>>> Thanks for your response. I'm building this module because I would
>>>>> like to use vtkBoostDevidedEdgeBundling which seems to rely on this module
>>>>> (i.e. If I do not compile the module I get a linker error). Or am I doing
>>>>> something wrong?
>>>>>
>>>>> Is there any quick fix for this?
>>>>>
>>>>> Thanks for your response,
>>>>> Martijn
>>>>>
>>>>> Verstuurd vanaf mijn iPhone
>>>>>
>>>>> Op 14 jun. 2014 om 00:55 heeft David E DeMarle <
>>>>> dave.demarle at kitware.com> het volgende geschreven:
>>>>>
>>>>> I had that compiling with boost 1.48 on one of the dashboard machines
>>>>> a while back.
>>>>>
>>>>> The module itself hasn't been maintained in a long while and thus I
>>>>> marked it as deprecated in master a few months back. If there is interest
>>>>> in it from the community and someone brings it up to date with current
>>>>> boost and supply tests for the module, I can undeprecate it before 6.2.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> David E DeMarle
>>>>> Kitware, Inc.
>>>>> R&D Engineer
>>>>> 21 Corporate Drive
>>>>> Clifton Park, NY 12065-8662
>>>>> Phone: 518-881-4909
>>>>>
>>>>>
>>>>> On Fri, Jun 13, 2014 at 5:51 PM, Martijn Steenwijk <
>>>>> martijnsteenwijk at gmail.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I'm trying to compile VTK 6.1.0 on Windows (MSVC 2010) with Boost
>>>>>> 1.55.0 and openmpi 1.6.2. I'm getting an error while compiling
>>>>>> vtkInfovisParallel / vtkPBGLBreadtFirstSearch.cxx. as listed below. It
>>>>>> seems that Boost misses some properties. Could this be related to the Boost
>>>>>> version (if so, what could be used best?)
>>>>>>
>>>>>> Any help would be appreciated.
>>>>>>
>>>>>> Best,
>>>>>> Martijn
>>>>>>
>>>>>> D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111):
>>>>>> error C2039: 'ref' : is not a member of
>>>>>> 'boost::detail::error_property_not_found'
>>>>>> 94>
>>>>>> D:\libs\boost_1_55_0\boost/pending/detail/property.hpp(16) : see
>>>>>> declaration of 'boost::detail::error_property_not_found'
>>>>>> 94>
>>>>>> ..\..\..\Infovis\Parallel\vtkPBGLBreadthFirstSearch.cxx(365) : see
>>>>>> reference to function template instantiation 'void
>>>>>> boost::detail::parallel_bfs_helper<vtkDirectedGraph*,DistributedColorMap,pbgl_bfs_distance_recorder<DistanceMap>,boost::detail::error_property_not_found,boost::vtkGraphIndexMap>(DistributedGraph
>>>>>> &,boost::graph_traits<vtkGraph*>::vertex_descriptor,ColorMap,BFSVisitor,BufferRef,VertexIndexMap)'
>>>>>> being compiled
>>>>>> 94> with
>>>>>> 94> [
>>>>>> 94> DistanceMap=DistributedDistanceMap,
>>>>>> 94> DistributedGraph=vtkDirectedGraph *,
>>>>>> 94> ColorMap=DistributedColorMap,
>>>>>> 94>
>>>>>> BFSVisitor=pbgl_bfs_distance_recorder<DistributedDistanceMap>,
>>>>>> 94> BufferRef=boost::detail::error_property_not_found,
>>>>>> 94> VertexIndexMap=boost::vtkGraphIndexMap
>>>>>> 94> ]
>>>>>> 94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111):
>>>>>> error C2780: 'void boost::breadth_first_search(const VertexListGraph
>>>>>> &,graph_traits<G>::vertex_descriptor,const
>>>>>> boost::bgl_named_params<T,Tag,Base> &)' : expects 3 arguments - 5 provided
>>>>>> 94>
>>>>>> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(334) : see
>>>>>> declaration of 'boost::breadth_first_search'
>>>>>> 94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111):
>>>>>> error C2780: 'void boost::breadth_first_search(const VertexListGraph
>>>>>> &,SourceIterator,SourceIterator,Buffer &,BFSVisitor,ColorMap)' : expects 6
>>>>>> arguments - 5 provided
>>>>>> 94>
>>>>>> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(112) : see
>>>>>> declaration of 'boost::breadth_first_search'
>>>>>> 94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111):
>>>>>> error C2039: 'ref' : is not a member of
>>>>>> 'boost::detail::error_property_not_found'
>>>>>> 94>
>>>>>> D:\libs\boost_1_55_0\boost/pending/detail/property.hpp(16) : see
>>>>>> declaration of 'boost::detail::error_property_not_found'
>>>>>> 94>
>>>>>> ..\..\..\Infovis\Parallel\vtkPBGLBreadthFirstSearch.cxx(373) : see
>>>>>> reference to function template instantiation 'void
>>>>>> boost::detail::parallel_bfs_helper<vtkUndirectedGraph*,DistributedColorMap,pbgl_bfs_distance_recorder<DistanceMap>,boost::detail::error_property_not_found,boost::vtkGraphIndexMap>(DistributedGraph
>>>>>> &,boost::graph_traits<vtkGraph*>::vertex_descriptor,ColorMap,BFSVisitor,BufferRef,VertexIndexMap)'
>>>>>> being compiled
>>>>>> 94> with
>>>>>> 94> [
>>>>>> 94> DistanceMap=DistributedDistanceMap,
>>>>>> 94> DistributedGraph=vtkUndirectedGraph *,
>>>>>> 94> ColorMap=DistributedColorMap,
>>>>>> 94>
>>>>>> BFSVisitor=pbgl_bfs_distance_recorder<DistributedDistanceMap>,
>>>>>> 94> BufferRef=boost::detail::error_property_not_found,
>>>>>> 94> VertexIndexMap=boost::vtkGraphIndexMap
>>>>>> 94> ]
>>>>>> 94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111):
>>>>>> error C2780: 'void boost::breadth_first_search(const VertexListGraph
>>>>>> &,graph_traits<G>::vertex_descriptor,const
>>>>>> boost::bgl_named_params<T,Tag,Base> &)' : expects 3 arguments - 5 provided
>>>>>> 94>
>>>>>> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(334) : see
>>>>>> declaration of 'boost::breadth_first_search'
>>>>>> 94>D:\libs\boost_1_55_0\boost/graph/distributed/breadth_first_search.hpp(111):
>>>>>> error C2780: 'void boost::breadth_first_search(const VertexListGraph
>>>>>> &,SourceIterator,SourceIterator,Buffer &,BFSVisitor,ColorMap)' : expects 6
>>>>>> arguments - 5 provided
>>>>>> 94>
>>>>>> D:\libs\boost_1_55_0\boost/graph/breadth_first_search.hpp(112) : see
>>>>>> declaration of 'boost::breadth_first_search'
>>>>>> 108>------ Build started: Project: ALL_BUILD, Configuration: Debug
>>>>>> Win32 ------
>>>>>> 108> Build all projects
>>>>>> ========== Build: 105 succeeded, 3 failed, 24 up-to-date, 0 skipped
>>>>>> ==========
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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 VTK FAQ at:
>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>>
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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 VTK FAQ at:
>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140616/65d395e2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 157129 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140616/65d395e2/attachment-0001.png>
More information about the vtkusers
mailing list