Use the correct id in HierarchicalAugmenter.Initialize

Save global Id in DistributedContourTreeBlockData to use the correct Id for HierarchicalAugmenter.Initialize
This commit is contained in:
Oliver Ruebel 2021-05-28 01:36:16 -07:00 committed by Gunther H. Weber
parent a09c55b3ab
commit c87c7392db
2 changed files with 11 additions and 5 deletions

@ -776,6 +776,12 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute(
RegularDecomposer::coords_to_gid(diyCoords, diyDivisions); 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 // Record time to compute the local block ids
timingsStream << " " << std::setw(38) << std::left << "Compute Block Ids and Local Links" timingsStream << " " << std::setw(38) << std::left << "Compute Block Ids and Local Links"
<< ": " << timer.GetElapsedTime() << " seconds" << std::endl; << ": " << timer.GetElapsedTime() << " seconds" << std::endl;
@ -964,9 +970,8 @@ VTKM_CONT void ContourTreeUniformDistributed::DoPostExecute(
[](vtkm::worklet::contourtree_distributed::DistributedContourTreeBlockData<FieldType>* [](vtkm::worklet::contourtree_distributed::DistributedContourTreeBlockData<FieldType>*
blockData, blockData,
const vtkmdiy::Master::ProxyWithLink&) { 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->HierarchicalAugmenter.Initialize(
blockData->BlockIndex, &blockData->HierarchicalTree, &blockData->AugmentedTree); blockData->GlobalBlockId, &blockData->HierarchicalTree, &blockData->AugmentedTree);
}); });
timingsStream << " " << std::setw(38) << std::left << "Initalize Hierarchical Trees" timingsStream << " " << std::setw(38) << std::left << "Initalize Hierarchical Trees"

@ -85,7 +85,8 @@ struct DistributedContourTreeBlockData
} }
// Block metadata // Block metadata
vtkm::Id BlockIndex; 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 BlockOrigin; // Origin of the data block
vtkm::Id3 BlockSize; // Extends of the data block vtkm::Id3 BlockSize; // Extends of the data block