Ticket #5100 (closed bug: fixed)
Stack space overflow when using -N2 and not with -N1
| Reported by: | mitar | Owned by: | simonmar |
|---|---|---|---|
| Priority: | high | Milestone: | 7.2.1 |
| Component: | libraries (other) | Version: | 7.1 |
| Keywords: | Cc: | mmitar@… | |
| Operating System: | Linux | Architecture: | x86_64 (amd64) |
| Type of failure: | None/Unknown | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
I get a stack space overflow error when using -N2 (or -N4), but the program works with -N1. The program is my test and benchmarking program for Etage-Graph package.
So this works normally: ./etage-graph-test -s 10 +RTS -N1
Generating a random graph of size 10. Graph contains 10 nodes. Dijkstra search time for shortest paths: 0.000875s Etage search time for shortest paths: 0.010341s (0.5s timeout) Found 100.00 % shortest paths. etage-graph-test: DissolvingException "()"
But this does not: ./etage-graph-test -s 10 +RTS -N2
Generating a random graph of size 10. Graph contains 10 nodes. Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it.
The most interesting thing is that this happens only for graph sizes (-s parameter) between (including) 1-19. For larger sizes it works without problems. What means that the problem is this line:
map spFromSource (nodes graph) `using` parListChunk (noNodes graph `div` (numCapabilities * 10)) rdeepseq
Yes. So also /etage-graph-test -s 5 +RTS -N1 fails. OK, so parListChunk with 0 as an argument is not well defined, or it is defined to diverge. Is this a wanted feature or it is a bug?

