Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for mixed element unstructured meshes #1309

Merged
merged 21 commits into from
Jul 17, 2024

Conversation

cyrush
Copy link
Member

@cyrush cyrush commented Jun 3, 2024

No description provided.

@cyrush
Copy link
Member Author

cyrush commented Jun 10, 2024

@nicolemarsaglia
I think this is ready to do, can you take a close look at this to see it should be improved?

Added mixed element support for both for bp -> vtkm and vtkm -> bp. Added tests that exercise round trip by using a pipeline to extract a subset of each mixed mesh.

Copy link
Contributor

@nicolemarsaglia nicolemarsaglia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the todo checks you noted, I think it all looks great!

@FreddieWitherden
Copy link

Is the mixed element portion of this PR in a state where it is worth testing/integrating into our code?

@cyrush
Copy link
Member Author

cyrush commented Jul 11, 2024

@FreddieWitherden we are close with this. Aiming to get his merged next week.

There is a windows specific issue and we want to add some more error checking logic.

This will add support for mixed zoo element meshes, it will not yet support mixed elements that include polygons or polyhedra. (For example, you can use a mix of hexs, tets, and pyramids -- but not polyhedra)

We will work on polytopal support later.

@cyrush
Copy link
Member Author

cyrush commented Jul 15, 2024

Windows crashes due to an invalid memory access.

Had bad luck getting a full debug stack built on windows,so I created an asan clang build:

ASAN issue flagged:

[ RUN      ] ascent_pipeline.test_render_2d_mixed

coordsets: 
  coords: 
    type: "explicit"
    values: 
      x: [0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.5, 1.5, 2.5]
      y: [0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 3.0, 3.0, 3.0]
topologies: 
  topo: 
    type: "unstructured"
    coordset: "coords"
    elements: 
      shape: "mixed"
      shape_map: 
        tri: 5
        quad: 9
      shapes: [9, 9, 9, 5, 5, 5, 5, 5]
      sizes: [4, 4, 4, 3, 3, 3, 3, 3]
      offsets: [0, 4, 8, 12, 15, 18, 21, 24]
      connectivity: [0, 1, 5, 4, 1, 2, 6, 5, 2, 3, 7, 6, 4, 5, 8, 8, 5, 9, 5, 6, 9, 9, 6, 10, 6, 7, 10]
  pts: 
    type: "points"
    coordset: "coords"
fields: 
  ele_id: 
    topology: "topo"
    association: "element"
    values: [0, 1, 2, 3, 4, 5, 6, 7]
  pts_id: 
    topology: "pts"
    association: "element"
    values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

- 
  action: "add_scenes"
  scenes: 
    s1: 
      plots: 
        p3: 
          type: "mesh"
          topology: "topo"
        p1: 
          type: "pseudocolor"
          field: "ele_id"
        p2: 
          type: "pseudocolor"
          field: "pts_id"
          points: 
            radius: 0.15
      renders: 
        r1: 
          image_prefix: "/build/tests/_output/tout_render_2d_mixed"

DataSet:
  CoordSystems[1]
    coords
  CellSet 
   ExplicitCellSet:
   CellPointIds:
     Shapes: valueType=unsigned char storageType=vtkm::cont::StorageTagBasic 8 values occupying 8 bytes [9 9 9 ... 5 5 5]
     Connectivity: valueType=int storageType=vtkm::cont::StorageTagBasic 27 values occupying 108 bytes [0 1 5 ... 6 7 10]
     Offsets: valueType=int storageType=vtkm::cont::StorageTagBasic 8 values occupying 32 bytes [0 4 8 ... 18 21 24]
   PointCellIds:
     Not Allocated
  Fields[1]
   coords assoc= Points valueType=vtkm::Vec<double, 3> storageType=vtkm::cont::StorageTagSOA 11 values occupying 264 bytes [(0,0,0) (1,0,0) (2,0,0) ... (0.5,3,0) (1.5,3,0) (2.5,3,0)]
=================================================================
==69316==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xffffa1707f80 at pc 0xffffab2f2440 bp 0xffffc8a00bd0 sp 0xffffc8a00bc8
READ of size 4 at 0xffffa1707f80 thread T0
    #0 0xffffab2f243c in void vtkm::exec::serial::internal::TaskTiling1DExecute<vtkm::rendering::Triangulator::Triangulate const, vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::exec::ConnectivityExplicit<vtkm::internal::ArrayPortalBasicRead<unsigned char>, vtkm::internal::ArrayPortalBasicRead<int>, vtkm::internal::ArrayPortalBasicRead<int> >, vtkm::internal::ArrayPortalBasicRead<int>, vtkm::internal::ArrayPortalBasicWrite<vtkm::Vec<int, 4> >)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::ArrayPortalImplicit<vtkm::internal::IndexFunctor>, vtkm::internal::ArrayPortalImplicit<vtkm::cont::internal::ConstantFunctor<int> >, vtkm::internal::ArrayPortalImplicit<vtkm::internal::IndexFunctor>, vtkm::cont::DeviceAdapterTagSerial> const>(void*, void*, int, int) (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1c243c) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #1 0xffffaa63b8fc in vtkm::cont::DeviceAdapterAlgorithm<vtkm::cont::DeviceAdapterTagSerial>::ScheduleTask(vtkm::exec::serial::internal::TaskTiling1D&, int) (//install/vtk-m-v2.1.0/lib/libvtkm_cont-2.1.so.2.1+0x148b8fc) (BuildId: f63f64d4d25c10aa5bcee0d01b8544234f50cd21)
    #2 0xffffab2f12e8 in void vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase>::InvokeTransportParameters<vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType>, int, int&, int, vtkm::cont::DeviceAdapterTagSerial>(vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType>&, int const&, int&, int&&, vtkm::cont::DeviceAdapterTagSerial) const (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1c12e8) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #3 0xffffab2f0a40 in bool vtkm::cont::detail::TryExecuteIfValid<vtkm::cont::DeviceAdapterTagSerial, vtkm::worklet::internal::detail::DispatcherBaseTryExecuteFunctor, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const*, vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType>&, int&>(std::integral_constant<bool, true>, vtkm::cont::DeviceAdapterTagSerial, vtkm::worklet::internal::detail::DispatcherBaseTryExecuteFunctor&&, vtkm::cont::DeviceAdapterId, vtkm::cont::RuntimeDeviceTracker&, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const*&&, vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType>&, int&) (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1c0a40) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #4 0xffffab2f06ec in void vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase>::BasicInvoke<vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType> >(vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType, vtkm::internal::NullType>&, int) const (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1c06ec) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #5 0xffffab2efb20 in void vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase>::StartInvokeDynamic<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&>(std::integral_constant<bool, false>, vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&) const (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1bfb20) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #6 0xffffab2ef4c4 in auto void vtkm::cont::UnknownCellSet::CastAndCallForTypes<vtkm::List<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic> >, vtkm::worklet::internal::detail::convert_arg_wrapper<3ul, vtkm::cont::arg::TypeCheckTagCellSet>, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const&, vtkm::List<vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&>(vtkm::worklet::internal::detail::convert_arg_wrapper<3ul, vtkm::cont::arg::TypeCheckTagCellSet>&&, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const&, vtkm::List<vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut>&&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&) const::'lambda'(auto)::operator()<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic> >(auto) const (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1bf4c4) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #7 0xffffab2ef0a4 in void vtkm::ListForEach<void vtkm::cont::UnknownCellSet::CastAndCallForTypes<vtkm::List<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic> >, vtkm::worklet::internal::detail::convert_arg_wrapper<3ul, vtkm::cont::arg::TypeCheckTagCellSet>, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const&, vtkm::List<vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&>(vtkm::worklet::internal::detail::convert_arg_wrapper<3ul, vtkm::cont::arg::TypeCheckTagCellSet>&&, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const&, vtkm::List<vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut>&&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&) const::'lambda'(auto), vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic> >(auto&&, vtkm::List<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic> >, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const&, vtkm::List<vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut>&&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&) (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1bf0a4) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #8 0xffffab2eed38 in void vtkm::cont::UnknownCellSet::CastAndCallForTypes<vtkm::List<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic> >, vtkm::worklet::internal::detail::convert_arg_wrapper<3ul, vtkm::cont::arg::TypeCheckTagCellSet>, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const&, vtkm::List<vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut>, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&>(vtkm::worklet::internal::detail::convert_arg_wrapper<3ul, vtkm::cont::arg::TypeCheckTagCellSet>&&, vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase> const&, vtkm::List<vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut>&&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&) const (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1bed38) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #9 0xffffab2e2af0 in void vtkm::worklet::internal::DispatcherBase<vtkm::worklet::DispatcherMapTopology<vtkm::rendering::Triangulator::Triangulate>, vtkm::rendering::Triangulator::Triangulate, vtkm::worklet::detail::WorkletMapTopologyBase>::Invoke<vtkm::cont::UncertainCellSet<vtkm::List<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic> > >&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&>(vtkm::cont::UncertainCellSet<vtkm::List<vtkm::cont::CellSetExplicit<vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic, vtkm::cont::StorageTagBasic>, vtkm::cont::CellSetSingleType<vtkm::cont::StorageTagBasic> > >&, vtkm::cont::ArrayHandle<int, vtkm::cont::StorageTagBasic>&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&) const (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1b2af0) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #10 0xffffab2e1ae0 in vtkm::rendering::Triangulator::Run(vtkm::cont::UnknownCellSet const&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&, int&) (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1b1ae0) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #11 0xffffab2e1194 in vtkm::rendering::internal::RunTriangulator(vtkm::cont::UnknownCellSet const&, vtkm::cont::ArrayHandle<vtkm::Vec<int, 4>, vtkm::cont::StorageTagBasic>&, int&) (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1b1194) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #12 0xffffab1c5670 in vtkm::rendering::raytracing::TriangleExtractor::ExtractCells(vtkm::cont::UnknownCellSet const&) (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x95670) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #13 0xffffab24c37c in vtkm::rendering::MapperRayTracer::RenderCells(vtkm::cont::UnknownCellSet const&, vtkm::cont::CoordinateSystem const&, vtkm::cont::Field const&, vtkm::cont::ColorTable const&, vtkm::rendering::Camera const&, vtkm::Range const&) (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x11c37c) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e)
    #14 0xffffafa9dca0 in vtkh::Renderer::DoExecute() (/build/lib/libvtkh_rendering.so+0x4dca0) (BuildId: 109c3207e53cd6b5039bac4f6862a1113507fe14)
    #15 0xffffafa9d58c in vtkh::Renderer::Update() (/build/lib/libvtkh_rendering.so+0x4d58c) (BuildId: 109c3207e53cd6b5039bac4f6862a1113507fe14)
    #16 0xffffafaa8cd8 in vtkh::Scene::Render() (/build/lib/libvtkh_rendering.so+0x58cd8) (BuildId: 109c3207e53cd6b5039bac4f6862a1113507fe14)
    #17 0xffffb065a8e4 in ascent::runtime::filters::detail::AscentScene::Execute(std::vector<vtkh::Render, std::allocator<vtkh::Render> >&) (/build/lib/libascent.so+0x88a8e4) (BuildId: 68be57dd2ddfb7be4261d842a62e2e3fa809c726)
    #18 0xffffb0658394 in ascent::runtime::filters::ExecScene::execute() (/build/lib/libascent.so+0x888394) (BuildId: 68be57dd2ddfb7be4261d842a62e2e3fa809c726)
    #19 0xffffafc47b5c in flow::Workspace::execute() (/build/lib/libascent_flow.so+0x37b5c) (BuildId: 358c17b50b3a2d5d9b45b9d0fdc42fb397ad8512)
    #20 0xffffb0017c4c in ascent::AscentRuntime::Execute(conduit::Node const&) (/build/lib/libascent.so+0x247c4c) (BuildId: 68be57dd2ddfb7be4261d842a62e2e3fa809c726)
    #21 0xffffaffd5220 in ascent::Ascent::execute(conduit::Node const&) (/build/lib/libascent.so+0x205220) (BuildId: 68be57dd2ddfb7be4261d842a62e2e3fa809c726)
    #22 0xaaaaea7b7ea8 in ascent_pipeline_test_render_2d_mixed_Test::TestBody() (/build/tests/ascent/t_ascent_render_2d_mixed+0xe7ea8) (BuildId: 5405244016b9c56e0c7251f5d23cb30a54b7ea3b)
    #23 0xffffafd52778 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/build/lib/libgtest.so.1.13.0+0xd2778) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #24 0xffffafd03880 in testing::Test::Run() (/build/lib/libgtest.so.1.13.0+0x83880) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #25 0xffffafd0644c in testing::TestInfo::Run() (/build/lib/libgtest.so.1.13.0+0x8644c) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #26 0xffffafd07ea8 in testing::TestSuite::Run() (/build/lib/libgtest.so.1.13.0+0x87ea8) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #27 0xffffafd387d8 in testing::internal::UnitTestImpl::RunAllTests() (/build/lib/libgtest.so.1.13.0+0xb87d8) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #28 0xffffafd54a24 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/build/lib/libgtest.so.1.13.0+0xd4a24) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #29 0xffffafd37d58 in testing::UnitTest::Run() (/build/lib/libgtest.so.1.13.0+0xb7d58) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #30 0xffffafdb0e94 in main (/build/lib/libgtest_main.so.1.13.0+0xe94) (BuildId: 2a8d786e1358de1db122dfb895ac91680748dbed)
    #31 0xffffa41173f8  (/lib/aarch64-linux-gnu/libc.so.6+0x273f8) (BuildId: aa6e122fa39ae02d412afb49d75e33281fcd2805)
    #32 0xffffa41174c8 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x274c8) (BuildId: aa6e122fa39ae02d412afb49d75e33281fcd2805)
    #33 0xaaaaea70146c in _start (/build/tests/ascent/t_ascent_render_2d_mixed+0x3146c) (BuildId: 5405244016b9c56e0c7251f5d23cb30a54b7ea3b)

