-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of memory when running tests #99
Comments
Actually, it doesn't seem to be related to the tests at all. Just running |
So, I've traced the memory issue down through the import statements, and I'm pretty sure it's coming from harlan/middle/language.scm. So something about all those |
Unfortunately, since I've started using @akeep's Nanopass Framework, the Harlan compiler uses a lot of memory, typically about 3GB. This sounds like you're probably running out of address space though. Are you using the 32-bit or 64-bit version of Petite? I suspect the fact that Harlan's memory usage is so high means it will require the 64-bit version. |
I've just filed a related bug on the Nanopass framework: akeep/nanopass-framework#4 |
I'm using the 64-bit version, so it's not address space. It's running out of memory because the physical memory is being used up and I don't have a swap partition. This only happens when I've got a few other applications running, though, so the compiler is still usable, although the user experience isn't that great due to the very long startup time. I feel like you could work around this problem by pre-expanding the |
Ah, I'm glad you're still able to run the compiler. I agree that the On Sat, Aug 10, 2013 at 5:02 PM, Howard Mao [email protected]:
|
The problem with using the nanopass framework seems to be related to the number of record types that get created by each language. While that is not something that we can change, it might be possible to improve the memory usage (and with luck the performance) by changing how we create these records. Unfortunately, this is going to be a non-trivial change. (I've started thinking about how best to make this change, and hopefully, I'll get some time to hack on it today.) In the meantime, there are two work arounds that might help. First, if you have access to the full Chez Scheme compiler, you can use that instead of petite. In my experiments, the high water mark was around 500MB instead of 3GB for petite. You can use it by changing line 6 in
to
If you do not have the full Chez Scheme compiler, you can run
The You can change the
to
One thing to note is that optimize level 3 is petite's unsafe mode, so if something goes wrong inside the |
@zhemao - If you enable a swap file, does that allow you to run the Harlan compiler? |
I can run the compiler successfully as long as I don't have other On Wed, Sep 4, 2013 at 12:47 PM, Eric Holk [email protected] wrote:
|
As of 6faa9f5, the memory usage and compile time should be significantly better, although there's still a lot more room for improvement. |
I made another change, 417059e, which significantly reduces Harlan's memory usage. We should be able to further reduce it if necessary. |
I'm having quite a bit of trouble trying to get this to run. I am running on ArchLinux with Intel OpenCL. When I run
make check
, the tests fail with the messageout of memory
. I tried monitoring my memory usage while runningrun-tests
, and in fact the memory does climb quite dramatically when the program is running. I think this might be a problem specific to Intel's OpenCL implementation, since the kernels are run on the CPU and hence memory for the kernels are allocated on the computer's normal RAM instead of GPU memory. I have 4 GB of RAM on my computer, and there is usually about 3 GB free under normal conditions. How large of an array are you allocating in your kernels?The text was updated successfully, but these errors were encountered: