-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Division by zero in printCellStatistics() #6121
Copy link
Copy link
Closed
Labels
Description
osrm-partition always fails processing planet after osrm-extract with foot profile.
After some debugging and adding logs I found that partition.GetNumberOfCells returns 0 for level=4 so division by zero occurs in printCellStatistics() line 42
source /= num_cells;
destination /= num_cells;
Here is full log for osrm-partition:
[info] Computing recursive bisection
[info] Loaded compressed node based graph: 736367212 edges, 1811657456 nodes
[info] running partition: 128 1.2 0.25 10 1000 # max_cell_size balance boundary cuts small_component_size
[info] Found 1532677258 SCC (857 large, 1532676401 small)
[info] SCC run took: 93.7171s
[info] Full bisection done in 7846.82s
[info] Loaded node based graph to edge based graph mapping
[info] Loaded edge based graph for mapping partition ids: 2996357810 edges, 736366438 nodes
[info] Fixed 38099 unconnected nodes
[info] Edge-based-graph annotation:
[info] level 1 #cells 2458529 bit size 22
[info] level 2 #cells 258451 bit size 18
[info] level 3 #cells 16310 bit size 14
[info] level 4 #cells 534 bit size 10
[info] Renumbered data in 2297.4 seconds
[info] MultiLevelPartition constructed in 204.034 seconds
[info] CellStorage constructed in 48.4773 seconds
[info] MLD data writing took 64.3765 seconds
[info] Cells statistics per level
[info] Level 1
[info] num_cells 2458529
[info] source 42477944 num_cells 2458529
[info] destination 62028086 num_cells 2458529
[info] Level 1 #cells 2458529 #boundary nodes 62842547, sources: avg. 17, destinations: avg. 25, entries: 1581977611 (12655820888 bytes)
[info] Level 2
[info] num_cells 258451
[info] source 9323222 num_cells 258451
[info] destination 13481432 num_cells 258451
[info] Level 2 #cells 258451 #boundary nodes 13649358, sources: avg. 36, destinations: avg. 52, entries: 685047779 (5480382232 bytes)
[info] Level 3
[info] num_cells 16310
[info] source 1191758 num_cells 16310
[info] destination 1719894 num_cells 16310
[info] Level 3 #cells 16310 #boundary nodes 1751552, sources: avg. 73, destinations: avg. 105, entries: 191696027 (1533568216 bytes)
[info] Level 4
[info] num_cells 0
[info] source 0 num_cells 0
[info] destination 0 num_cells 0
-- fail --
I'm not familiar with osrm-backend internals. Is it normal behaviour to have zero cells on level 4 in MultiLevelPartition (notice [info] level 4 #cells 534 bit size 10 in edge-based-graph annotation stats)?
Reactions are currently unavailable