0xffffa1707f80 is located 0 bytes to the right of 32-byte region [0xffffa1707f60,0xffffa1707f80)
allocated by thread T0 here:
    #0 0xaaaaea7787fc in __interceptor_calloc (/build/tests/ascent/t_ascent_render_2d_mixed+0xa87fc) (BuildId: 5405244016b9c56e0c7251f5d23cb30a54b7ea3b)
    #1 0xffffa5f61518 in conduit::utils::conduit_allocate(unsigned long, unsigned long, long) (//install/conduit-v0.9.1/lib/libconduit.so+0x2b1518) (BuildId: eea794d4b3d688a435c5eb64e6da836841611c73)
    #2 0xffffa5e722c8 in conduit::Node::init(conduit::DataType const&) (//install/conduit-v0.9.1/lib/libconduit.so+0x1c22c8) (BuildId: eea794d4b3d688a435c5eb64e6da836841611c73)
    #3 0xffffa5e79854 in conduit::Node::set_int32_initializer_list(std::initializer_list<int> const&) (//install/conduit-v0.9.1/lib/libconduit.so+0x1c9854) (BuildId: eea794d4b3d688a435c5eb64e6da836841611c73)
    #4 0xffffa5e917b8 in conduit::Node::operator=(std::initializer_list<int> const&) (//install/conduit-v0.9.1/lib/libconduit.so+0x1e17b8) (BuildId: eea794d4b3d688a435c5eb64e6da836841611c73)
    #5 0xaaaaea7b4ff4 in gen_example_2d_mixed_mesh(conduit::Node&) (/build/tests/ascent/t_ascent_render_2d_mixed+0xe4ff4) (BuildId: 5405244016b9c56e0c7251f5d23cb30a54b7ea3b)
    #6 0xaaaaea7b7314 in ascent_pipeline_test_render_2d_mixed_Test::TestBody() (/build/tests/ascent/t_ascent_render_2d_mixed+0xe7314) (BuildId: 5405244016b9c56e0c7251f5d23cb30a54b7ea3b)
    #7 0xffffafd52778 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (/build/lib/libgtest.so.1.13.0+0xd2778) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #8 0xffffafd03880 in testing::Test::Run() (/build/lib/libgtest.so.1.13.0+0x83880) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #9 0xffffafd0644c in testing::TestInfo::Run() (/build/lib/libgtest.so.1.13.0+0x8644c) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #10 0xffffafd07ea8 in testing::TestSuite::Run() (/build/lib/libgtest.so.1.13.0+0x87ea8) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #11 0xffffafd387d8 in testing::internal::UnitTestImpl::RunAllTests() (/build/lib/libgtest.so.1.13.0+0xb87d8) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #12 0xffffafd54a24 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (/build/lib/libgtest.so.1.13.0+0xd4a24) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #13 0xffffafd37d58 in testing::UnitTest::Run() (/build/lib/libgtest.so.1.13.0+0xb7d58) (BuildId: 26734e241bd7aa9c0fe26547c099e213afd2e51e)
    #14 0xffffafdb0e94 in main (/build/lib/libgtest_main.so.1.13.0+0xe94) (BuildId: 2a8d786e1358de1db122dfb895ac91680748dbed)
    #15 0xffffa41173f8  (/lib/aarch64-linux-gnu/libc.so.6+0x273f8) (BuildId: aa6e122fa39ae02d412afb49d75e33281fcd2805)
    #16 0xffffa41174c8 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x274c8) (BuildId: aa6e122fa39ae02d412afb49d75e33281fcd2805)
    #17 0xaaaaea70146c in _start (/build/tests/ascent/t_ascent_render_2d_mixed+0x3146c) (BuildId: 5405244016b9c56e0c7251f5d23cb30a54b7ea3b)

