Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8a40d78
Squashed all development commits into one.
eve-le-guillou Jul 22, 2025
01981e1
Delete round of communication log
eve-le-guillou Jul 22, 2025
529fcab
[DDMS] global order preconditioning by default
julien-tierny Aug 22, 2025
23af77d
[ddms] bencmarking message updates
julien-tierny Aug 22, 2025
d4a4336
[ddms] gui shuffling
julien-tierny Aug 23, 2025
8624fcd
[ddms] fixed advanced cmake option
julien-tierny Aug 23, 2025
20265e5
[ddms] updated pv online doc
julien-tierny Aug 23, 2025
ef4366b
Move getSimplexRank
eve-le-guillou Aug 25, 2025
420f0a7
[ddms] fixed typo (ftm)
julien-tierny Aug 28, 2025
e72929d
[ddms] defaulting to at least 2 threads
julien-tierny Sep 3, 2025
9cc1c31
[ddms] timing typo
julien-tierny Sep 3, 2025
c76ebb3
[ddms] clang-format default threads
julien-tierny Sep 3, 2025
ca2b231
[ddms] translating comments
julien-tierny Sep 3, 2025
43d9aa2
[ddms] translating comments
julien-tierny Sep 3, 2025
a840b24
Merge branch 'dev' of https://github.com/topology-tool-kit/ttk into m…
julien-tierny Sep 4, 2025
718bc6b
Remove prints and add constant for overflow
eve-le-guillou Sep 4, 2025
c54e1fa
[ddms] fixed error message
julien-tierny Sep 4, 2025
77b8f20
[ddms] edited online doc
julien-tierny Sep 5, 2025
f89d980
[ddms] clang-formatting online doc
julien-tierny Sep 5, 2025
b6a4408
[ddms] clang-formatting online doc (bis)
julien-tierny Sep 5, 2025
6761588
[ddms] clang-formatting online doc (ter)
julien-tierny Sep 5, 2025
49c2931
[ddms] trying to make the example work in the ci
julien-tierny Sep 5, 2025
5d0c2ed
[ddms] removing DDMS example from macos ci
julien-tierny Sep 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
rm python/nestedTrackingFromOverlap.py
# remove examples which fill up the memory
rm python/topologicalOptimization_darkSky.py
python3 -u python/run.py
pvpython -u python/run.py

- name: Test ttk-data Python scripts results [NOT ENFORCED]
continue-on-error: true
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
rm python/mpiExample.py
# remove examples which fill up the memory
rm python/topologicalOptimization_darkSky.py
python3 -u python/run.py
pvpython -u python/run.py

- name: Test ttk-data Python scripts results [NOT ENFORCED]
if: matrix.testSet == 'pyTests'
Expand Down Expand Up @@ -398,6 +398,7 @@ jobs:
rm python/nestedTrackingFromOverlap.py
# tmp removal of mpi example
rm python/mpiExample.py
rm python/distributedPersistenceDiagram.py
# remove examples which fill up the memory
rm python/topologicalOptimization_darkSky.py
# remove sklearn examples -- buggy on MacOS since sklearn-1.7
Expand Down
2 changes: 1 addition & 1 deletion CMake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (TTK_ENABLE_MPI)
option(TTK_ENABLE_MPI_TIME "Enable time measuring for MPI computation" FALSE)
mark_as_advanced(TTK_ENABLE_MPI_TIME)
option(TTK_ENABLE_MPI_RANK_ID_INT "Enable rank ids of type int (default char) for distributed sort" FALSE)
mark_as_advanced(TTK_ENABLE_MPI_RANK_ID_TIME)
mark_as_advanced(TTK_ENABLE_MPI_RANK_ID_INT)

endif()

Expand Down
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## TTK - ChangeLog
=
### dev
- Distributed computation of persistent homology!
- New backend for TrackingFromFields (critical point based)
- Fast planar Rips filtration persistence computation

### 1.3.0
- Wasserstein Auto-Encoders of Merge Trees / Pers. Diagrams (IEEE TVCG 2024)
Expand Down
97 changes: 96 additions & 1 deletion core/base/abstractTriangulation/AbstractTriangulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -2828,6 +2828,23 @@ namespace ttk {
return -1;
}

inline ttk::SimplexId getSimplexLocalId(const SimplexId gsid,
const int type) const {
if(!ttk::isRunningWithMPI()) {
return gsid;
}
switch(type) {
case 0:
return this->getVertexLocalId(gsid);
case 1:
return this->getEdgeLocalId(gsid);
case 2:
return this->getTriangleLocalId(gsid);
default:
return this->getCellLocalId(gsid);
}
}

virtual inline int getVertexRank(const SimplexId lvid) const {

if(!ttk::isRunningWithMPI()) {
Expand All @@ -2852,6 +2869,54 @@ namespace ttk {
return this->getVertexRankInternal(lvid);
}

virtual inline int getEdgeRank(const SimplexId lvid) const {

if(!ttk::isRunningWithMPI()) {
return 0;
}
#ifndef TTK_ENABLE_KAMIKAZE
if(this->getDimensionality() != 1 && this->getDimensionality() != 2
&& this->getDimensionality() != 3) {
this->printErr("Only 1D, 2D and 3D datasets are supported");
return -1;
}
if(!this->hasPreconditionedDistributedEdges_) {
this->printErr("EdgeRankId query without pre-process!");
this->printErr(
"Please call preconditionDistributedEdges() in a pre-process.");
return -1;
}
if(lvid < 0 || lvid >= this->getNumberOfEdges()) {
return -1;
}
#endif // TTK_ENABLE_KAMIKAZE
return this->getEdgeRankInternal(lvid);
}

virtual inline int getTriangleRank(const SimplexId lvid) const {

if(!ttk::isRunningWithMPI()) {
return 0;
}
#ifndef TTK_ENABLE_KAMIKAZE
if(this->getDimensionality() != 1 && this->getDimensionality() != 2
&& this->getDimensionality() != 3) {
this->printErr("Only 1D, 2D and 3D datasets are supported");
return -1;
}
if(!this->hasPreconditionedDistributedTriangles_) {
this->printErr("TriangleRankId query without pre-process!");
this->printErr(
"Please call preconditionDistributedTriangles() in a pre-process.");
return -1;
}
if(lvid < 0 || lvid >= this->getNumberOfTriangles()) {
return -1;
}
#endif // TTK_ENABLE_KAMIKAZE
return this->getTriangleRankInternal(lvid);
}

virtual inline int getCellRank(const SimplexId lcid) const {
#ifndef TTK_ENABLE_KAMIKAZE
if(this->getDimensionality() != 1 && this->getDimensionality() != 2
Expand All @@ -2870,11 +2935,31 @@ namespace ttk {
}
#endif // TTK_ENABLE_KAMIKAZE
if(!ttk::isRunningWithMPI()) {
return lcid;
return ttk::MPIrank_;
}
return this->getCellRankInternal(lcid);
}

inline int getSimplexRank(const SimplexId lsid, const int type) const {
if(!ttk::isRunningWithMPI()) {
return ttk::MPIrank_;
}
switch(type) {
case 0:
return this->getVertexRank(lsid);
case 1:
return this->getEdgeRank(lsid);
case 2: {
if(getDimensionality() == 3)
return this->getTriangleRank(lsid);
return this->getCellRank(lsid);
}
case 3:
return this->getCellRank(lsid);
}
return -1;
}

virtual inline const std::vector<int> &getNeighborRanks() const {
return this->neighborRanks_;
}
Expand Down Expand Up @@ -3046,6 +3131,16 @@ namespace ttk {
return -1;
}

virtual inline int
getEdgeRankInternal(const SimplexId ttkNotUsed(lvid)) const {
return -1;
}

virtual inline int
getTriangleRankInternal(const SimplexId ttkNotUsed(lvid)) const {
return -1;
}

virtual inline int
getCellRankInternal(const SimplexId ttkNotUsed(lcid)) const {
return -1;
Expand Down
9 changes: 5 additions & 4 deletions core/base/arrayPreconditioning/ArrayPreconditioning.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@ namespace ttk {

ttk::SimplexId verticesToSortSize = verticesToSort.size();
// Compute the order of the first element of the current process
ttk::SimplexId orderOffset
= std::accumulate(vertexDistribution.begin(),
vertexDistribution.begin() + ttk::MPIrank_, 0);
ttk::SimplexId orderOffset{0};
for(int i = 0; i < ttk::MPIrank_; i++) {
orderOffset += vertexDistribution[i];
}
// nbChunk, rest and nbChunkTotal are used to compute the
// post-processing bit by bit.
ttk::SimplexId nbChunk = std::floor(verticesToSortSize / ChunkSize);
Expand Down Expand Up @@ -412,7 +413,7 @@ namespace ttk {
}

protected:
bool GlobalOrder{false};
bool GlobalOrder{true};
// This value has been chosen for systems of 128 Gb of memory per computing
// node. For systems with much smaller memory, it may be inadequate and
// require a smaller value.
Expand Down
Loading
Loading