diff --git a/vtkm/filter/ContourTreeUniformDistributed.hxx b/vtkm/filter/ContourTreeUniformDistributed.hxx index cc51da52d..eb45435b4 100644 --- a/vtkm/filter/ContourTreeUniformDistributed.hxx +++ b/vtkm/filter/ContourTreeUniformDistributed.hxx @@ -776,6 +776,12 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute( RegularDecomposer::coords_to_gid(diyCoords, diyDivisions); } + // copy global block ids into the local data blocks so we can use them in the hierarchical augmentation + for (vtkm::Id bi = 0; bi < input.GetNumberOfPartitions(); bi++) + { + localDataBlocks[bi]->GlobalBlockId = vtkmdiyLocalBlockGids[bi]; + } + // Record time to compute the local block ids timingsStream << " " << std::setw(38) << std::left << "Compute Block Ids and Local Links" << ": " << timer.GetElapsedTime() << " seconds" << std::endl; @@ -964,9 +970,8 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute( [](vtkm::worklet::contourtree_distributed::DistributedContourTreeBlockData* blockData, const vtkmdiy::Master::ProxyWithLink&) { - // TODO/FIXME: Is BlockIndex really global block index or just local; this should use global block index blockData->HierarchicalAugmenter.Initialize( - blockData->BlockIndex, &blockData->HierarchicalTree, &blockData->AugmentedTree); + blockData->GlobalBlockId, &blockData->HierarchicalTree, &blockData->AugmentedTree); }); timingsStream << " " << std::setw(38) << std::left << "Initalize Hierarchical Trees" diff --git a/vtkm/worklet/contourtree_distributed/DistributedContourTreeBlockData.h b/vtkm/worklet/contourtree_distributed/DistributedContourTreeBlockData.h index c8d555569..857be093d 100644 --- a/vtkm/worklet/contourtree_distributed/DistributedContourTreeBlockData.h +++ b/vtkm/worklet/contourtree_distributed/DistributedContourTreeBlockData.h @@ -85,9 +85,10 @@ struct DistributedContourTreeBlockData } // Block metadata - vtkm::Id BlockIndex; - vtkm::Id3 BlockOrigin; // Origin of the data block - vtkm::Id3 BlockSize; // Extends of the data block + vtkm::Id GlobalBlockId; // Global DIY id of this block + vtkm::Id BlockIndex; // Local block id on this rank + vtkm::Id3 BlockOrigin; // Origin of the data block + vtkm::Id3 BlockSize; // Extends of the data block // Fan in data std::vector ContourTrees;