veg / tn93

TN93 fast distance calculator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make distance file output more deterministic

stevenweaver opened this issue · comments

Currently, the output of the CSV file outputs with unsorted edges, we should print the output sorted by the first column.

To reproduce:
Run tn93 twice, save the output, and notice the differences between files.

We need to have sorted rows in order for some testing environments to work.

This behavior should only occur during multithreaded execution. Sorting would be expensive and unnecessary, plus you would have to sort by first AND second column, and there's no guarantee that the names are unique (that could lead to unstable sort behavior).

For testing, I would recommend adding a flag to specify that OpenMP should be disabled.