#5100: Stack space overflow when using -N2 and not with -N1 -------------------------------+-------------------------------------------- Reporter: mitar | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.1 | Keywords: Testcase: | Blockedby: Os: Linux | Blocking: Architecture: x86_64 (amd64) | Failure: None/Unknown -------------------------------+-------------------------------------------- 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 [http://hackage.haskell.org/package/Etage-Graph 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? -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5100> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs