Zoltan2 definition of part_t = int causes problems with ETI when GO != int
Created by: kddevin
@trilinos/zoltan2 @trilinos/tpetra
Zoltan2 defines part_t (part numbers) to be int, consistent with MPI ranks.
For task mapping, we map MPI ranks to allocated cores; thus, all entities are labeled with part_t. For some operations, we use Tpetra::Map<part_t, part_t>, Tpetra::CrsMatrix<double, part_t, part_t>, etc.
When ETI is enabled and Tpetra_INST_INT_INT=OFF, the task mapping code will not link, as Tpetra doesn't instantiate Tpetra::Map<part_t, part_t>, Tpetra::Import<part_t, part_t>, etc.
Possible solutions are below; are there others?
- Always require LocalOrdinal=int and GlobalOrdinal=int in ETI when Zoltan2 is enabled. This solution would not be popular with the folks trying to reduce code size for Sierra. Sierra needs Zoltan2.
- Template Tpetra classes on lno_t and gno_t, even though part_t would be more natural and self-documenting; cast part_t data to gno_t or lno_t in the task mapping code whenever needed for Tpetra. This solution would be awkward and less descriptive in the code, as it is needed only to satisfy ETI. But it may be necessary.
- Change part_t to be GlobalOrdinal. This solves half the ETI problem, but it breaks backward compatibility, as Zoltan2's interface returns values of type part_t (e.g., PartitioningSolution.getPartListView()).
Other ideas, anyone? Meanwhile, I'll start looking at the 2nd idea.