SUMMARY: AddressSanitizer: heap-buffer-overflow (//install/vtk-m-v2.1.0/lib/libvtkm_rendering-2.1.so.2.1+0x1c243c) (BuildId: 1462ff97a047788a16bf4374ebd2dbb53ec6ed6e) in void vtkm::exec::serial::internal::TaskTiling1DExecute<vtkm::rendering::Triangulator::Triangulate const, vtkm::internal::Invocation<vtkm::internal::FunctionInterface<void (vtkm::exec::ConnectivityExplicit<vtkm::internal::ArrayPortalBasicRead<unsigned char>, vtkm::internal::ArrayPortalBasicRead<int>, vtkm::internal::ArrayPortalBasicRead<int> >, vtkm::internal::ArrayPortalBasicRead<int>, vtkm::internal::ArrayPortalBasicWrite<vtkm::Vec<int, 4> >)>, vtkm::internal::FunctionInterface<void (vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellSetIn, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::FieldInVisit, vtkm::worklet::internal::WorkletBase::WholeArrayOut)>, vtkm::internal::FunctionInterface<void (vtkm::placeholders::Arg<2>, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::CellShape, vtkm::worklet::WorkletMapTopology<vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint>::IncidentElementIndices, vtkm::exec::arg::WorkIndex, vtkm::placeholders::Arg<3>)>, 1, vtkm::internal::ArrayPortalImplicit<vtkm::internal::IndexFunctor>, vtkm::internal::ArrayPortalImplicit<vtkm::cont::internal::ConstantFunctor<int> >, vtkm::internal::ArrayPortalImplicit<vtkm::internal::IndexFunctor>, vtkm::cont::DeviceAdapterTagSerial> const>(void*, void*, int, int)
Shadow bytes around the buggy address:
  0x200ff42e0fa0: 00 00 fa fa 00 00 00 00 fa fa 00 00 00 00 fa fa
  0x200ff42e0fb0: fd fd fd fa fa fa fd fd fd fa fa fa fd fd fd fd
  0x200ff42e0fc0: fa fa fd fd fd fd fa fa fd fd fd fd fa fa 00 00
  0x200ff42e0fd0: 00 00 fa fa 00 00 00 00 fa fa fd fd fd fa fa fa
  0x200ff42e0fe0: fd fd fd fa fa fa fd fd fd fd fa fa 00 00 00 00
=>0x200ff42e0ff0:[fa]fa fd fd fd fa fa fa fd fd fd fa fa fa fd fd
  0x200ff42e1000: fd fa fa fa fd fd fd fd fa fa fd fd fd fd fa fa
  0x200ff42e1010: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fa
  0x200ff42e1020: fa fa fd fd fd fa fa fa fd fd fd fd fa fa fd fd
  0x200ff42e1030: fd fd fa fa fd fd fd fd fa fa fd fd fd fd fa fa
  0x200ff42e1040: fd fd fd fd fa fa fd fd fd fd fa fa fd fd fd fd
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
==69316==ABORTING

@cyrush
Copy link
Member Author

cyrush commented Jul 15, 2024

vtk-m offsets expects an extra offsets entry that points to the end of the connectivity array.

@cyrush
Copy link
Member Author

cyrush commented Jul 16, 2024

found the source of the windows testing woes: LLNL/conduit#1297

adjusted the mixed tests to avoid the bug

@cyrush
Copy link
Member Author

cyrush commented Jul 17, 2024

resolved outstanding issue, merging.

@cyrush cyrush merged commit abb6ecd into develop Jul 17, 2024
21 checks passed
@cyrush cyrush deleted the task/2025_05_mixed_ele_umeshs branch July 17, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants