Program runs out of memory using GHC 7.6.3

Mikolaj Konarski mikolaj at well-typed.com
Sat Dec 13 10:05:59 UTC 2014


tt may be that GHC 7.8 optimizes the program better.
Compile with -O0 and see if it runs out of memory, too.
If so, you can just optimize the program by hand.
I'd suggest making a heap profilie with -O0 or in GHC 7.6
and finding out where the memory goes.

Of course, it's possible you've hit a compiler bug,
but it makes sense not to start with that assumption.

Have fun,
Mikolaj

On Sat, Dec 13, 2014 at 10:06 AM, David Spies <dnspies at gmail.com> wrote:
> I have a program I submitted for a Kattis problem:
> https://open.kattis.com/problems/digicomp2
> But I got memory limit exceeded.  I downloaded the test data and ran the
> program on my own computer without problems.  Eventually I found out that
> when compiling with GHC 7.6.3 (the version Kattis uses) rather than 7.8.3,
> this program runs out of memory.
> Can someone explain why it only works on the later compiler?  Is there a
> workaround so that I can submit to Kattis?
>
> Thanks,
> David
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>


More information about the ghc-devs mailing list